Withdraw a send request that is awaiting approval
On this page
POST
/v1/send-requests/{send_request_id}/cancelcancel_send_request| Risk | write |
| Authentication | API key or OAuth access token |
| Scopes | mailings:write |
| Idempotency | natural: repeating the call gives the same result |
| Dry run | not applicable |
| Success status | 200 |
| Response type | application/json |
What it does#
- Use when: You asked to send a mailing, the author has not decided yet, and you want to withdraw the request, for example to edit the draft.
- Do not use when: the mailing is already sending or scheduled (call cancel_scheduled_mailing for a scheduled one).
- Side effects: Marks the request canceled; nothing is sent.
- Reversible: Yes, call request_send again with a new preview_token.
- Required scope: mailings:write.
- Idempotency: safe to repeat (same result).
- Typical next step: call update_mailing_draft, then preview_send.
Scopes#
mailings:write: Create, edit and delete draft mailings, and ask for a send to be approved.
Side effects#
- Marks the request canceled; nothing is sent
Request#
Path parameters#
| Field | Type | Description |
|---|---|---|
send_request_id | string |
Query parameters#
None.
Response#
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | srq_... |
mailing_id | string | yes | |
state | one of "awaiting_approval", "approved", "executed", "refused", "declined", "canceled", "superseded", "expired" | yes | |
mode | one of "now", "scheduled" | yes | |
scheduled_at | string or null | yes | |
recipient_count | integer, min -9007199254740991, max 9007199254740991 | yes | |
mailing_revision | integer, min -9007199254740991, max 9007199254740991 | yes | The mailing revision this request is bound to. An edit supersedes the request. |
requested_by | string | yes | The key or app name the author sees. |
reason_codes | array of string | yes | |
created_at | string | yes | RFC 3339 UTC timestamp. |
expires_at | string | yes | An undecided request expires after 7 days. |
decided_at | string or null | yes | |
executed_at | string or null | yes | |
preview | object or null | yes |
Examples#
canceled#
Request:
curl -X POST 'https://api.seemly.com/v1/send-requests/srq_7h2m9k4t8w3c5n6p1q0r2s4v/cancel' \
-H "Authorization: Bearer $SEEMLY_API_KEY"const response = await fetch("https://api.seemly.com/v1/send-requests/srq_7h2m9k4t8w3c5n6p1q0r2s4v/cancel", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SEEMLY_API_KEY}`,
},
});
const result = await response.json();
console.log(response.status, result);import os
import requests
response = requests.post(
"https://api.seemly.com/v1/send-requests/srq_7h2m9k4t8w3c5n6p1q0r2s4v/cancel",
headers={
"Authorization": f"Bearer {os.environ['SEEMLY_API_KEY']}",
},
)
print(response.status_code, response.json())Response: 200:
{
"id": "srq_7h2m9k4t8w3c5n6p1q0r2s4v",
"mailing_id": "cmp_4d8x2p0q7r4d8x2p0q7r4d8x",
"state": "canceled",
"mode": "now",
"scheduled_at": null,
"recipient_count": 212,
"mailing_revision": 3,
"requested_by": "Launch agent",
"reason_codes": [
"canceled"
],
"created_at": "2026-12-02T09:31:00Z",
"expires_at": "2026-12-09T09:31:00Z",
"decided_at": "2026-12-02T09:35:00Z",
"executed_at": null,
"preview": {
"decision": "allow",
"reasons": [],
"tranche_sizes": [],
"recipient_count": 212
}
}Errors#
Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.