POST/api/v1/projects/{project_id}/campaigns/{campaign_id}/preflight
Needs scope: readIdempotency-KeyMCP tool: preflight_campaign
operationId preflight_campaign
Preflight a campaign
What launching the draft now would do: its recipients after
deduplication and suppression, its sender’s domain and that domain’s
warnings, its transport, how long it takes at its throttle, and every
precondition it does not meet. Changes nothing. Needs scope read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_idrequired |
path | string · uuid | The project’s id |
campaign_idrequired |
path | string · uuid | The campaign’s id |
Idempotency-Key |
header | string
1–128 characters · pattern |
A key of the client’s choosing, one per request it means to send once (a UUID will do). A repeat with the same key and the same body within 24 h creates nothing again and gets the first answer, marked Idempotent-Replayed: true. The key belongs to the API key that sent it. Only a 2xx answer is kept: after any other answer the key is free again. |
Request body
None.
Responses
200
The preflight
| Header | Type | Description |
|---|---|---|
Idempotent-Replayed | string · enum | true when the answer is a replay of an earlier request with the same Idempotency-Key; absent otherwise. |
- CampaignPreflight object · all fields required
-
campaign_idstring · uuid -
domainCampaignPreflightDomain | nullThe project’s sending domain of the sender;
nullwhen it has none.4 fields
- CampaignPreflightDomain object · all fields required
-
domainstringexample
acme.example -
idstring · uuid -
statusstringpending,verifiedorfailed; only averifiedone sends.example
verified -
warningsarray of CampaignPreflightWarningChecks that do not decide the status and are not
ok(ptr,tracking_tls): the launch goes ahead, delivery may suffer.3 fields
- CampaignPreflightWarning object · all fields required
-
checkstringexample
ptr -
detailstring | null -
statusstringmissing,mismatchorwarning.example
warning
-
estimated_duration_secsinteger · int64 | nullHow long sending takes at
throttle_per_hour, in seconds;nullwithout a limit or a count.≥ 0
-
from_emailstring · email | nullThe sender: the campaign’s, else the project’s
settings.from_email;nullwhen neither names one. -
recipientsinteger · int64 | nullRecipients after deduplication and suppression: the deliveries the launch would write.
nullwhen a list is missing or deleted.≥ 0
-
throttle_per_hourinteger · int32 | nullMost messages an hour: the campaign’s, else the project’s
default_throttle_per_hour;null: no limit.≥ 0
-
transportstringThe transport the messages go through:
directorrelay:<name>.example
direct -
violationsarray of ProblemFieldErrorEvery unmet precondition of the launch, as
422 precondition_failedwould list them; empty: it can be launched.3 fields
- ProblemFieldError object · all fields required
-
codestringWhat is wrong with it,
snake_case.example
invalid -
fieldstringThe field, as named in the request.
example
name -
messagestringexample
must not be empty
404
No such project or campaign in it, or another project’s (not_found)
409
The campaign is not a draft (conflict); or a request with the same Idempotency-Key has not answered yet (idempotency_key_in_progress)
422
The Idempotency-Key was used in the last 24 h for another request (idempotency_key_reused), or is not 1 to 128 visible ASCII characters (validation_failed, field Idempotency-Key)
429
The key is over its rate limit, api.rate_limit_per_minute requests a minute on this node (rate_limited)
| Header | Type | Description |
|---|---|---|
Retry-After | integer | Seconds until the key’s next request passes; rounded up. |
504
Postwind’s storage did not answer within its time limit (storage_timeout). A change the request makes may still take effect: check before repeating it. A repeat with the same Idempotency-Key never runs it twice: it is 409 idempotency_key_in_progress until the key’s 24 h end