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

string required
OR
string required

Response

OK

idstring required

Unique identifier of the attachment

filenamestring required

Original filename of the attachment

mimeTypestring 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.

textstring 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.

Changes

No recorded changes to this operation across all 1 revision of this API.