Cancel or reschedule an email

Cancel or reschedule an email

PATCH/api/v1/email/{id}

PATCH /email/{id}
curl -X PATCH 'https://www.unitpost.com/api/v1/email/email_123' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "scheduled_at": null
  }'
Response · 200
{
  "object": "email",
  "id": "id_123",
  "to": [
    "customer@example.com"
  ],
  "from": "you@yourdomain.com",
  "subject": "Welcome to Acme",
  "template_id": "template_123",
  "campaign_id": "campaign_123",
  "status": "scheduled",
  "last_event": "string",
  "scheduled_at": "2026-01-01T00:00:00.000Z",
  "sent_at": "2026-01-01T00:00:00.000Z",
  "delivered_at": "2026-01-01T00:00:00.000Z",
  "opened_at": "2026-01-01T00:00:00.000Z",
  "clicked_at": "2026-01-01T00:00:00.000Z",
  "canceled_at": "2026-01-01T00:00:00.000Z",
  "last_error": "string",
  "created_at": "2026-01-01T00:00:00.000Z",
  "cc": [
    "string"
  ],
  "bcc": [
    "string"
  ],
  "reply_to": [
    "string"
  ],
  "tags": [
    {
      "name": "Example",
      "value": "string"
    }
  ]
}

Cancel a scheduled or queued email, or move it to a new send time. Only emails that haven't been handed off for delivery yet can be changed — once an email is sent this returns 409. Look up the email's current state first with Retrieve an email. Requires the emails:send capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Request body2 fields
FieldTypeDescription
cancelboolean—
scheduled_atstring—
Response · 200 fields21 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
torequiredstring[]—
fromrequiredstring—
subjectrequiredstring—
template_idrequiredstring | null—
campaign_idrequiredstring | null—
statusrequiredenumscheduled | queued | sent | delivered | bounced | complained | canceled | failed—
last_eventrequiredstring—
scheduled_atrequiredstring | null—
sent_atrequiredstring | null—
delivered_atrequiredstring | null—
opened_atrequiredstring | null—
clicked_atrequiredstring | null—
canceled_atrequiredstring | null—
last_errorrequiredstring | null—
created_atrequiredstring—
ccstring[]Cc recipients, as sent. Empty when none. Only on `GET /email/{id}`.
bccstring[]Bcc recipients, as sent. Empty when none. Only on `GET /email/{id}`.
reply_tostring[]Reply-To addresses, as sent. Empty when none. Only on `GET /email/{id}`.
tagsobject[]The send's tags. Empty when none. Only on `GET /email/{id}`.
200401403404409422

Search docs and guides

Search the docs and product guides.