# Retrieve a transactional message

`GET /v1/transactional/messages/{id}`

Requires an API key with the `messages:read` scope. [About keys and scopes](/docs/api/authentication)

The current outcome of a message this workspace sent through the transactional endpoint: queued, sent, delivered, bounced, failed or skipped, with the reason. Prefer the `message.*` webhooks to polling. Needs `messages:read`, which the `transactional` and `read_only` presets include; it grants no sending.

## Path parameters

- `id` (string, required, uuid)

## Returns

Returns `200 OK` with a `TransactionalMessageDetail` in `data`. Otherwise returns an error; [Errors](/docs/api/errors) lists every code and which to retry.

- `id` (string, required, uuid)
- `contactId` (string | null, required, uuid) — Null when the contact was erased, or the message passed the retention period: the message no longer names anyone.
- `recipientAddress` (string | null, required) — The address an email went to, frozen at its first attempt; null for push, and until then.
- `channel` (string, required, one of `email`, `push`)
- `status` (string, required, one of `queued`, `sending`, `skipped`, `sent`, `failed`, `delivered`, `bounced`, `complained`)
- `failureReason` (string | null, required) — Why it failed or was skipped, e.g. `suppressed`, `consent_missing`, `provider_rejected`.
- `correlationId` (string | null, required) — The `correlationId` given when it was sent, if any.
- `template` (object | null, required) — The stored template and published version it was sent from; null for inline content. Messages sent before template versions carry `version: null`.
  - `id` (string, required, uuid)
  - `version` (integer | null, required, min > 0, max 9007199254740991)
- `createdAt` (string, required, date-time)
- `sendAt` (string | null, required, date-time) — When a timed email goes out; null when it went at once.
- `sentAt` (string | null, required, date-time) — When it was handed to the provider.
- `deliveredAt` (string | null, required, date-time) — When the provider confirmed delivery.
- `failedAt` (string | null, required, date-time) — When it failed or was skipped (a cancelled send included).
- `openedAt` (string | null, required, date-time) — First open; only with `tracking.opens`.
- `clickedAt` (string | null, required, date-time) — First click; only with `tracking.clicks`.

## Example

```bash
curl https://api.kirora.io/v1/transactional/messages/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```

Response `200`:

```json
{
  "data": {
    "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
    "contactId": "018f2a4e-6b1c-7d3e-9f40-4db757ce5a6b",
    "recipientAddress": "recipientAddress_example",
    "channel": "email",
    "status": "queued",
    "failureReason": "failureReason_example",
    "correlationId": "order-1001",
    "template": {
      "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
      "version": 1
    },
    "createdAt": "2030-03-14T09:30:00Z",
    "sendAt": "2030-03-14T09:30:00Z",
    "sentAt": "2030-03-14T09:30:00Z",
    "deliveredAt": "2030-03-14T09:30:00Z",
    "failedAt": "2030-03-14T09:30:00Z",
    "openedAt": "2030-03-14T09:30:00Z",
    "clickedAt": "2030-03-14T09:30:00Z"
  }
}
```
