Letterbox API
Retrieve a cursor-paginated list of Letterbox response metadata, ordered newest first.
| Authorizationrequired | Bearer hato_live_... |
| If-None-Match | Optional ETag for 304 conditional cache validation. |
| Parameter | Description |
|---|---|
| limitinteger | Number of records to return (1–100, default: 50). |
| cursorstring | Opaque pagination cursor from previous response. |
| sinceISO-8601 | Filter entries sent on or after datetime (e.g. 2026-08-01T00:00:00Z). |
| untilISO-8601 | Filter entries sent on or before datetime. |
| letterflow_idinteger | Filter entries by Letterflow ID. |
| run_idUUID | Filter entries by run ID. |
| status_codeinteger | Filter by HTTP/FTP response code (e.g. 200, 404, 500). |
| pinnedboolean | Filter by pinned state: 'true' or 'false'. |
curl -H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/?limit=20&pinned=true"
{
"data": [
{
"id": 42,
"letterflow_id": 7,
"letterflow_name": "Health Check",
"source_type": "letter",
"run_id": null,
"steps_url": null,
"request": {
"method": "GET"
},
"response": {
"status_code": 200
},
"duration_ms": 142,
"sent_at": "2026-08-28T14:30:00+00:00",
"request_sent_at": "2026-08-28T14:30:00.010000+00:00",
"response_received_at": "2026-08-28T14:30:00.152000+00:00",
"is_pinned": true,
"bodies_pruned": false,
"error_message": "",
"region": "au",
"spoke_id": "spoke-au-1",
"artifact_available": true,
"request_headers_url": "https://spoke-au.example/artifacts/...",
"request_body_url": null,
"response_headers_url": "https://spoke-au.example/artifacts/...",
"response_body_url": "https://spoke-au.example/artifacts/..."
}
],
"next_cursor": "eyJzZW50X2F0IjoiMjAyNi0wOC0yOFQxNDozMDowMCIsImlkIjo0Mn0"
}
Retrieve full metadata for a single Letterbox response by ID, including fresh signed regional artifact URLs.
| idintegerrequired | The unique ID of the Letterbox entry. |
curl -H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/42/"
{
"data": {
"id": 42,
"letterflow_id": 7,
"letterflow_name": "Health Check",
"source_type": "letter",
"run_id": null,
"steps_url": null,
"request": {
"method": "GET"
},
"response": {
"status_code": 200
},
"duration_ms": 142,
"sent_at": "2026-08-28T14:30:00+00:00",
"request_sent_at": "2026-08-28T14:30:00.010000+00:00",
"response_received_at": "2026-08-28T14:30:00.152000+00:00",
"is_pinned": false,
"bodies_pruned": false,
"error_message": "",
"region": "au",
"spoke_id": "spoke-au-1",
"artifact_available": true,
"request_headers_url": "https://spoke-au.example/artifacts/read?token=...",
"request_body_url": null,
"response_headers_url": "https://spoke-au.example/artifacts/read?token=...",
"response_body_url": "https://spoke-au.example/artifacts/read?token=..."
}
}
Inspect Letterflow steps
Use the component ID returned by the step list. IDs are case-sensitive and refer to the Letterflow as it was when the run was recorded.
GET /api/v1/letterbox/{id}/steps/
GET /api/v1/letterbox/{id}/steps/{step_id}/
GET /api/v1/letterbox/{id}/steps/{step_id}/input/
GET /api/v1/letterbox/{id}/steps/{step_id}/output/
POST /api/v1/letterbox/{id}/native-inspection/
Step inspection requires letterbox:read and redirects to the selected region. Attempted components appear in execution order, followed by skipped components. Skipped inputs remain readable; unproduced outputs return 404. Stored results are never re-evaluated.
Use the inspection renewal endpoint to refresh access to a component selection or retrieve a signed URL for its recorded content. Expired content returns HTTP 410.
Letter step metadata includes the recorded http_version when available. This is the final response's negotiated protocol, not the client's preference.
Send the Bearer key to Hato API. Fetch signed regional URLs with a separate request without forwarding your API key.
Use this endpoint when entry metadata provides an artifact link. It redirects to a short-lived regional URL. Fetch the regional Location separately without forwarding your API key. For artifacts from individual components, use the step inspection endpoints.
| idintegerrequired | Letterbox entry ID. |
| artifactstringrequired | One of: request-headers, request-body, response-headers, response-body. |
curl -sS -D - -o /dev/null -H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/42/response-body/"
curl -o response_payload.json "REGIONAL_LOCATION_URL"
HTTP/1.1 302 Found
Location: https://spoke-au.example/artifacts/read?token=ey...
Cache-Control: private, no-store
Pin or unpin a Letterbox entry. Pinning protects the response body from expiration and FIFO capacity pruning.
| Field | Type | Description |
|---|---|---|
| is_pinnedrequired | boolean | Set true to pin, false to unpin. |
curl -X PATCH \
-H "Authorization: Bearer $HATO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"is_pinned": true}' \
"https://hato-api.example/api/v1/letterbox/42/"
{
"data": {
"id": 42,
"letterflow_id": 7,
"letterflow_name": "Health Check",
"source_type": "letter",
"run_id": null,
"steps_url": null,
"request": {
"method": "GET"
},
"response": {
"status_code": 200
},
"duration_ms": 142,
"sent_at": "2026-08-28T14:30:00+00:00",
"request_sent_at": "2026-08-28T14:30:00.010000+00:00",
"response_received_at": "2026-08-28T14:30:00.152000+00:00",
"is_pinned": true,
"bodies_pruned": false,
"error_message": "",
"region": "au",
"spoke_id": "spoke-au-1",
"artifact_available": true,
"request_headers_url": "https://spoke-au.example/artifacts/read?token=...",
"request_body_url": null,
"response_headers_url": "https://spoke-au.example/artifacts/read?token=...",
"response_body_url": "https://spoke-au.example/artifacts/read?token=..."
}
}
Permanently deletes a single response record and triggers cleanup of stored artifacts from the regional Spoke.
| idintegerrequired | The unique ID of the Letterbox entry to delete. |
curl -X DELETE \
-H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/42/"
Deletes all unpinned Letterbox responses and immediately deletes their artifacts from regional storage. If a Spoke is temporarily unavailable, cleanup is queued for retry.
curl -X DELETE \
-H "Authorization: Bearer $HATO_API_KEY" \
"https://hato-api.example/api/v1/letterbox/"