# emailMessage query


`emailMessage` is a GraphQL query of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Returns one message by its MAX id. Use it to follow a message's delivery after
[`sendEmail`](/chameleoon-max/mutation/send-email).

- Requires the `email.read` permission, with every record the message is linked to in your API
  key's scope (see [`EmailMessage`](/chameleoon-max/type/email-message)).
- `NOT_FOUND` when the message does not exist or your API key may not read it.

## Arguments

- `id`: [`UUID!`](/chameleoon-max/type/uuid) · required

## Returns

[`EmailMessage!`](/chameleoon-max/type/email-message)

## Example

**Query**

```graphql
query emailMessage($id: UUID!) {
  emailMessage(id: $id) {
    id
    status
    senderId
    fromAddress
    fromName
    replyTo
    to
    cc
    bcc
    subject
    htmlBody
    textBody
    templateCode
    language
    variantLanguage
    isTest
    attempts
    lastError
    providerMessageId
    queuedAt
    sentAt
    failedAt
    links(first: 10) {
      totalCount
    }
    attachments(first: 10) {
      totalCount
    }
  }
}
```

**Variables**

```json
{
  "id": "00000000-0000-4000-8000-000000000001"
}
```

**Response**

```json
{
  "data": {
    "emailMessage": {
      "id": "00000000-0000-4000-8000-000000000001",
      "status": "QUEUED",
      "senderId": "00000000-0000-4000-8000-000000000001",
      "fromAddress": "example",
      "fromName": "example",
      "replyTo": "example",
      "to": [
        "example"
      ],
      "cc": [
        "example"
      ],
      "bcc": [
        "example"
      ],
      "subject": "example",
      "htmlBody": "example",
      "textBody": "example",
      "templateCode": "example",
      "language": "example",
      "variantLanguage": "example",
      "isTest": true,
      "attempts": 1,
      "lastError": "example",
      "providerMessageId": "example",
      "queuedAt": "2026-01-01T00:00:00Z",
      "sentAt": "2026-01-01T00:00:00Z",
      "failedAt": "2026-01-01T00:00:00Z",
      "links": {
        "totalCount": 1
      },
      "attachments": {
        "totalCount": 1
      }
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
