API reference › History and logs › Audits
Retrieve audit history for a specific entity
GET /v1/audits/{type}/{id}
- Scope
history_logs:read- Roles
- admin, scheduler
Fetches a paginated audit trail for a specific entity (client, consumer, service provider, assignment, shift, etc.).
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
type required | string | Fully qualified model name of the auditable entity Example |
id required | string | ID of the auditable entity Example |
Query parameters
| Name | Type | Description |
|---|---|---|
auditEventType | string | Filter by audit event type (created, updated, deleted, status_changed, etc.) Example |
from | string (date) | Start date (YYYY-MM-DD) |
to | string (date) | End date (YYYY-MM-DD) |
search | string | Search term across audit message and metadata |
sortBy | string | Sort by field (default: created_at) |
sortOrder | string | Sort order (asc or desc) One of: |
perPage | integer | Records per page (default: 10) Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/audits/{type}/{id}" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Audit history retrieved successfully
Audit history retrieved successfully
{
"success": true,
"data": [
{
"id": 1,
"event": "string",
"category": "string",
"module": "string",
"summary": "string",
"description": "Short human-readable description.",
"occurredAt": "2026-01-15 09:00:00",
"occurredAtUtc": "string",
"occurredAtIso": "string",
"timezone": "America/New_York",
"actor": {
"name": "Example name",
"role": "admin",
"type": "string",
"image": "https://cdn.example.com/image.png"
},
"subject": {
"name": "Example name",
"role": "admin",
"type": "string",
"image": "https://cdn.example.com/image.png"
},
"initiation": "string",
"trigger": "string",
"impersonation": {
"active": true,
"impersonator": {},
"target": {},
"startedAt": "2026-01-15 09:00:00"
},
"entity": {
"type": "string",
"reference": "string",
"label": "Example label"
},
"changes": [
null
],
"eventLabel": "Example label",
"auditableType": "App\\\\Models\\\\Assignment",
"auditableId": "ASG-XY9EML",
"oldValues": [
null
],
"newValues": [
null
],
"logMessage": "Request processed successfully.",
"actionSource": "manual",
"actorType": {
"code": "string",
"label": "Example label"
},
"user": {
"name": "Example name",
"role": "admin",
"type": "string",
"image": "https://cdn.example.com/image.png"
},
"subjectUser": {
"name": "Example name",
"role": "admin",
"type": "string",
"image": "https://cdn.example.com/image.png"
},
"time": "09:00:00",
"convertedTime": "09:00:00",
"createdAt": "2026-01-15 09:00:00",
"internal": {
"auditEventType": "string",
"rawEvent": "string",
"auditableType": "App\\\\Models\\\\Assignment",
"auditableId": "ASG-XY9EML",
"triggerCode": "string",
"actorTypeCode": "string",
"actorUserId": "USR-LBW3CV",
"actorEmail": "user@example.com",
"subjectUserId": "string",
"subjectEmail": "user@example.com",
"impersonation": "string",
"metadata": {}
}
}
],
"meta": {
"currentPage": 1,
"lastPage": 3,
"perPage": 10,
"total": 27
}
}Response fields (75)
3 top-level fields; 2 hold nested fields, listed below.
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
data | array of object (68 nested) | |
meta | object (4 nested) |
Nested fields
data 68 fields
| Field | Type | Description |
|---|---|---|
data[].id | integer | Example |
data[].event | string | |
data[].category | string or null | |
data[].module | string | |
data[].summary | string | |
data[].description | string | Example |
data[].occurredAt | string | Example |
data[].occurredAtUtc | string | |
data[].occurredAtIso | string or null | |
data[].timezone | string or null | Example |
data[].actor | object or null | |
data[].actor.name | string | Example |
data[].actor.role | string | Example |
data[].actor.type | string | |
data[].actor.image | string | Example |
data[].subject | object or null | |
data[].subject.name | string or null | Example |
data[].subject.role | string or null | Example |
data[].subject.type | string or null | |
data[].subject.image | string or null | Example |
data[].initiation | string or null | |
data[].trigger | string or null | |
data[].impersonation | object or null | |
data[].impersonation.active | boolean | Example |
data[].impersonation.impersonator | object | |
data[].impersonation.target | object | |
data[].impersonation.startedAt | string or null | Example |
data[].entity | object | |
data[].entity.type | string | |
data[].entity.reference | string | |
data[].entity.label | string | Example |
data[].changes | array of any | |
data[].eventLabel | string | Example |
data[].auditableType | string | Example |
data[].auditableId | string | Example |
data[].oldValues | array of any | |
data[].newValues | array of any | |
data[].logMessage | string | Example |
data[].actionSource | string or null | Example |
data[].actorType | object or null | |
data[].actorType.code | string or null | |
data[].actorType.label | string | Example |
data[].user | object or null | |
data[].user.name | string | Example |
data[].user.role | string | Example |
data[].user.type | string | |
data[].user.image | string | Example |
data[].subjectUser | object or null | |
data[].subjectUser.name | string or null | Example |
data[].subjectUser.role | string or null | Example |
data[].subjectUser.type | string or null | |
data[].subjectUser.image | string or null | Example |
data[].time | string | Example |
data[].convertedTime | string | Example |
data[].createdAt | string or null | Example |
data[].internal | object or null | |
data[].internal.auditEventType | string or null | |
data[].internal.rawEvent | string | |
data[].internal.auditableType | string | Example |
data[].internal.auditableId | string | Example |
data[].internal.triggerCode | string or null | |
data[].internal.actorTypeCode | string or null | |
data[].internal.actorUserId | string or null | Example |
data[].internal.actorEmail | string or null | Example |
data[].internal.subjectUserId | string or null | |
data[].internal.subjectEmail | string or null | Example |
data[].internal.impersonation | string or null | |
data[].internal.metadata | object or null |
meta 4 fields
| Field | Type | Description |
|---|---|---|
meta.currentPage | integer | Example |
meta.lastPage | integer | Example |
meta.perPage | integer | Example |
meta.total | integer | Example |
401 Not signed in
Unauthorized
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'history_logs:read' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
404 Not found
Entity not found
{
"success": false,
"message": "Auditable entity not found"
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Internal Server Error
{
"success": false,
"message": "An unexpected error occurred — please try again."
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |