List request logs

List request logs

GET/api/v1/logs

GET /logs
curl -X GET 'https://www.unitpost.com/api/v1/logs' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
Response · 200
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "request_log",
      "id": "id_123",
      "request_id": "request_123",
      "method": "string",
      "path": "string",
      "status": 0,
      "duration_ms": 0,
      "api_key_id": "api_key_123",
      "user_agent": "string",
      "created_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Your workspace's API request log, newest first and cursor-paginated: each call's method, path, status, time taken, the API key that made it and its x-request-id (quote it to support). Never the caller's IP and never a body. Narrow with status (a code, or a class such as 4xx), api_key_id, method, path_prefix (e.g. /email), request_id and a created_after / created_before range. Rows are kept 30 days. Needs apikeys:read, which no key preset includes, and has its own per-workspace rate limit. Requires the apikeys:read capability.

Parameters10 fields
FieldTypeDescription
limitinteger · queryMax rows to return (default 20, max 100).
afterstring · queryReturn rows after this id (forward paging).
beforestring · queryReturn rows before this id (backward paging).
statusstring · queryA status code (e.g. `429`) or a class: `2xx`, `3xx`, `4xx`, `5xx`.
api_key_idstring · queryOnly one API key's calls (`key_…`).
methodstring · queryOnly one HTTP method.
path_prefixstring · queryOnly paths under this one, as in this reference (e.g. `/email/campaigns`): whole path segments, matched literally (`/email` matches `/email` and `/email/campaigns`, not `/emails`). It can't name an email address or a phone number (paths show them as `{email}` / `{phone}`).
request_idstring · queryOne call, by the `x-request-id` its response carried. Searches the last 24 hours unless `created_after` is given.
created_afterstring · queryCalls at or after this time (ISO 8601 with a zone).
created_beforestring · queryCalls before this time (ISO 8601 with a zone).
Response · 200 fields10 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstringThe log row (`rlog_…`); page with it as `after` / `before`.
request_idrequiredstring | nullThe `x-request-id` the response carried: quote it to support.
methodrequiredstring—
pathrequiredstringThe path called, without the host and `/api/v1` (e.g. `/email/email_…`); no query string. An email address or phone number in it reads `{email}` / `{phone}`.
statusrequiredintegerThe HTTP status answered.
duration_msrequiredinteger | nullHow long the request took to answer.
api_key_idrequiredstring | nullThe API key that called (`key_…`); null for an MCP or CLI sign-in, or a key since deleted.
user_agentrequiredstring | null—
created_atrequiredstring—
200401403422429503

Search docs and guides

Search the docs and product guides.