Skip to main content

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.

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key

Path parameters

screenshotId
string
required
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
  }
}
data.deletedSize
number
Size of the deleted image file in bytes.

Error responses

StatusCodeDescription
401missing_api_key / invalid_api_keyInvalid or missing API key
403forbiddenYou don’t own this screenshot
404not_foundScreenshot ID doesn’t exist

Example

curl -X DELETE https://api.screenshotly.dev/v1/screenshots/67b8a1c2d3e4f5a6b7c8d9e0 \
  -H "X-API-Key: $SCREENSHOTLY_API_KEY"