# Get a message

**`GET https://myagentmail.com/v1/inboxes/{id}/messages/{messageId}`**

Group: Messages
Operation ID: `getMessage`

Returns full bodies plus attachment metadata. Also marks the message as read.

## Path parameters

- `id` (string, required) — Inbox UUID
- `messageId` (string, required) — Message UUID

## Responses

### 200 — OK

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "direction": "inbound",
  "from": "string",
  "to": "string",
  "subject": "string",
  "plainBody": "string",
  "htmlBody": "string",
  "isRead": false,
  "threadId": "00000000-0000-0000-0000-000000000000",
  "messageIdHeader": "string",
  "inReplyTo": "string",
  "receivedAt": "2026-05-01T08:11:44.583Z",
  "attachments": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "filename": "string",
      "contentType": "application/pdf",
      "sizeBytes": 0
    }
  ]
}
```

## Code samples

### TypeScript

```typescript
import { MyAgentMail } from "myagentmail";

const client = new MyAgentMail({ apiKey: process.env.MYAGENTMAIL_API_KEY! });

// GET /v1/inboxes/{id}/messages/{messageId}
const result = await client.request("get", "/v1/inboxes/{id}/messages/{messageId}", { params: { id: "00000000-0000-0000-0000-000000000000", messageId: "00000000-0000-0000-0000-000000000000" } });
```

### curl

```bash
curl -X GET 'https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000/messages/00000000-0000-0000-0000-000000000000' \
  -H 'X-API-Key: $MYAGENTMAIL_API_KEY'
```

### Python

```python
import os, requests

r = requests.get(
    "https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000/messages/00000000-0000-0000-0000-000000000000",
    headers={"X-API-Key": os.environ["MYAGENTMAIL_API_KEY"]},
)
r.raise_for_status()
print(r.json())
```
