> ## Documentation Index
> Fetch the complete documentation index at: https://docs.screenshotly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete screenshot

> DELETE /v1/screenshots/{screenshotId} — permanently delete a screenshot and its image.

## Endpoint

```
DELETE https://api.screenshotly.dev/v1/screenshots/{screenshotId}
```

Deletes the screenshot record and removes the image from storage. This action triggers a `screenshot.deleted` [webhook event](/guides/webhooks) if configured.

## Headers

| Header      | Required | Description  |
| ----------- | -------- | ------------ |
| `X-API-Key` | Yes      | Your API key |

## Path parameters

<ParamField path="screenshotId" type="string" required>
  The unique ID of the screenshot to delete.
</ParamField>

## Response

### 200 OK

```json theme={null}
{
  "success": true,
  "message": "Screenshot successfully deleted",
  "data": {
    "_id": "67b8a1c2d3e4f5a6b7c8d9e0",
    "url": "https://example.com",
    "status": "completed",
    "isDeleted": true,
    "deletedAt": "2025-05-15T08:00:00.000Z",
    "deletedSize": 245760
  }
}
```

<ResponseField name="data.deletedSize" type="number">
  Size of the deleted image file in bytes.
</ResponseField>

### Error responses

| Status | Code                                  | Description                   |
| ------ | ------------------------------------- | ----------------------------- |
| 401    | `missing_api_key` / `invalid_api_key` | Invalid or missing API key    |
| 403    | `forbidden`                           | You don't own this screenshot |
| 404    | `not_found`                           | Screenshot ID doesn't exist   |

## Example

```bash theme={null}
curl -X DELETE https://api.screenshotly.dev/v1/screenshots/67b8a1c2d3e4f5a6b7c8d9e0 \
  -H "X-API-Key: $SCREENSHOTLY_API_KEY"
```
