---
title: Messages
---

## Get Message Attachment
Agentry API endpoint.
**Endpoint**: `GET /human/v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `attachment_id` | path | string | Yes |  |
| `inbox_id` | path | string | Yes |  |
| `message_id` | path | string | Yes |  |

### Responses

#### `200`

Successful response

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `attachment_id` | string | Yes | ID of attachment. |
| `content_disposition` | `inline` \| `attachment` | No | Content disposition of attachment. |
| `content_id` | string | No | Content ID of attachment. |
| `content_type` | string | No | Content type of attachment. |
| `download_url` | string | Yes | URL to download the attachment. |
| `expires_at` | string | Yes | Time at which the download URL expires. |
| `filename` | string | No | Filename of attachment. |
| `size` | integer | Yes | Size of attachment in bytes. |

##### Example

```json
{
  "attachment_id": "<string>",
  "content_disposition": "inline",
  "content_id": "<string>",
  "content_type": "<string>",
  "download_url": "<string>",
  "expires_at": "2026-01-01T00:00:00Z",
  "filename": "<string>",
  "size": 0
}
```


## Get Message Context
Agentry API endpoint.
**Endpoint**: `GET /human/v0/inboxes/{inbox_id}/messages/{message_id}/context`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `inbox_id` | path | string | Yes |  |
| `message_id` | path | string | Yes |  |

### Responses

#### `200`

Successful response

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `context` | object | Yes |  |
| `deep_context_credits_consumed` | integer | Yes |  |
| `inbox_id` | string | Yes |  |
| `message_id` | string | Yes |  |

##### Example

```json
{
  "context": {},
  "deep_context_credits_consumed": 0,
  "inbox_id": "<string>",
  "message_id": "<string>"
}
```


## Get Message Raw
Agentry API endpoint.
**Endpoint**: `GET /human/v0/inboxes/{inbox_id}/messages/{message_id}/raw`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `inbox_id` | path | string | Yes |  |
| `message_id` | path | string | Yes |  |

### Responses

#### `200`

Successful response

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `download_url` | string | Yes | S3 presigned URL to download the raw message. Expires at expires_at. |
| `expires_at` | string | Yes | Time at which the download URL expires. |
| `message_id` | string | Yes | ID of message. |
| `size` | integer | Yes | Size of message in bytes. |

##### Example

```json
{
  "download_url": "<string>",
  "expires_at": "2026-01-01T00:00:00Z",
  "message_id": "<string>",
  "size": 0
}
```


## Send Message
Agentry API endpoint.
**Endpoint**: `POST /human/v0/inboxes/{inbox_id}/messages/send`
**Authentication**: `Authorization: Bearer <token>`
### Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `inbox_id` | path | string | Yes |  |

### Request Body
Content-Type: `application/json`
#### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bcc` | object | No |  |
| `cc` | object | No |  |
| `draft_only` | boolean | No |  |
| `headers` | object | No |  |
| `markdown_body` | string | Yes |  |
| `subject` | string | No |  |
| `to` | object | Yes |  |

#### Example

```json
{
  "bcc": null,
  "cc": null,
  "draft_only": true,
  "headers": {},
  "markdown_body": "<string>",
  "subject": "<string>",
  "to": null
}
```

### Responses

#### `200`

Successful response

Content-Type: `application/json`

##### Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `draft_only` | boolean | Yes |  |
| `inbox_id` | string | Yes |  |
| `status` | `draft_created` \| `sent` | Yes |  |

##### Example

```json
{
  "draft_only": true,
  "inbox_id": "<string>",
  "status": "draft_created"
}
```

