Easymailing
Email sends

Cancel a queued email

PUT /email_sends/{uuid}/actions/cancel

PUT/email_sends/{uuid}/actions/cancel

Stops an email that has not started to leave. It never goes out and its stored body is deleted.

When to use: When the user changes their mind about an email that is queued or scheduled (cancellable is true), or to reschedule it: cancel, then schedule_email again.

When not to use: To stop every pending email at once, use cancel_all_email_sends; for the emails of a batch, cancel_email_batch. An email that is sending or sent cannot be recalled. To keep the text to edit it, call reopen_email_send first.

Side effects: The recipients never receive the email. The user's pending-send notification, if any, is withdrawn.

Permissions: Requires a CRM seat and the crm.contacts_companies.write capability. Only the author of the send can do it.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

uuid*string

UUID of the send.

Formatuuid

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X PUT "https://api.easymailing.com/email_sends/3a9e1f54-0000-4000-8000-6c474d08b1a5/actions/cancel" \  -H "X-Auth-Token: YOUR_API_KEY"
{  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "state": "queued",  "failure_reason": "rejected",  "release_at": "2019-08-24T14:15:22Z",  "scheduled_at": "2019-08-24T14:15:22Z",  "sender_uuid": "6fd60e87-ecde-4069-8fdb-aebbacafea6d",  "sender_address": "user@example.com",  "contact": "/entity/1",  "record": "/entity/1",  "record_type": "contact",  "record_name": "string",  "mode": "compose",  "subject": "string",  "to": [    "string"  ],  "cc": [    "string"  ],  "bcc": [    "string"  ],  "recipients": [    {}  ],  "batch": "/entity/1",  "created_at": "2019-08-24T14:15:22Z",  "sent_at": "2019-08-24T14:15:22Z",  "failed_at": "2019-08-24T14:15:22Z",  "canceled_at": "2019-08-24T14:15:22Z",  "cancellable": true,  "retryable": true,  "copy_visible": true}