# GET /mail/queue

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

List messages in the Postfix queue

- Who may call it: administrator
- Token scope, any of: mail, read, all
- Answers: 200 OK

Returns all messages waiting in the Postfix queue in queue, with each message's sender, recipients and any reasons for delay. Requires an administrator token with the mail scope.

## As a command

- [urbestack-mail-queue-list](https://urbestack.com/docs/commands/urbestack-mail-queue-list.md): Lists every message waiting in the Postfix queue, with its sender, recipients and any delay reasons.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/mail/queue" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "queue": {
    "available": 1,
    "count": 1,
    "error": "Domain 'example.com' already exists",
    "queue": [
      {
        "arrival_time": 1,
        "forced_expire": 1,
        "id": 1,
        "queue": "text",
        "recipients": [
          {
            "address": "info@example.com",
            "delay_reason": "text"
          }
        ],
        "sender": "text",
        "size": 1
      }
    ],
    "read_at": "text"
  }
}
```

## Errors

- 401: Authentication required
- 404: Message <id> is not in the queue
