---
title: "Read a message"
method: GET
path: "/agents/{id}/messages/{messageId}"
tags: ["Messages"]
---

# Read a message

`GET /agents/{id}/messages/{messageId}`

## Request

- Base URL: `https://app.artil.ai/api`
- URL: `https://app.artil.ai/api/agents/{id}/messages/{messageId}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://mcp.artil.ai/oauth/authorize`
    - Token URL: `https://mcp.artil.ai/oauth/token` scopes: `agent`

Read a message the agent received or sent.

## Path parameters

- `id` string, uuid, required
- `messageId` string, required

## Response `200`

The message

- Message
  - `id` string, uuid, required
  - `addressId` string, uuid, required: The agent's address the message came to or went from
  - `channel` 'email' | 'sms' | 'telegram', required
  - `direction` 'inbound' | 'outbound', required
  - `counterpart` string, required: Who sent an inbound message, or the recipients of an outbound one
  - `counterpartName` string, nullable, required: The name an inbound message's sender goes by, when the channel tells it
  - `to` string[], required: Whom the message names as its recipients; an inbound one names the agent unless it got a blind copy
  - `cc` string[], required: Whom the message names as getting a copy
  - `subject` string, nullable, required
  - `text` string, required
  - `attachments` object[], required
    - `id` string, uuid, nullable, required: The file's id, to send it on in attachments; null when Artil kept only the file's description
    - `name` string, required
    - `type` string, required
    - `size` number, required
    - `url` string, nullable, required: Where to download the file: a link that needs no sign-in and expires after 15 minutes, so read the message again for a new one; null when Artil kept only the file's description
  - `thread` object, nullable, required: For received and imported email, its Message-ID and References; for email the agent sent, those of the email it answered
    - `messageId` string, required
    - `references` string[], required
  - `status` 'received' | 'refused' | 'sending' | 'sent' | 'failed' | 'imported' | 'reported', required: `reported` when the recipient marked an email the agent sent as spam
  - `refusal` 'self' | 'spam' | 'plan_limit' | 'rate_limit' | 'sender' | 'outsider' | 'unverified', nullable, required: Why a refused message did not wake the agent
  - `admission` 'team' | 'listed' | 'anyone', nullable, required: Who the sender of a received message is to the agent: `team` for a member or agent of the workspace, `listed` for a sender on the channel's list, and `anyone` for everyone else, including senders who could not be verified
  - `error` string, nullable, required: Why a failed message was not sent or did not arrive
  - `createdAt` string, date-time, required

## Other responses

- `4XX`: The request failed; the error says why
- `5XX`: The request failed; the error says why

---

[API](https://skmtc.dev/artil/apis/artil-api.md) - [All operations](https://skmtc.dev/artil/apis/artil-api/llms.txt) - [OpenAPI document](https://skmtc.dev/artil/apis/artil-api/revisions/55db0efa0cb8?raw)
