Skip to content
Last updated

Get paginated audit logs for the organization.

POST/v1/organizations/{organization_id}/dashboard/change-logs

organization_id string required

Organization ID

Request Body

skip integer optional · Defaults to 0

Number of records to skip (min: 0).

take integer optional · Defaults to 50

Number of records to return (min: 1, max: 100).

start_date datetime optional

Filter logs from this date (ISO 8601 format).

end_date datetime optional

Filter logs until this date (ISO 8601 format).

resource_type string optional

Filter by resource type. Valid values: organization_user, assistant, rule, document.

action string optional

Filter by action. Valid values: created, updated, deleted, added, removed, restored, entity_attached, entity_detached.

Returns

Returns paginated audit logs.

Notes

  • Returns all audit logs for the organization
  • Includes member updates, deletions, restorations, and invitations

Authorization

Requires Admin or Owner role.

Bash
curl -X POST https://api.aitronos.com/v1/organizations/org_abc123/dashboard/change-logs \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "skip": 0,
    "take": 50,
    "resource_type": "assistant",
    "action": "created"
  }'

Response:

{
  "logs": [
    {
      "id": "log_abc123",
      "user_id": "usr_xyz789",
      "user_name": "Admin User",
      "user_email": "admin@example.com",
      "action": "updated",
      "timestamp": "2025-01-20T14:45:00Z",
      "resource_type": "organization_user",
      "resource_id": "usr_def456",
      "resource_name": "John Doe",
      "changes": [
        {
          "field": "role_id",
          "old_value": "role_member",
          "new_value": "role_admin"
        }
      ]
    }
  ],
  "total_count": 156,
  "skip": 0,
  "take": 50
}