Skip to content

Preview what a send would do

On this page
POST/v1/mailings/{mailing_id}/send-previewpreview_send
Riskread
AuthenticationAPI key or OAuth access token
Scopesmailings:read
Idempotencynatural: repeating the call gives the same result
Dry runnot applicable
Success status200
Response typeapplication/json

What it does#

  • Use when: A mailing draft is ready and you want the recipient count, the deliverability decision, tranche sizes, quota effect and a preview_token for request_send.
  • Do not use when: you want to send (call request_send with the token this returns).
  • Side effects: None.
  • Reversible: Not applicable, nothing changes.
  • Required scope: mailings:read.
  • Idempotency: safe to repeat.
  • Typical next step: call request_send with preview_token and an Idempotency-Key.

Scopes#

  • mailings:read: Read mailings and preview what a send would do.

Request#

Path parameters#

FieldTypeDescription
mailing_idstring

Query parameters#

None.

Response#

FieldTypeRequiredDescription
mailing_idstringyes
mailing_revisioninteger, min -9007199254740991, max 9007199254740991yes
mailing_statusstringyes
recipient_countinteger, min -9007199254740991, max 9007199254740991yesConfirmed subscribers this mailing would reach right now.
decisionone of "allow", "stage", "hold", "refused", "not_sendable"yesallow: sends as planned. stage: sends in tranches. hold: the owner reviews it first. refused: cannot be sent as it is. not_sendable: the mailing is not a draft.
reasonsarray of objectyesWhy the decision is not allow. Empty when it is allow.
reasons[].codestringyesStable reason code. Branch on this.
reasons[].sentencestringyesThe sentence the author sees in the dashboard for the same reason.
tranche_sizesarray of integer, min -9007199254740991, max 9007199254740991yesRecipients per tranche when the decision is stage.
quota_effectobjectyes
quota_effect.recipientsinteger, min -9007199254740991, max 9007199254740991yes
quota_effect.sent_todayinteger, min -9007199254740991, max 9007199254740991yes
quota_effect.daily_capinteger, min -9007199254740991, max 9007199254740991 or nullyes
quota_effect.exceeds_daily_capbooleanyes
links_checkedbooleanyesFalse when link reputation is not yet known; the send still re-checks at send time.
preview_tokenstring or nullyesPass to request_send within 15 minutes. Null when the mailing cannot be requested.
expires_atstring or nullyes

Examples#

ready to send#

Request:

curl -X POST 'https://api.seemly.com/v1/mailings/cmp_4d8x2p0q7r4d8x2p0q7r4d8x/send-preview' \
  -H "Authorization: Bearer $SEEMLY_API_KEY"

Response: 200:

JSON
{
  "mailing_id": "cmp_4d8x2p0q7r4d8x2p0q7r4d8x",
  "mailing_revision": 3,
  "mailing_status": "draft",
  "recipient_count": 212,
  "decision": "allow",
  "reasons": [],
  "tranche_sizes": [],
  "quota_effect": {
    "recipients": 212,
    "sent_today": 0,
    "daily_cap": 500,
    "exceeds_daily_cap": false
  },
  "links_checked": true,
  "preview_token": "pvt_example.token",
  "expires_at": "2026-12-02T09:45:00Z"
}

Errors#

Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.

Typical next steps#

View this page as MarkdownReport a problem with this page

Type to search. Try a method and path, an operation name or an error code.