# List API requests

> The request_logs.list operation: GET /api/v1/request_logs in the REST API and the request_logs_list tool in the MCP server.

Lists the API and MCP requests made to this organization in the last 7 days, newest first (spec §31.1): method,
path, status, latency, the key prefix, the request ID and the error code. Request and response bodies, headers
and IP addresses are never stored. Use it to find a failed call by its `Ownrecord-Request-Id`.

An organization-level request sees every entry; a brand request sees its brand's; an entity request its
brands' (calls made with organization- or entity-level credentials carry no brand and show only at the
organization level). Filter by `status` (`2xx`, `3xx`, `4xx`, `5xx`, or `errors` for 400 and above), `method`,
`requestId` or `operationId`. Paginate with `limit` (1–100, default 10) and `starting_after`.

## At a glance

- **REST:** `GET /api/v1/request_logs`
- **MCP tool:** `request_logs_list`
- **Operation ID:** `request_logs.list`
- **Scope:** Organization, or one of its legal entities or brands
- **Permission:** `webhooks:read`
- **Risk tier:** `read`
- **Dry run:** Not supported
- **Idempotency:** Not needed (read only)
- **Modes:** Test and live
- **Pagination:** `limit` (at most 100) and `starting_after`
- **Authentication:** API key with the `webhooks:read` scope
- **Since:** M13

## Request

### Query parameters

| Field            | Type                                                              | Required | Description |
| ---------------- | ----------------------------------------------------------------- | -------- | ----------- |
| `limit`          | integer (1 to 100)                                                | No       |             |
| `starting_after` | `arl_…` ID                                                        | No       |             |
| `status`         | one of `2xx`, `3xx`, `4xx`, `5xx`, `errors`                       | No       |             |
| `method`         | one of `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, `HEAD`, `OPTIONS` | No       |             |
| `requestId`      | string                                                            | No       |             |
| `operationId`    | string                                                            | No       |             |

## Response

`200 OK` with a JSON object, a page of the list (newest first):

| Field                | Type                          | Description                                                                                       |
| -------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------- |
| `object`             | `"list"`                      |                                                                                                   |
| `data`               | array of object               |                                                                                                   |
| `data[].object`      | `"request_log"`               |                                                                                                   |
| `data[].id`          | `arl_…` ID                    |                                                                                                   |
| `data[].method`      | string                        |                                                                                                   |
| `data[].path`        | string                        | Without the query string; values that aren't IDs or slugs are masked to their last 4 characters.  |
| `data[].status`      | integer                       |                                                                                                   |
| `data[].latencyMs`   | integer                       |                                                                                                   |
| `data[].requestId`   | string                        | The `Ownrecord-Request-Id` the response carried.                                                  |
| `data[].errorCode`   | string or null                |                                                                                                   |
| `data[].operationId` | string                        |                                                                                                   |
| `data[].keyPrefix`   | string or null                | The API key's first 12 characters (`or_test_acme`), when a key was used.                          |
| `data[].mode`        | one of `test`, `live` or null | The key's mode, read from its prefix; null without a key.                                         |
| `data[].caller`      | string                        | Who called: an API key (`key_…`), user, agent or app installation ID, a system name, or `public`. |
| `data[].brandId`     | `brd_…` ID or null            |                                                                                                   |
| `data[].createdAt`   | date-time                     |                                                                                                   |
| `has_more`           | boolean                       |                                                                                                   |
| `next_cursor`        | `arl_…` ID or null            |                                                                                                   |

## Examples

### The latest failed calls

```http
GET /api/v1/request_logs?status=errors&limit=2
Authorization: Bearer or_test_…
```

Response (`200`):

```json
{
  "object": "list",
  "data": [
    {
      "object": "request_log",
      "id": "arl_01m66t2tk1eyms4zmhf0nasy99",
      "method": "POST",
      "path": "/api/v1/customers",
      "status": 409,
      "latencyMs": 12,
      "requestId": "req_9e2c4a7b1f3d",
      "errorCode": "idempotency_key_reused",
      "operationId": "customers.create",
      "keyPrefix": "or_test_acme",
      "mode": "test",
      "caller": "key_01m66t2tk1eyms4zmhf0nasy9b",
      "brandId": "brd_01m66t2tk1eyms4zmhf0nasy9a",
      "createdAt": "2026-11-03T09:12:44.000Z"
    },
    {
      "object": "request_log",
      "id": "arl_01m66t2tk1eyms4zmhf0nasy98",
      "method": "GET",
      "path": "/api/v1/customers/****9xyz",
      "status": 404,
      "latencyMs": 9,
      "requestId": "req_1b5d7f9a3c2e",
      "errorCode": "resource_not_found",
      "operationId": "customers.get",
      "keyPrefix": "or_test_acme",
      "mode": "test",
      "caller": "key_01m66t2tk1eyms4zmhf0nasy9b",
      "brandId": "brd_01m66t2tk1eyms4zmhf0nasy9a",
      "createdAt": "2026-11-03T09:10:02.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "arl_01m66t2tk1eyms4zmhf0nasy98"
}
```

## Errors

| Code                                                                                   | HTTP status | When                                                                  | What to do                                                                      |
| -------------------------------------------------------------------------------------- | ----------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [`validation_failed`](https://ownrecord.io/docs/reference/errors.md#validation_failed) | 400         | A filter is invalid, or `starting_after` isn't an entry of this log.  | Fix the fields listed in `details.issues` and send the request again.           |
| [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied) | 403         | Your role can't read the developers area (webhooks and request logs). | Ask an organization owner or admin for a role or scope that allows this action. |

It can also return these [common errors](https://ownrecord.io/docs/reference.md#common-errors): [`api_version_unsupported`](https://ownrecord.io/docs/reference/errors.md#api_version_unsupported), [`authentication_required`](https://ownrecord.io/docs/reference/errors.md#authentication_required), [`api_key_invalid`](https://ownrecord.io/docs/reference/errors.md#api_key_invalid), [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found), [`dry_run_not_supported`](https://ownrecord.io/docs/reference/errors.md#dry_run_not_supported), [`rate_limited`](https://ownrecord.io/docs/reference/errors.md#rate_limited), [`internal_error`](https://ownrecord.io/docs/reference/errors.md#internal_error).
