---
title: "Export a space as a zip of markdown files"
method: GET
path: "/api/spaces/{id}/export.zip"
tags: ["spaces"]
---

# Export a space as a zip of markdown files

`GET /api/spaces/{id}/export.zip`

## Request

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

One `.md` per page with canonical frontmatter, children nested in folders, attachments under `_attachments/`. The file name matches the page's sync filename, not its URL slug.

## Response `200`

Zip archive.

## 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).
- `404`: `not_found`.
- `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)
