# Request IDs

Each response carries an ID that finds the request in Clanker Ship's logs, so quote it when you report a problem.

Each request Clanker Ship handles gets an ID, and its logs record it. When something goes wrong,
quoting that ID lets us find the exact request, its error and its cause. Which header carries the ID depends on the
surface you called.

| Surface                         | Where the ID is                                                              |
| ------------------------------- | ---------------------------------------------------------------------------- |
| The `/v1` API                   | The `x-request-id` response header                                           |
| The agent HTTP API, `/agent/v1` | The `x-request-id` response header, repeated as `requestId` in an error body |
| The MCP server, `/agent/mcp`    | `requestId` in a failed tool call's result, and in a failed sign-in's body   |
| The website                     | The `x-request-id` response header                                           |

## See the headers

Print the response headers with `curl -i`, or `-D -` to print them beside the body:

```bash
curl -sS -D - https://api.clankertest.com/v1/workspaces/acme/products \
  -H "Authorization: Bearer $CLANKER_API_KEY"
```

```text
HTTP/2 200
date: Fri, 16 Oct 2026 17:46:33 GMT
content-type: application/json
cache-control: no-store
x-request-id: Q8vN2kRf5LsT
```

In code, read the header from the response:

```typescript
const response = await fetch("https://api.clankertest.com/v1/me", {
  headers: { Authorization: `Bearer ${process.env.CLANKER_API_KEY}` },
});
if (!response.ok)
  console.error(`Request failed: ${response.status}`, response.headers.get("x-request-id"));
```

An agent HTTP API error carries the ID in its body too:

```json
{
  "code": "not_found",
  "message": "No ticket WEB-99.",
  "requestId": "fd36afc0-0fbc-4031-a435-798b7da48ef3"
}
```

## Report a problem

Write to [support@clankertest.com](mailto:support@clankertest.com) with:

- the request ID or `cf-ray` value;
- the time of the request, from the `Date` header;
- the method and path, such as `POST /v1/workspaces/acme/tickets`, and the status you got;
- the error's `_tag` (or `code`) and `message`.

Never send an API key, a vault key or a secret value. The ID is enough to find the request.
