---
title: "Get an email attachment"
method: GET
path: "/api/v1/inbox/messages/{messageId}/attachments/{attachmentId}"
tags: ["Inbox"]
---

# Get an email attachment

`GET /api/v1/inbox/messages/{messageId}/attachments/{attachmentId}`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/inbox/messages/{messageId}/attachments/{attachmentId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Returns an attachment's name, type, and size, with short-lived links to its bytes and, when available, its extracted text.

## Path parameters

- `messageId` string, required
- `attachmentId` string, required

## Query parameters

- `excludeInternal` 'true' | 'false'

## Response `200`

The attachment links.

## Other responses

- `401`: Authentication is missing or invalid.
- `403`: The caller is not permitted to perform this action.
- `404`: The resource was not found.
- `429`: Too many requests; retry after the indicated delay.

---

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