Skip to main content

List Audit Logs

Returns audit log entries for a dock, ordered by createdAt descending. Use query parameters to filter and paginate results.
GET /v1/audit/logs

Query Parameters

ParameterTypeRequiredDescription
dockIdstringRequiredThe dock to retrieve logs for
entityTypestringOptionalFilter by entity type (e.g., artifact, recipient, policy, group)
entityIdstringOptionalFilter by specific entity ID
limitintegerOptionalMaximum number of results (default: 100)
offsetintegerOptionalNumber of results to skip for pagination (default: 0)

Example Request

curl "https://api.docyard.io/v1/audit/logs?dockId=dock_01HQ3K...&entityType=policy&limit=50" \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

Response

[
  {
    "id": "aud_01HQ6A...",
    "dockId": "dock_01HQ3K...",
    "entityType": "policy",
    "entityId": "pol_01HQ3P...",
    "action": "update",
    "actor": "user_01HQ2A...",
    "changes": {
      "before": { "name": "Mortgagee Access" },
      "after": { "name": "Standard Mortgagee Access" }
    },
    "metadata": {},
    "ipAddress": "203.0.113.42",
    "userAgent": "Mozilla/5.0",
    "createdAt": "2025-01-22T10:15:00.000Z"
  },
  {
    "id": "aud_01HQ6B...",
    "dockId": "dock_01HQ3K...",
    "entityType": "policy",
    "entityId": "pol_01HQ3P...",
    "action": "create",
    "actor": "user_01HQ2A...",
    "changes": null,
    "metadata": { "source": "api" },
    "ipAddress": "203.0.113.42",
    "userAgent": "curl/8.1.2",
    "createdAt": "2025-01-15T11:00:00.000Z"
  }
]

Error Handling

StatusCondition
400dockId query parameter is missing
401Missing or invalid API key
404Dock not found