---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.2
alternate:
  - https://yandex.ru/support/wiki/en/api-ref/attachments/pagesattachments__delete_attach.md
  - https://yandex.ru/support/wiki/ru/api-ref/attachments/pagesattachments__delete_attach.md
  - href: https://yandex.ru/support/wiki/ru/api-ref/attachments/pagesattachments__delete_attach.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/support/wiki/ru/llms.txt?revision=r21947862
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/wiki/ru/llms.txt?revision=r21947862

<div class="openapi">

# Удалить прикрепленный файл

<!-- markdownlint-disable-file -->

Удаляет прикрепленный файл. Удаление доступно загрузившему файл пользователю или пользователю с
правом управления доступами страницы. Также требуется доступ к чтению страницы.

Общие заголовки и способы аутентификации описаны в разделе [Доступ к API](https://yandex.ru/support/wiki/ru/api-ref/access.md#headers). Примеры сценариев приведены в разделе [Примеры использования API](https://yandex.ru/support/wiki/ru/api-ref/examples.md).

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-delete);margin-bottom: 12px">

<div class="openapi__request">

DELETE {.openapi__method}
```text translate=no
https://api.wiki.yandex.net/v1/pages/{idx}/attachments/{file_id}
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_file_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор прикрепленного файла на указанной странице. Передайте поле `id` элемента `results` из ответа `GET /v1/pages/{idx}/attachments`.
{.table-cell}
||
||

_idx_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор страницы. Значение `idx` совпадает со значением поля `id` в ответе `GET /v1/pages?slug=…` или `POST /v1/pages`.
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__204">

## 204 No Content

No Content

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{}
```

{% endcut %}

#|
|| **Name** | **Description** ||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.