Audit#

Audit log access

List audit logs#

GET/organizations/{org_id}/audit-logs

List audit logs for organization (requires admin+ role)

Security#

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer YOUR_API_KEY

Parameters#

NameTypeLocationRequiredDescription
org_idstringpathYesOrganization ID
offsetintegerqueryNoNumber of items to skip
limitintegerqueryNoMaximum number of items to return
entity_typestring (user, organization, organization_member, organization_invitation, project, api_key, subscription)queryNo
entity_idstringqueryNo
actionstring (create, read, update, delete, accept)queryNo

Code Examples#

curl -X GET "https://searchaf.antfly.io/api/v1/organizations/{org_id}/audit-logs?offset=value&limit=value&entity_type=value&entity_id=value&action=value" \\
    -H "Authorization: Bearer YOUR_API_KEY"

Responses#

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "organization_id": "550e8400-e29b-41d4-a716-446655440000",
      "user_id": "550e8400-e29b-41d4-a716-446655440000",
      "entity_type": "user",
      "entity_id": "550e8400-e29b-41d4-a716-446655440000",
      "action": "create",
      "changes": {
        "old_value": {},
        "new_value": {}
      },
      "ip_address": "192.168.1.1",
      "user_agent": "Mozilla/5.0...",
      "created_at": "2025-10-02T15:30:00Z"
    }
  ],
  "meta": {
    "offset": 0,
    "limit": 1,
    "total": 0
  }
}