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
| Field | Type | Description |
|---|---|---|
limit | integer · query | Max rows to return (default 20, max 100). |
after | string · query | Return rows after this id (forward paging). |
before | string · query | Return rows before this id (backward paging). |
status | string · query | A status code (e.g. `429`) or a class: `2xx`, `3xx`, `4xx`, `5xx`. |
api_key_id | string · query | Only one API key's calls (`key_…`). |
method | string · query | Only one HTTP method. |
path_prefix | string · query | Only 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_id | string · query | One call, by the `x-request-id` its response carried. Searches the last 24 hours unless `created_after` is given. |
created_after | string · query | Calls at or after this time (ISO 8601 with a zone). |
created_before | string · query | Calls before this time (ISO 8601 with a zone). |
Response · 200 fields10 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | The log row (`rlog_…`); page with it as `after` / `before`. |
request_idrequired | string | null | The `x-request-id` the response carried: quote it to support. |
methodrequired | string | — |
pathrequired | string | The 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}`. |
statusrequired | integer | The HTTP status answered. |
duration_msrequired | integer | null | How long the request took to answer. |
api_key_idrequired | string | null | The API key that called (`key_…`); null for an MCP or CLI sign-in, or a key since deleted. |
user_agentrequired | string | null | — |
created_atrequired | string | — |
200401403422429503