Audit
Audit log access
List audit logs
GET
/organizations/{org_id}/audit-logsList 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
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
org_id | string | path | Yes | Organization ID |
offset | integer | query | No | Number of items to skip |
limit | integer | query | No | Maximum number of items to return |
entity_type | string (user, organization, organization_member, organization_invitation, project, api_key, subscription) | query | No | |
entity_id | string | query | No | |
action | string (create, read, update, delete, accept) | query | No |
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
}
}