List Activities
Get a paginated list of activities with filters.
GET /api/activities
Returns a paginated list of activities with optional filters.
Auth: Required — activity:view permission
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
per_page | number | 25 | Items per page (max 100) |
search | string | - | Search activities |
status | string | - | Filter by activity status (see Activity States). Filterable values: READY, RETRYING, DISPATCHED, COMPLETED, CANCELED, FAILED |
type | string | - | Filter by type (TASK) |
channel | string | - | Filter by channel |
commerce_id | UUID | - | Filter by commerce |
scheduled_from | ISO 8601 | - | Filter from scheduled date |
scheduled_to | ISO 8601 | - | Filter to scheduled date |
Example
curl "https://api.reten.ai/api/activities?status=READY&type=TASK&page=1&per_page=10" \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "x-project-id: <project-id>"const params = new URLSearchParams({ status: "READY", type: "TASK", page: "1", per_page: "10" });
const response = await fetch(`https://api.reten.ai/api/activities?${params}`, {
headers: {
"Authorization": "Bearer <token>",
"x-tenant-id": "<tenant-id>",
"x-project-id": "<project-id>",
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.reten.ai/api/activities",
headers={
"Authorization": "Bearer <token>",
"x-tenant-id": "<tenant-id>",
"x-project-id": "<project-id>",
},
params={"status": "READY", "type": "TASK", "page": 1, "per_page": 10},
)
data = response.json()Response 200 OK
{
"data": [
{
"id": "ee0e8400-e29b-41d4-a716-446655440000",
"projectId": "3f6c2b1a-8d4e-4f7a-9b2c-5e1d0a7f6c34",
"type": "TASK",
"reason": {
"code": "retention",
"label": "Retencion"
},
"channel": "SALESMAN",
"status": "READY",
"userStatus": {
"code": "at_risk",
"label": "En Riesgo"
},
"scheduledAt": "2025-01-16T09:00:00.000Z",
"commerceAssignment": {
"commerceId": "880e8400-e29b-41d4-a716-446655440000",
"commerce": {
"name": "Main Street Store"
}
}
}
],
"pagination": {
"page": 1,
"per_page": 10,
"total": 1,
"total_pages": 1,
"has_next": false,
"has_previous": false
}
}