Cancel a scheduled email
POST/v1/emails/{id}/cancel
Stops a scheduled email before it is sent and gives its quota back. A message that is already on its way cannot be cancelled.
Required scope: emails:send
Parameters
| Name | In | Description |
|---|---|---|
idrequired | path | The email id. |
Example
curl -X POST 'https://api.sendsend.email/v1/emails/ID/cancel' \
-H "Authorization: Bearer $SENDSEND_API_KEY"Response 200
{
"id": "msg_8Xk2…",
"status": "cancelled"
}Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | No such resource in this project. |
| 409 | not_schedulable | The email is not scheduled any more (sent, already cancelled or on its way). |
| 401 | unauthorized | The API key is missing, invalid or revoked. |
| 403 | forbidden | The key does not have the scope this endpoint needs. |
Every error has the same shape. See Errors.