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

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

Requires the `media` scope. For several files at once, use [DELETE /media](/api/media/delete-media).

## Usage

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

## Authorizations

| Header | Type | Required | Description |
|--------|------|----------|-------------|
| Authorization | string | Yes | Bearer token (`Authorization: Bearer sp_...`). Created in the dashboard under Account > Tokens. See [authentication](/api/authentication). |

## Response

204 No Content.

404 when no file in your workspace has that id.