# Look up one request by its id

`GET /api/v1/account/requests/{requestId}`

- Authentication: Secret API key as a bearer token
- Billing: Free.
- Group: Account

Every response carries an `X-Request-Id` header and repeats the same id in its `meta` or `error` block. This reads that id back: the endpoint that was called, the status and typed `error_code` it answered with, the credits it spent and how long it took. It is what a script that caught a failure can call to find out what happened, and what to quote to support.

The row carries no lookup input. The endpoint is named by its route, never by the path it was called on, so this can never read back the address, number or identifier a call was about. Rows are kept for `meta.retention_days` and then deleted; an id older than that, or belonging to another account, answers `404 NOT_FOUND`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `requestId` | path | string | yes | The id from the X-Request-Id header, e.g. req_01m1kgdm4xngzmbmff68g94w0c. |

## Example request

```bash
curl https://spaw.co/api/v1/account/requests/{requestId} \
  -H "Authorization: Bearer sk_live_…"
```

## Responses

### 200 — The request as it was recorded.

```json
{
    "success": true,
    "data": {
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c",
        "route": "api.v1.email",
        "method": "POST",
        "status": 402,
        "error_code": "INSUFFICIENT_CREDITS",
        "credits_used": 0,
        "duration_ms": 8,
        "via": "api · Production",
        "occurred_at": "2026-09-09T09:41:02+00:00"
    },
    "meta": {
        "retention_days": 30,
        "request_id": "req_01m22gaxhnj60f71ez5tjcdcvy"
    }
}
```

### 401 — The key is missing, malformed, or revoked.

```json
{
    "success": false,
    "error": {
        "code": "UNAUTHENTICATED",
        "message": "Provide a valid API key as a bearer token.",
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
    }
}
```

### 404 — No such record on this account.

```json
{
    "success": false,
    "error": {
        "code": "NOT_FOUND",
        "message": "No record with that id on this account.",
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
    }
}
```

### 429 — Over 5 requests per second for the key. Retry after the limit resets.

```json
{
    "success": false,
    "error": {
        "code": "RATE_LIMITED",
        "message": "Too many requests. Retry after the limit resets.",
        "request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
    }
}
```

## Error codes

- `UNAUTHENTICATED` — https://spaw.co/docs/errors/UNAUTHENTICATED
- `NOT_FOUND` — https://spaw.co/docs/errors/NOT_FOUND
- `RATE_LIMITED` — https://spaw.co/docs/errors/RATE_LIMITED

---

Canonical page: https://spaw.co/docs/api/get-request · OpenAPI document: https://spaw.co/openapi.json · All endpoints: https://spaw.co/docs/api
