# GET /mail/queue/{id}

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the mail group.

Get a queued Postfix message and its delivery logs

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

Returns the queued message in message with its log details, including each delivery attempt and the remote server's reply, the next hop and the log lines. The response includes the subject when mail.log_subjects is enabled.

The id must contain 6 to 20 uppercase hexadecimal characters. An invalid id returns 400. 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.

## Parameters

- `id` (path, string, matching ^[A-F0-9]{6,20}$, required)

## 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/1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "message": {
    "attempt_count": 1,
    "attempts": [
      {
        "at": "text",
        "delay": 1,
        "dsn": "text",
        "relay": "text",
        "reply": "text",
        "status": "active",
        "to": "text"
      }
    ],
    "hops": [
      "text"
    ],
    "last_at": "text",
    "last_reply": "text",
    "last_status": "text",
    "log_lines": [
      "text"
    ],
    "message": {
      "arrival_time": 1,
      "forced_expire": 1,
      "id": 1,
      "queue": "text",
      "recipients": [
        {
          "address": "info@example.com",
          "delay_reason": "text"
        }
      ],
      "sender": "text",
      "size": 1
    },
    "next_hop": "text",
    "read_at": "text",
    "subject": "text",
    "subjects_logged": true
  }
}
```

## Errors

- 400: A queue id is 6 to 20 uppercase hexadecimal characters
- 401: Authentication required
- 404: Message <id> is not in the queue
