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 if configured.
| Header | Required | Description |
|---|
X-API-Key | Yes | Your API key |
Path parameters
The unique ID of the screenshot to delete.
Response
200 OK
{
"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
}
}
Size of the deleted image file in bytes.
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
curl -X DELETE https://api.screenshotly.dev/v1/screenshots/67b8a1c2d3e4f5a6b7c8d9e0 \
-H "X-API-Key: $SCREENSHOTLY_API_KEY"