# List queued messages for a session

`GET /o/{org}/p/{project}/sessions/{session}/queued-messages`

Returns all non-delivered queued messages ordered by position.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org` | path | string | yes | The org's slug or id. A caller with no role in the org gets `404`. |
| `project` | path | string | yes | A Project's handle (name) or id, resolved inside `{org}` — OR the reserved sentinel `_` meaning "no Project" (a direct-repo / repo-less dispatch on `POST`; "no Project constraint, resolve by session id alone" everywhere else). A real handle that doesn't match the session's actual Project is `404`.  |
| `session` | path | string | yes | The session's full id (`execution_id`). |

## Example request

```bash
curl "https://api.prix.dev/o/$RUSH_ORG/p/_/sessions/$SESSION_ID/queued-messages" \
  -H "Authorization: Bearer $RUSH_API_KEY"
```

```typescript
const org = process.env.RUSH_ORG;
const sessionId = process.env.SESSION_ID;

const res = await fetch(`https://api.prix.dev/o/${org}/p/_/sessions/${sessionId}/queued-messages`, {
  headers: {
    Authorization: `Bearer ${process.env.RUSH_API_KEY}`,
  },
});

console.log(res.status, await res.json());
```

```python
import os

import requests

org = os.environ["RUSH_ORG"]
session_id = os.environ["SESSION_ID"]

res = requests.get(
    f"https://api.prix.dev/o/{org}/p/_/sessions/{session_id}/queued-messages",
    headers={"Authorization": f"Bearer {os.environ['RUSH_API_KEY']}"},
)

print(res.status_code, res.json())
```

## Responses

### 200

The queued message list.

- `messages` (array of QueuedMessage, required)
  - `id` (string, required)
  - `execution_id` (string, required)
  - `user_id` (string, required)
  - `content` (string, required)
  - `status` (string, required, one of `queued`, `delivering`, `delivered`, `failed`)
  - `position` (integer, required): 1-based FIFO position.
  - `created_at` (string, required)
  - `claimed_at` (string | null, optional)
  - `delivered_at` (string | null, optional)
  - `error` (string | null, optional): Delivery failure reason (set on failed status).
  - `attempt_count` (integer, required): Number of delivery attempts.

### 401

No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.

### 404

No such resource for the caller, including one that exists in an org the caller cannot see.

## Example response (200)

```json
{
  "messages": [
    {
      "id": "3f6c1e2a-8b4d-4c1e-9a7f-2d5b6e8c0a14",
      "execution_id": "string",
      "user_id": "string",
      "content": "string",
      "status": "queued",
      "position": 0,
      "created_at": "2026-10-06T12:00:00Z",
      "claimed_at": "2026-10-06T12:00:00Z",
      "delivered_at": "2026-10-06T12:00:00Z",
      "error": "string",
      "attempt_count": 0
    }
  ]
}
```
