Delete a media file

Delete one media file. The file is removed from storage; pages that referenced its URL will show a broken asset until edited.

DELETE https://sitepaste.com/api/v1/public/media/{fileId}

Requires the media scope. For several files at once, use DELETE /media.

Usage

curl -X DELETE "https://sitepaste.com/api/v1/public/media/abc123.jpg" \
  -H "Authorization: Bearer $TOKEN"

Authorizations

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication.

Response

204 No Content.

404 when no file in your workspace has that id.