Concepts
Request logs
Every request made with your keys, through MCP or from the dashboard, with redacted bodies and filters.
1fly records every /v1 request that reaches your account, whether it came from your server, an AI agent or a person in the dashboard. Use the log to debug a failing integration, see what an agent actually sent, or prove what happened to an order. Read it in the dashboard at http://localhost:3000/app/logs or with a key that has the logs:read scope.
What is logged#
Each row has:
| Field | Meaning |
|---|---|
requestId |
Same as the x-request-id header and the requestId in error bodies. |
occurredAt, durationMs |
When the request arrived and how long it took. |
channel |
api (API key), mcp (API key via our MCP server), web (dashboard session), admin (1fly staff). |
method, path, status |
The HTTP request and the status we answered with. |
apiKey |
Id, name and prefix of the key used, if any. |
user |
The dashboard user, for session requests. |
errorCode |
The error.code of a failed request. |
orderId |
The order the request touched, when there is one: path id, body orderId or the created order. |
mcpTool |
The MCP tool that made the call, for mcp requests. |
GET /v1/logs/{id} adds the query string, request and response bodies, IP address and user agent. GET /v1/health is not logged.
Redaction#
Bodies are cleaned before they are stored, at every nesting level:
| Field | Stored as |
|---|---|
documentNumber (passport) |
Masked except the last 4 characters: *****4567 |
password, passwordHash |
[removed] |
authorization, cookie |
[removed] |
secret (a new API key) |
First 14 characters only, e.g. 1fly_test_a1b2… [shown once, not stored] |
API key secrets are never stored anywhere in the log. Bodies larger than 16 KB are stored as { "truncated": true, "bytes": …, "preview": "…" } with the first 16 KB.
Filtering#
GET /v1/logs returns the newest rows first and takes these query parameters (all optional):
| Parameter | Example | Matches |
|---|---|---|
keyId |
key_5f2a… |
Requests made with this key. |
status |
4xx |
Status class: 2xx, 4xx, 5xx. |
channel |
mcp |
api, mcp, web, admin. |
method |
POST |
HTTP method. |
path |
/v1/orders |
Path prefix. |
orderId |
ord_0d6c… |
Requests about one order. |
from, to |
2026-11-17T00:00:00Z |
Time range (ISO 8601). |
limit |
20 |
1–100, default 50. |
cursor |
nextCursor from the previous page. |
Example: every failed call an agent made today.
curl -s "http://localhost:4000/v1/logs?channel=mcp&status=4xx&from=2026-11-17T00:00:00Z" \
-H "Authorization: Bearer $ONEFLY_API_KEY"{
"rows": [
{
"id": 18342, "requestId": "5b0c9a7e-2d1f-4e3a-9b8c-7d6e5f4a3b2c", "occurredAt": "2026-11-17T10:02:11.402Z",
"channel": "mcp", "method": "POST", "path": "/v1/orders", "status": 400, "durationMs": 12,
"apiKey": { "id": "key_5f2a…", "name": "Claude agent", "prefix": "1fly_test_a1b2" }, "user": null,
"accountId": "acc_3e1f…", "errorCode": "VALIDATION_FAILED", "orderId": null, "mcpTool": "create_order"
}
],
"nextCursor": null
}Page through results by passing nextCursor as cursor until it is null.
Note
To see everything about one purchase, filter by orderId here and read the order’s timeline. The requestId connects the two: timeline events caused by an API call carry it in data.requestId.