---
title: "Read an attachment as text/base64 (agent-friendly)"
method: GET
path: "/tasks/{taskId}/attachments/{attachmentId}/content"
tags: ["Attachments"]
---

# Read an attachment as text/base64 (agent-friendly)

`GET /tasks/{taskId}/attachments/{attachmentId}/content`

## Request

- Base URL: `https://tasg.app/api/v1`
- URL: `https://tasg.app/api/v1/tasks/{taskId}/attachments/{attachmentId}/content`
- Auth: HTTP bearer

Text and CSV are returned verbatim, PDFs are text-extracted, images are base64; other types are reported as unsupported.

## Path parameters

- `taskId` string, uuid, required
- `attachmentId` string, uuid, required

## Response `200`

Extracted content.

- object
  - `id` string, uuid, required
  - `filename` string, required
  - `mime_type` string, required
  - `file_size` integer: Bytes.
  - `kind` string: `text`, `image`, `unsupported` …
  - `content` string, nullable
  - `truncated` boolean

## Other responses

- `401`: Missing, invalid, expired or revoked credentials.
- `403`: Authenticated, but not allowed: not a member, insufficient project role or the API token lacks the required scope.
- `404`: Not found, or not visible to the caller (tenancy is enforced: foreign resources look identical to missing ones).
- `422`: The file exists but its content could not be extracted.
- `429`: Rate limited. Back off and retry after the window in the `RateLimit-*` headers.

---

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