---
title: "Retrieve document metadata and base64-encoded content"
method: GET
path: "/documents/{document}"
tags: ["Documents"]
---

# Retrieve document metadata and base64-encoded content

`GET /documents/{document}`

## Request

- Base URL: `https://helpspot.example.com/api/v2`
- URL: `https://helpspot.example.com/api/v2/documents/{document}`
- Auth: one of:
  - HTTP bearer
  - HTTP basic

Returns document metadata and base64-encoded original file bytes in a `data` object. Use attachment IDs from request history. Access requires permission to the parent request or predefined response. Documents without either parent return **403**. `history_id` and `response_id` are nullable integer references; unset metadata is null. `content_base64` is an empty string for an empty file. Decode it as binary, not UTF-8 text. Storage paths and internal flags are not returned. XML uses `<response><data>…</data></response>`; null and empty strings use empty elements.

## Path parameters

- `document` integer, required

## Response `200`

Document metadata and base64-encoded content.

- object
  - `data` object, required
    - `id` integer, required
    - `history_id` integer, nullable, required
    - `response_id` integer, nullable, required
    - `filename` string, nullable, required
    - `mime_type` string, nullable, required
    - `content_id` string, nullable, required
    - `content_base64` string, byte, nullable, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `406`: Not Acceptable
- `413`: Content Too Large
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

---

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