# List Messages

`GET https://api.inboxjot.com/v1/messages`

Lists the received messages of the workspace, newest first, with the exact total. Messages are kept for 30 days. Needs a Full key. A key limited to one domain answers 403.

Lists are paged with cursors. Read `next_cursor` and send it as `after` for the next page. A page has 50 items unless you set `per_page`, up to 100.

## Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | No | One status or a comma-separated list: `stored`, `delivered`, `retrying`, `failed`, `held`, `rejected`, `paused` or `waiting`. |
| `inbox_id` | string | No | Keeps messages that reached this inbox. |
| `search` | string | No | Text to find in the subject or the sender address. |
| `tag` | string | No | Keeps messages with this tag. |
| `per_page` | integer | No | How many items to return, from 1 to 100. Defaults to 50. |
| `after` | string | No | A `next_cursor` from the last page. Returns the items after it. |
| `before` | string | No | A `prev_cursor` from the last page. Returns the items before it. When you send both, `before` wins. |

## Response

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] | No | The messages on this page, newest first. |
| `data[].id` | string | No | The message id. |
| `data[].inbox_id` | string \| null | No | The inbox that matched the recipient, or `null`. |
| `data[].inbox_name` | string \| null | No | The inbox name, or `null`. |
| `data[].recipient` | string | No | The envelope recipient that reached this workspace. |
| `data[].from` | object | No | The sender. |
| `data[].from.email` | string | No | The sender address. |
| `data[].from.name` | string \| null | No | The sender name. |
| `data[].subject` | string | No | The subject. |
| `data[].preview` | string | No | The start of the reply text. |
| `data[].status` | string | No | One of `stored`, `delivered`, `retrying`, `failed`, `held` or `rejected`. |
| `data[].status_reason` | string \| null | No | Why it was held, rejected or failed: `spam`, `virus`, `too_large`, `too_many_attachments`, a forward reason, or `endpoint_removed` when its webhook endpoint was deleted or turned off. |
| `data[].tags` | string[] | No | The tags on the message, in the order they were added. |
| `data[].thread_id` | string \| null | No | The thread of the message, or `null` for a message received before threads. |
| `data[].attachment_count` | integer | No | How many files are attached. |
| `data[].size` | integer | No | The raw size in bytes. |
| `data[].received_at` | string | No | When it arrived. |
| `prev_cursor` | string \| null | No | Send it as `before` to get the page before. `null` on the first page. |
| `next_cursor` | string \| null | No | Send it as `after` to get the next page. `null` on the last page. |
| `total` | integer | No | How many messages match the filters and the search, across every page. |

## Request

cURL:

```bash
curl -X GET https://api.inboxjot.com/v1/messages \
  -H "Authorization: Bearer $INBOXJOT_API_KEY"
```

## Responses

| Status | Description |
| --- | --- |
| 200 | Returns a page of received messages, newest first. |
| 400 | A parameter is missing or invalid. |
| 401 | The API key is missing, revoked or expired. |
| 403 | The key is a Sending key, or the request comes from outside its IP allowlist. |
| 429 | Too many requests for this key. Wait for the seconds in the Retry-After header. |
| 500 | Something failed on our side. Retry later. |

200:

```json
{
  "data": [
    {
      "id": "msg_06d2mfk8r4tq9xv2bnc7s",
      "inbox_id": "inb_06d2mfk8r6pn2tc8yw3hd",
      "inbox_name": "Support",
      "thread_id": "thr_06d2mfk8r5xc3vb7nq2kd",
      "recipient": "support@inbound.acme.dev",
      "from": {
        "email": "riti@example.com",
        "name": "Riti Shah"
      },
      "subject": "Order 4821 arrived damaged",
      "preview": "Hi, the box was crushed and the mug inside is broken.",
      "status": "delivered",
      "status_reason": null,
      "tags": [
        "billing"
      ],
      "attachment_count": 1,
      "size": 48213,
      "received_at": "2026-11-20T09:14:02.000Z"
    }
  ],
  "prev_cursor": null,
  "next_cursor": null,
  "total": 1
}
```

400:

```json
{
  "name": "validation_error",
  "status": 400,
  "message": "Invalid cursor",
  "errors": [
    {
      "message": "Invalid cursor",
      "location": "after"
    }
  ],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

401:

```json
{
  "name": "unauthorized",
  "status": 401,
  "message": "Unauthorized",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

403:

```json
{
  "name": "forbidden",
  "status": 403,
  "message": "This key cannot be used from 203.0.113.7",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

429:

```json
{
  "name": "rate_limit_exceeded",
  "status": 429,
  "message": "Too many attempts. Try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

500:

```json
{
  "name": "unknown_error",
  "status": 500,
  "message": "Something went wrong. Please try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```
