---
title: Request IDs
description: Every response carries an X-Request-Id; log it, or send your own, to trace a request end to end.
url: https://anyrow.ai/docs/request-ids
canonical_url: https://anyrow.ai/docs/request-ids
last_updated: '2026-10-16'
---

# Request IDs

Every response, success or error, has an `X-Request-Id` header naming that request:

```http
HTTP/1.1 401 Unauthorized
content-type: application/json
x-request-id: 2fd60418-f920-48e9-a27a-d3f074d4e36f
```

Log it next to your own records. When you contact support about a request that failed or did
something you didn't expect, include its request ID: it finds that exact request in Anyrow's
logs.

## Send your own

Set `X-Request-Id` on the request and Anyrow uses it instead of making one, so one ID follows a
request from your system through Anyrow and back:

```bash
curl "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables" \
  -H "Authorization: ApiKey $ANYROW_API_KEY" \
  -H "X-Request-Id: import-2026-10-16-0042" \
  -i
```

The response's `X-Request-Id` is the one you sent. Use an ID that is unique per request, such as
a UUID.

## Read it in an SDK

```bash title="cURL"
curl -s -D - -o /dev/null "https://api.anyrow.ai/v1/projects/$PROJECT_ID/tables" \
  -H "Authorization: ApiKey $ANYROW_API_KEY" | grep -i x-request-id
```

```ts title="TypeScript"
const { data, error, response } = await anyrow.table.list({
  params: { project_id: "proj_..." },
  search: {},
})
console.log(response.headers.get("x-request-id"))
```

```python title="Python"
from anyrow import APIError

try:
    tables = anyrow.table.list("proj_...")
except APIError as error:
    print(error.response.headers["x-request-id"], error.message)
```

```go title="Go"
_, err := anyrow.Table.List(ctx, "proj_...", nil)
var forbidden *sdk.ForbiddenError
if errors.As(err, &forbidden) {
	fmt.Println(forbidden.Response.Header.Get("X-Request-Id"))
}
```

```rust title="Rust"
match anyrow.table().list("proj_...", &Default::default()).await {
    Err(anyrow::Error::Api(error)) => {
        println!("status {}: {}", error.status(), String::from_utf8_lossy(error.body()))
    }
    other => println!("{other:?}"),
}
// every call also takes extra headers: send your own X-Request-Id there
```

```csharp title="C#"
try
{
    var tables = await anyrow.Table.ListAsync("proj_...");
}
catch (AnyrowApiException error)
{
    Console.WriteLine($"{error.Response.Headers.GetValues("x-request-id").First()} {error.Message}");
}
```

```java title="Java"
try {
    var tables = anyrow.table().list("proj_...");
} catch (AnyrowException error) {
    System.out.println(error.response().headers().firstValue("x-request-id").orElse("") + " " + error.getMessage());
}
```

Every SDK call also takes extra headers, so you can send your own ID the same way you set any
other header.
