Skip to main content

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

ParameterTypeRequiredDescription
task_idintegerYesUnique identifier for the task

Query Parameters

ParameterTypeDefaultDescription
limitinteger50Maximum number of logs to return (1–200)
offsetinteger0Pagination offset
only_user_commentsbooleanfalseWhen 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

FieldTypeDescription
activity_logsarrayList of activity log entries
total_countintegerTotal number of matching logs (for pagination)

Activity Log Entry Fields

FieldTypeDescription
activity_log_idintegerUnique ID of the activity log entry
action_typestringType of action (e.g., "general.comment", "approval.user_approved")
messagestringDescription of the action or comment text
user_idinteger | nullID of the user who performed the action
user_emailstring | nullEmail of the user who performed the action
created_atstringISO 8601 timestamp of when the action occurred
reply_tointeger | nullActivity log ID of the parent comment (if this is a reply)
mention_emailsarray[string]Emails mentioned in this entry
attachment_idsarray[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