---
title: "Every file in a space"
method: GET
path: "/api/spaces/{id}/files"
tags: ["spaces", "attachments"]
---

# Every file in a space

`GET /api/spaces/{id}/files`

## Request

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

Wider than the per-page listing: it also reaches files parented to the space root, which no page lists — the ones a sync or import drops beside the tree. Capped at 500 rows.

## Query parameters

- `parent_page_id` string

## Response `200`

Files. `truncated` is true when the 500-row cap was hit.

- object
  - `files` SpaceFile[], 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.
    - `parent_page_id` integer: Absent when the file sits at the space root.
    - `parent_title` string: Absent when the file sits at the space root.
  - `truncated` boolean, required

## Other responses

- `400`: Malformed request. `code` is usually `bad_request` or `invalid_json`.
- `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)
