---
title: "Files attached to a page"
method: GET
path: "/api/pages/{id}/attachments"
tags: ["attachments"]
---

# Files attached to a page

`GET /api/pages/{id}/attachments`

## Request

- Base URL: `https://telawiki.com`
- URL: `https://telawiki.com/api/pages/{id}/attachments`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `tela_session`

Any space role may read. `embedded` says whether the page body actually references the file.

## Response `200`

Attachments, by name.

- object
  - `attachments` Attachment[], required
    - `id` integer, required
    - `name` string, required
    - `mime` string, required
    - `byte_size` integer, required
    - `hash` string, required: SHA-256 of the content, 64 lower-case hex characters.
    - `url` string, required: Relative path to the bytes: `/api/files/{space_id}/{hash}{ext}`.
    - `share_path` string, required: Relative path to the human-facing file page: `/f/{hash12}/{name}`.
    - `embedded` boolean, required: Whether the page body references this file.
    - `summary` string: Generated description, when one exists.

## Other responses

- `400`: `invalid_id` — a path parameter was not a positive integer.
- `403`: `forbidden` (no access, or the role is too low), `viewer_no_write`, `api_key_scope` (the token's scope forbids this method), or `api_key_space_scope` (the token is pinned to another space).
- `500`: `internal` — server error.

---

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