---
title: "GET /attachments/{id}/text"
method: GET
path: "/attachments/{id}/text"
---

# GET /attachments/{id}/text

`GET /attachments/{id}/text`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/attachments/{id}/text`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Path parameters

- `id` union, required: Unique attachment identifier
  - string
  - string

## Response `200`

OK

- object: Text extracted from a PDF, DOCX, or plain-text attachment
  - `id` string, required: Unique identifier of the attachment
  - `filename` string, required: Original filename of the attachment
  - `mimeType` string, required: Declared MIME type of the attachment
  - `status` 'PENDING' | 'EXTRACTED' | 'UNSUPPORTED' | 'FAILED', required: Outcome of extraction. EXTRACTED: `text` holds the content (possibly an empty string — a scanned PDF with no text layer extracts to nothing). UNSUPPORTED: no extractor for this file type; only PDF, DOCX, and plain-text formats are supported. FAILED: the bytes could not be parsed (malformed, encrypted, or too large). UNSUPPORTED and FAILED are final — the file never changes, so retrying returns the same answer. PENDING is never returned; it is the pre-extraction state of the stored row.
  - `text` string, nullable, required: Extracted plain text, or null unless `status` is EXTRACTED. Truncated at 1,000,000 characters. Extracted once and cached, so repeat reads are free.

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
