Skip to content

Delete a workspace page attachment ​

DELETE/api/v2/workspaces/{slug}/pages/{page_id}/attachments/{pk}/

Delete an attachment from a wiki page. A successful delete returns 204 with an empty body. After that, every read of the attachment, including its download, returns 404.

The delete works on confirmed and unconfirmed attachments alike, so you can also use it to clean up an upload you started and didn't finish. It doesn't edit the page body. If description_html still references the file, that reference stays.

The page must be active and unlocked, and you need edit access to it. See Locked and archived pages.

Path Parameters ​

slug:requiredstring

The workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.

page_id:requiredstring (uuid)

The wiki page the attachment belongs to.

pk:requiredstring (uuid)

The id of the attachment to delete.

Scopes ​

wiki.pages:write

Errors ​

StatusCodeCause
400invalid_requestThe page is locked or archived.
401unauthorizedMissing or invalid credentials.
402payment_requiredThe feature this endpoint belongs to isn't enabled on your plan, or is switched off.
403forbiddenYour role or token scope can't edit this page, or the page is private and you lack Edit access to it.
404not_foundNo such wiki page or attachment, the attachment is on another page, or it was already deleted.
406not_acceptableThe Accept header asks for a representation the API can't produce.
409conflictAll write endpoints declare this status. This endpoint has no conflict case of its own.
413payload_too_largeThe request body is over the size limit.
415unsupported_media_typeThe Content-Type isn't one this endpoint accepts.
429rate_limitedThrottled. Honor the Retry-After header before retrying.
Delete a workspace page attachment
bash
curl -X DELETE \
  "https://api.plane.so/api/v2/workspaces/my-team/pages/9c1f0b3d-6d2e-4c9a-8b41-2f7e5a0d6c88/attachments/8f4c2b1e-0d3a-4f7b-9c21-6e5a8b7d4f13/" \
  -H "X-Api-Key: $PLANE_API_KEY"
Response204

No response body.

Response400
json
{
  "type": "invalid_request",
  "code": "invalid_request",
  "detail": "Page is locked."
}