Per REST API v1

Activity

When sending user-activity to Per from your application, use the Activity API.

Authentication

The Activity API requires an Authorization token with a scope that includes “activity”. See the general Authentication documentation regarding authenticating with the Per API.

Add an activity (activities.add)

Track user activity by sending their billing ID and user ID. This endpoint should be called from anywhere and everywhere that you consider a user to be “active” in your application.

GET /activities.add?billingId=BILLING_ID&userId=USER_ID [&activityTypeId=ACTIVITY_TYPE_ID]

(Try the API)

Input

NameTypeDescription
billingIdstringRequired. Billing ID to give context for the user ID.
userIdstringRequired. User ID in the context of the billing ID for which to track activity.
activityTypeIdstringRequired. The specific type of activity to record, used in reporting.

Response

Status: 200 OK

{
 "ok": true,
 "result": {
   "transactionId": "35434hjgghf46h34jh"
 },
}