Documentation Index
Fetch the complete documentation index at: https://docs.chamelio.ai/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
GET /tasks/{task_id}/activity-logs
Authentication
This endpoint requires authentication via API key. Include your API key in the X-API-Key header:
X-API-Key: ca_your_api_key_here
Path Parameters
| Parameter | Type | Required | Description |
|---|
task_id | integer | Yes | Unique identifier for the task |
Query Parameters
| Parameter | Type | Default | Description |
|---|
limit | integer | 50 | Maximum number of logs to return (1–200) |
offset | integer | 0 | Pagination offset |
only_user_comments | boolean | false | When true, only return user comment entries |
Request Example
curl -X GET "https://platform.chamelio.ai/tasks/12345/activity-logs?limit=20&offset=0&only_user_comments=true" \
-H "X-API-Key: ca_your_api_key_here"
Response
Success Response
Status Code: 200 OK
{
"activity_logs": [
{
"activity_log_id": 98765,
"action_type": "general.comment",
"message": "The contract has been reviewed and looks good.",
"user_id": 42,
"user_email": "reviewer@example.com",
"created_at": "2025-03-15T14:30:00Z",
"reply_to": null,
"mention_emails": ["manager@example.com"],
"attachment_ids": [501, 502]
},
{
"activity_log_id": 98770,
"action_type": "approval.user_approved",
"message": "Task approved by manager@example.com",
"user_id": 57,
"user_email": "manager@example.com",
"created_at": "2025-03-15T15:00:00Z",
"reply_to": null,
"mention_emails": [],
"attachment_ids": []
}
],
"total_count": 2
}
Response Fields
| Field | Type | Description |
|---|
activity_logs | array | List of activity log entries |
total_count | integer | Total number of matching logs (for pagination) |
Activity Log Entry Fields
| Field | Type | Description |
|---|
activity_log_id | integer | Unique ID of the activity log entry |
action_type | string | Type of action (e.g., "general.comment", "approval.user_approved") |
message | string | Description of the action or comment text |
user_id | integer | null | ID of the user who performed the action |
user_email | string | null | Email of the user who performed the action |
created_at | string | ISO 8601 timestamp of when the action occurred |
reply_to | integer | null | Activity log ID of the parent comment (if this is a reply) |
mention_emails | array[string] | Emails mentioned in this entry |
attachment_ids | array[integer] | IDs of attachments associated with this entry |
Error Responses
401 Unauthorized
Returned when authentication fails. See the authentication errors section for details.
{
"detail": "Invalid API key"
}
422 Validation Error
Returned when query parameters are invalid (e.g., limit outside the 1–200 range).
{
"detail": [
{
"loc": ["query", "limit"],
"msg": "ensure this value is less than or equal to 200",
"type": "value_error.number.not_le"
}
]
}
500 Internal Server Error
Returned when the request fails due to a server error.
{
"detail": "Failed to get activity logs"
}
Notes
Use the activity_log_id from these results as the reply_to value when adding a comment to create threaded conversations.
Set only_user_comments to true to filter out system-generated entries and see only comments posted by users.
Use limit and offset together to paginate through large activity histories. The total_count field tells you how many entries exist in total.
Use Cases
This endpoint is useful for:
- Audit trails - Review the full history of actions taken on a task
- Comment syncing - Pull task comments into external systems like Slack or a CRM
- Threaded replies - Fetch existing comments to display conversation threads and reply to specific entries
- Activity dashboards - Build custom views showing task progress and team interactions