Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

Campaigns HTTP API

POST/api/v1/projects/{project_id}/campaigns/{campaign_id}/preflight

preflight_campaign

Shows what launching a draft campaign would do now: its recipients after deduplication and suppression, its sender’s sending domain with its warnings, its transport, how long sending takes at its throttle, and every precondition it does not meet.

Call it
before launch_campaign, to see who gets the campaign and what to fix.
Needs
an admin key with project_id, or a project key with scope read (its own project; the argument is ignored), and a campaign in draft (otherwise conflict). Changes nothing.
Returns
recipients, from_email, domain, transport, throttle_per_hour, estimated_duration_secs and violations (empty: it can be launched), the same as POST /api/v1/projects/{project_id}/campaigns/{campaign_id}/preflight.

Arguments

  • object
  • campaign_idstring · uuidrequired

    The campaign’s id, as create_campaign or list_campaigns gave it.

  • project_idstring · uuid | null

    The campaign’s project. An admin key must pass it; a project key’s own project is used and this is ignored.

No other arguments are accepted.

Result

The result comes back as structuredContent, with the same JSON as a text block.

  • 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
    • idstring · uuid
    • statusstring

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

    • 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
      • detailstring | null
      • statusstring

        missing, mismatch or warning.

  • estimated_duration_secsinteger · uint64 | null

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

    ≥ 0

  • from_emailstring | null

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

  • recipientsinteger · uint64 | null

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

    ≥ 0

  • throttle_per_hourinteger · uint32 | 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>.

  • violationsarray of Violation

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

    3 fields
    • Violation object · all fields required
    • codestring

      What is wrong, snake_case.

    • fieldstring

      The field it is about (from_email, list_ids.0, transport).

    • messagestring

Definitions

CampaignPreflightDomain

The sending domain of a campaign’s sender.

  • object · all fields required
  • domainstring
  • idstring · uuid
  • statusstring

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

  • warningsarray of CampaignPreflightWarning

    Checks that do not decide the status and are not ok (ptr, tracking_tls): the launch goes ahead, delivery may suffer.

    see CampaignPreflightWarning

CampaignPreflightWarning

One check of a preflight’s domain warnings.

  • object · all fields required
  • checkstring
  • detailstring | null
  • statusstring

    missing, mismatch or warning.

Violation

One unmet precondition.

  • object · all fields required
  • codestring

    What is wrong, snake_case.

  • fieldstring

    The field it is about (from_email, list_ids.0, transport).

  • messagestring

Errors

A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors

HTTP API

The same operation over HTTP: POST /api/v1/projects/{project_id}/campaigns/{campaign_id}/preflight