Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

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

NameInTypeDescription
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 ^[!-~]{1,128}$

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

HeaderTypeDescription
Idempotent-Replayedstring · enumtrue 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
  • The project’s sending domain of the sender; null when it has none.

    4 fields
    • CampaignPreflightDomain object · all fields required
    • domainstring

      example acme.example

    • idstring · uuid
    • statusstring

      pending, verified or failed; only a verified one sends.

      example verified

    • warningsarray of CampaignPreflightWarning

      Checks 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
      • checkstring

        example ptr

      • detailstring | null
      • statusstring

        missing, mismatch or warning.

        example warning

  • estimated_duration_secsinteger · int64 | null

    How long sending takes at throttle_per_hour, in seconds; null without a limit or a count.

    ≥ 0

  • from_emailstring · email | null

    The sender: the campaign’s, else the project’s settings.from_email; null when neither names one.

  • recipientsinteger · int64 | null

    Recipients after deduplication and suppression: the deliveries the launch would write. null when a list is missing or deleted.

    ≥ 0

  • throttle_per_hourinteger · int32 | null

    Most messages an hour: the campaign’s, else the project’s default_throttle_per_hour; null: no limit.

    ≥ 0

  • transportstring

    The transport the messages go through: direct or relay:<name>.

    example direct

  • violationsarray of ProblemFieldError

    Every unmet precondition of the launch, as 422 precondition_failed would list them; empty: it can be launched.

    3 fields
    • ProblemFieldError object · all fields required
    • codestring

      What is wrong with it, snake_case.

      example invalid

    • fieldstring

      The field, as named in the request.

      example name

    • messagestring

      example must not be empty

403

A project key without scope read (forbidden)

Problem (application/problem+json)

404

No such project or campaign in it, or another project’s (not_found)

Problem (application/problem+json)

409

The campaign is not a draft (conflict); or a request with the same Idempotency-Key has not answered yet (idempotency_key_in_progress)

Problem (application/problem+json)

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)

Problem (application/problem+json)

429

The key is over its rate limit, api.rate_limit_per_minute requests a minute on this node (rate_limited)

HeaderTypeDescription
Retry-AfterintegerSeconds until the key’s next request passes; rounded up.

Problem (application/problem+json)

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

Problem (application/problem+json)