Cancel a scheduled email
POST/v1/emails/{id}/cancel
Withdraws an email sent with scheduled_at before it leaves. Its status becomes canceled, the money held for it is released, any free allowance it used is given back, and it no longer counts toward today's sending limit. An email already sent, or leaving at this moment, cannot be cancelled.
Parameters
| Name | In | Description |
|---|---|---|
| idrequired | path |
Example
curl -X POST https://api.woyra.io/v1/emails/email_01J.../cancel \
-H "Authorization: Bearer $WOYRA_KEY"Response
200 The cancelled email.
| Field | Type | Description |
|---|---|---|
| objectrequired | "email" | |
| idrequired | string | |
| statusrequired | string | One of accepted, scheduled, queued, sent, delivered, undelivered, failed, suppressed, canceled. |
| torequired | string | The one address this copy went to. |
| fromrequired | string | |
| subjectrequired | string | |
| created_atrequired | timestamp | |
| scheduled_at | timestamp | When a scheduled email leaves. Absent once it has. |
| recipients | array of object | On the answer to a send with more than one recipient: one copy per person, each its own email with its own id, status and webhooks. The first is this email. |
| recipients.to | string | |
| recipients.id | string | |
| recipients.status | string | |
| events | array of EmailEvent | On GET /v1/emails/{id}: every status the email has had, oldest
first, so a support ticket can be answered from one request. |
| metadata | object | |
| thread_id | string | The conversation this email belongs to, readable at /v1/emails/threads/{thread_id}. |
| in_reply_to | string | The email this one answers, when it was sent as a reply. |
| route | RouteDecision | Which carrier carried this message, why it was chosen, and what it cost. No other provider shows this. |
| error | ErrorSummary | The canonical failure reason, normalised across every carrier. |
Errors
Also in Emails
- GET /v1/emails — List emails
- POST /v1/emails — Send an email
- GET /v1/emails/{id} — Retrieve an email
- POST /v1/emails/batch — Send a batch of emails
- GET /v1/templates — List templates
- POST /v1/templates — Save an email template
- GET /v1/templates/{id} — Retrieve a template
- PATCH /v1/templates/{id} — Change a template
- DELETE /v1/templates/{id} — Delete a template
- GET /t/o/{token} — Open tracking image
- GET /t/c/{token} — Click tracking redirect
- GET /v1/emails/inbound — Mail received on your domains
- GET /v1/emails/inbound/{id} — Retrieve a received email
- GET /v1/emails/inbound/{id}/attachments/{attachment_id} — Download an attachment
- GET /v1/emails/threads/{id} — A conversation