---
title: "Detach a file from a page"
method: DELETE
path: "/api/pages/{id}/attachments/{file_id}"
tags: ["attachments"]
---

# Detach a file from a page

`DELETE /api/pages/{id}/attachments/{file_id}`

## Request

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

`editor+`. Soft delete.

## Response `204`

Deleted.

## 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)
