API Keys

List Audit Log

The workspace's audit log, newest first: every state-changing request made with an API key (`via` = `api`), through the MCP server (`mcp`) or by a signed-in user (`ui`), with named actions for API keys, webhooks and privacy requests. Admins and owners (or a key with the `admin` scope). Entries are deleted after `AUDIT_LOG_RETENTION_DAYS` (default 90).

API key access

Needs the admin scope with an API key (ro_pat_...). A signed-in session uses the caller's role.
GET/api/v1/workspaces/current/audit-log
AuthorizationBearer <token>

Access token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).

In: header

Query Parameters

limit?integer

Default 50

Formatint64
Range1 <= value <= 200
cursor?string | null

next_cursor of the previous page

api_key_id?string | null
Formatuuid
action?AuditAction | null
via?AuditVia | null

Header Parameters

X-Workspace-Id?string | null

Id of the workspace to act on (must be a member).

Response Body

curl -X GET "http://localhost:8000/api/v1/workspaces/current/audit-log?limit=1&cursor=string&api_key_id=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "X-Workspace-Id: string"
{
  "items": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "action": "request",
      "via": "api",
      "actor_user_id": "d6ed4497-4325-4995-9f49-e288b7192e46",
      "actor_email": "string",
      "api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd",
      "api_key_name": "string",
      "api_key_prefix": "string",
      "method": "string",
      "route": "/api/v1/leads/{lead_id}",
      "status_code": 0,
      "ip": "string",
      "request_id": "string",
      "detail": {
        "property1": null,
        "property2": null
      },
      "created_at": "2019-08-24T14:15:22Z"
    }
  ],
  "next_cursor": "string"
}
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}