Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / Emails

Cancel a scheduled email

POST/v1/emails/{id}/cancel

Cancel a scheduled email before it is dispatched.

Requires a full-access or sending-access key.

Path parameters

idstringrequired
Scheduled email id

Errors

restricted_api_keyHTTP 403
this API key cannot manage this email (another domain or stream, or live mail with a test key)
not_cancellableHTTP 409
unknown id, already dispatched or already canceled
POST/v1/emails/{id}/cancel
curl -X POST 'https://zapsmtp.xyz/v1/emails/019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23/cancel' \
  -H "Authorization: Bearer $ZAP_API_KEY"
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "email",
  "id": "019a1f40-2b3c-7d4e-8f5a-6b7c8d9e0f12",
  "status": "canceled"
}