ππ½ββοΈUser Activity
In addition to basic user management functionality, the Co:Create API offers two user activity endpoints: List Activity and Get Activity.
User activities include profile updates, transactions, and activities related to campaigns and redemptions.
List All Activity for a User
To get a complete list of a specific user's activity, make a List Activity request (GET) to the Users API. Specify the user's email address as a query parameter. You can also include the activity_types
parameter, which acts as a filter on the response data.
URI and Parameters
GET /alpha/user/activity?{email}[&activity_types={type1}...]
Parameter | Type and description |
---|---|
email Required | string Query parameter The email address of the user whose activity you want to see. |
activity_types (Optional) | array of strings Query parameters (repeated) Limits the list to the types of user activity you specify. If you omit this parameter, the default set of activities is returned: all activity types except for get_user_data .Valid values: burn campaign_claim get_user_data (excluded from default response set; must be specified in the request)mint profile_update redemption_reward_claim redemption_token_burn session_start transfer |
Example request
List Activity GET request:
curl --request GET \
--url 'https://api.testcocrt.xyz/alpha/user/activity?email=user%40example.com&activity_types=profile_update&activity_types=mint' \
--header 'Authorization: Bearer <YOUR_API_KEY_HERE>' \
--header 'accept: application/json'
Example response
List Activity response:
{
"data": [
{
"id": "0fa30e8e-5357-4c02-1090-d13beb9475b6",
"email": "[email protected]",
"activity_types": "profile_update",
"activity_description": "User profile updated",
"additional_data": {
"address": {},
"last_name": "Tafari",
"first_name": "Zephyros"
},
"symbol": "",
"entity_type": null,
"entity_id": null,
"amount": 0,
"created_at": "2023-08-20T22:38:32.194675+00:00"
},
{
"id": "81537c01-880f-467a-a43e-17a9f23e290d",
"email": "[email protected]",
"activity_types": "profile_update",
"activity_description": "Account created",
"additional_data": {},
"symbol": "",
"entity_type": null,
"entity_id": null,
"amount": 0,
"created_at": "2023-08-20T22:35:14.166077+00:00"
}
]
}
Get a User Activity
To get more details about a specific user activity, make a Get Activity request (GET) to the Users API.
URI and Parameters
POST /alpha/user/activity/{activity_id}
Parameter | Type and description |
---|---|
activity_id Required | UUID as string Path parameter The unique identifier (UUID) of the user activity you want to retrieve, specified in the path. Format: 36-character string (including hyphens), following the pattern xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
Example request
Get Activity GET request:
curl --request GET \
--url 'https://api.testcocrt.xyz/alpha/user/activity/81537c01-880f-467a-a43e-17a9f23e290d' \
--header 'Authorization: Bearer <YOUR_API_KEY_HERE>' \
--header 'accept: application/json'
Example response
Get Activity response:
{
"data": {
"id": "81537c01-880f-467a-a43e-17a9f23e290d",
"email": "[email protected]",
"activity_types": "profile_update",
"activity_description": "Account created",
"additional_data": {},
"symbol": "",
"entity_type": null,
"entity_id": null,
"amount": 0,
"created_at": "2023-08-20T22:35:14.166077+00:00"
}
}
Updated over 1 year ago
Whatβs Next