---
search:
  tags:
    - Emails
    - GET
seo:
  description: >-
    The text of a PDF, Word (.docx) or Excel (.xlsx)… Reference for the GET
    /emails/receiving/{email_id}/attachments/{id}/text endpoint in the
    BillionSend API.
sidebar:
  label: Get an attachment's text
  badge: GET
title: Get an attachment's text
type: openapi-operation
---
The text of a PDF, Word (.docx) or Excel (.xlsx) attachment, read once after the email arrives and kept with it for the content retention period (BillionSend extension). Until the read has run the status is pending. Needs a full access key. An email that carries malware answers 410.

`GET /emails/receiving/{email_id}/attachments/{id}/text`

**Responses**

- `200` — Attachment text
- `401` — Missing, malformed, unknown or revoked API key
- `403` — Restricted API key
- `404` — Not found
- `410` — The email carries malware
- `429` — Over the rate limit (rate\_limit\_exceeded, with Retry-After)

Response example, 200:

```json
{
  "object": "attachment_text",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "filename": "string",
  "status": "pending",
  "flags": [
    "truncated"
  ],
  "pages": 0,
  "text": "string"
}
```
