Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

Campaigns HTTP API

GET/api/v1/projects/{project_id}/campaigns

list_campaigns

Lists the campaigns of a project, oldest first, at most 100 per call, optionally of one status.

Call it
to find a campaign’s id or the drafts still to launch.
Needs
an admin key with project_id, or a project key with scope read (its own project; the argument is ignored).
Returns
items (campaigns as get_campaign returns them) and next_cursor: pass it as cursor for the next page; null on the last page. The same as GET /api/v1/projects/{project_id}/campaigns.

Arguments

  • object
  • cursorstring | null

    next_cursor of the previous page; leave it out for the first.

  • limitinteger · int64 | null

    Page size, 1 to 100; default 50.

    1–100

  • project_idstring · uuid | null

    The project whose campaigns to list. An admin key must pass it; a project key’s own project is used and this is ignored.

  • statusstring | null

    Only campaigns in this status: draft, scheduled, launching, sending, paused, completed, cancelled, failed.

No other arguments are accepted.

Result

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

  • object · all fields required
  • itemsarray of Campaign

    In creation order.

    23 fields
    • Campaign object · all fields required
    • completed_atstring · date-time | null
    • created_atstring · date-time
    • from_emailstring | null

      null: the project’s settings.from_email.

    • from_namestring | null

      null: the project’s settings.from_name.

    • idstring · uuid
    • last_errorstring | null

      Why the launch failed; null unless failed.

    • launched_atstring · date-time | null
    • list_idsarray of string

      The lists it goes to, in the order given.

    • namestring
    • partial_versionsmap of string → integer · uint32

      The versions of the partials fixed at launch, by name; {} before.

    • project_idstring · uuid
    • reply_tostring | null

      null: the project’s settings.reply_to.

    • scheduled_atstring · date-time | null

      When a scheduled campaign launches; null unless scheduled.

    • shard_countinteger · uint32 | null

      Fixed at launch; null before.

      ≥ 0

    • statusstring

      draft, scheduled, launching, sending, paused, completed, cancelled or failed.

    • subject_overridestring | null

      null: the template’s subject.

    • template_idstring · uuid
    • template_versioninteger · uint32 | null

      The template’s version fixed at launch; null before.

      ≥ 0

    • throttle_per_hourinteger · uint32 | null

      null: the project’s default_throttle_per_hour, or no limit.

      ≥ 0

    • total_recipientsinteger · uint64 | null

      Recipients of the launch’s snapshot; null before.

      ≥ 0

    • tracking_overrideTrackingOverride | null

      null: the project’s settings.tracking.

      2 fields
    • transport_overridestring | null

      null: the project’s transport, then the node’s default.

    • updated_atstring · date-time

      The latest change: creation, fields, status.

  • next_cursorstring | null

    Pass as cursor for the next page; null on the last page.

Definitions

Campaign

A campaign of a project (create_campaign, get_campaign, update_campaign; GET /api/v1/projects/{project_id}/campaigns/{campaign_id}).

  • object · all fields required
  • completed_atstring · date-time | null
  • created_atstring · date-time
  • from_emailstring | null

    null: the project’s settings.from_email.

  • from_namestring | null

    null: the project’s settings.from_name.

  • idstring · uuid
  • last_errorstring | null

    Why the launch failed; null unless failed.

  • launched_atstring · date-time | null
  • list_idsarray of string

    The lists it goes to, in the order given.

  • namestring
  • partial_versionsmap of string → integer · uint32

    The versions of the partials fixed at launch, by name; {} before.

  • project_idstring · uuid
  • reply_tostring | null

    null: the project’s settings.reply_to.

  • scheduled_atstring · date-time | null

    When a scheduled campaign launches; null unless scheduled.

  • shard_countinteger · uint32 | null

    Fixed at launch; null before.

    ≥ 0

  • statusstring

    draft, scheduled, launching, sending, paused, completed, cancelled or failed.

  • subject_overridestring | null

    null: the template’s subject.

  • template_idstring · uuid
  • template_versioninteger · uint32 | null

    The template’s version fixed at launch; null before.

    ≥ 0

  • throttle_per_hourinteger · uint32 | null

    null: the project’s default_throttle_per_hour, or no limit.

    ≥ 0

  • total_recipientsinteger · uint64 | null

    Recipients of the launch’s snapshot; null before.

    ≥ 0

  • tracking_overrideTrackingOverride | null

    null: the project’s settings.tracking.

    see TrackingOverride

  • transport_overridestring | null

    null: the project’s transport, then the node’s default.

  • updated_atstring · date-time

    The latest change: creation, fields, status.

TrackingOverride

What a campaign tracks in place of the project’s.

  • object · all fields required
  • clicksboolean
  • opensboolean

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: GET /api/v1/projects/{project_id}/campaigns