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

NameTypeDescription
type requiredstring

Fully qualified model name of the auditable entity

Example Client.

id requiredstring

ID of the auditable entity

Example 123.

Query parameters

NameTypeDescription
auditEventTypestring

Filter by audit event type (created, updated, deleted, status_changed, etc.)

Example updated.

fromstring (date)

Start date (YYYY-MM-DD)

tostring (date)

End date (YYYY-MM-DD)

searchstring

Search term across audit message and metadata

sortBystring

Sort by field (default: created_at)

sortOrderstring

Sort order (asc or desc)

One of: asc, desc.

perPageinteger

Records per page (default: 10)

Example 10.

Every call also sends Authorization and X-Tenant-ID; see Getting started.

Example request

Shell
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

JSON
{
  "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.

FieldTypeDescription
successboolean

Example true.

dataarray of object (68 nested)
metaobject (4 nested)

Nested fields

data 68 fields
FieldTypeDescription
data[].idinteger

Example 1.

data[].eventstring
data[].categorystring or null
data[].modulestring
data[].summarystring
data[].descriptionstring

Example Short human-readable description..

data[].occurredAtstring

Example 2026-01-15 09:00:00.

data[].occurredAtUtcstring
data[].occurredAtIsostring or null
data[].timezonestring or null

Example America/New_York.

data[].actorobject or null
data[].actor.namestring

Example Example name.

data[].actor.rolestring

Example admin.

data[].actor.typestring
data[].actor.imagestring

Example https://cdn.example.com/image.png.

data[].subjectobject or null
data[].subject.namestring or null

Example Example name.

data[].subject.rolestring or null

Example admin.

data[].subject.typestring or null
data[].subject.imagestring or null

Example https://cdn.example.com/image.png.

data[].initiationstring or null
data[].triggerstring or null
data[].impersonationobject or null
data[].impersonation.activeboolean

Example true.

data[].impersonation.impersonatorobject
data[].impersonation.targetobject
data[].impersonation.startedAtstring or null

Example 2026-01-15 09:00:00.

data[].entityobject
data[].entity.typestring
data[].entity.referencestring
data[].entity.labelstring

Example Example label.

data[].changesarray of any
data[].eventLabelstring

Example Example label.

data[].auditableTypestring

Example App\\Models\\Assignment.

data[].auditableIdstring

Example ASG-XY9EML.

data[].oldValuesarray of any
data[].newValuesarray of any
data[].logMessagestring

Example Request processed successfully..

data[].actionSourcestring or null

Example manual.

data[].actorTypeobject or null
data[].actorType.codestring or null
data[].actorType.labelstring

Example Example label.

data[].userobject or null
data[].user.namestring

Example Example name.

data[].user.rolestring

Example admin.

data[].user.typestring
data[].user.imagestring

Example https://cdn.example.com/image.png.

data[].subjectUserobject or null
data[].subjectUser.namestring or null

Example Example name.

data[].subjectUser.rolestring or null

Example admin.

data[].subjectUser.typestring or null
data[].subjectUser.imagestring or null

Example https://cdn.example.com/image.png.

data[].timestring

Example 09:00:00.

data[].convertedTimestring

Example 09:00:00.

data[].createdAtstring or null

Example 2026-01-15 09:00:00.

data[].internalobject or null
data[].internal.auditEventTypestring or null
data[].internal.rawEventstring
data[].internal.auditableTypestring

Example App\\Models\\Assignment.

data[].internal.auditableIdstring

Example ASG-XY9EML.

data[].internal.triggerCodestring or null
data[].internal.actorTypeCodestring or null
data[].internal.actorUserIdstring or null

Example USR-LBW3CV.

data[].internal.actorEmailstring or null

Example user@example.com.

data[].internal.subjectUserIdstring or null
data[].internal.subjectEmailstring or null

Example user@example.com.

data[].internal.impersonationstring or null
data[].internal.metadataobject or null
meta 4 fields
FieldTypeDescription
meta.currentPageinteger

Example 1.

meta.lastPageinteger

Example 3.

meta.perPageinteger

Example 10.

meta.totalinteger

Example 27.

401 Not signed in

Unauthorized

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED. Example API_KEY_MISSING.

403 Not allowed

Scope, tenant, IP allow-list or RBAC check failed.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You don't have permission to access this endpoint. This API key is missing the 'history_logs:read' scope..

errorsany or null

Null on this status.

codestring

Always empty on this status.

Example .

404 Not found

Entity not found

JSON
{
  "success": false,
  "message": "Auditable entity not found"
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Auditable entity not found.

429 Too many requests

Rate limit exceeded. See Retry-After.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: RATE_LIMITED. Example RATE_LIMITED.

500 Server error

Internal Server Error

JSON
{
  "success": false,
  "message": "An unexpected error occurred — please try again."
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example An unexpected error occurred — please try again..