Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

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

Needs scope: readMCP tool: get_campaign_stats operationId get_campaign_stats

Read a campaign's stats

Where the campaign’s sending is: its status, its recipients, its deliveries by status (queued, deferred, sent, bounced, failed, suppressed, cancelled), counted from the deliveries now, and its opens and clicks (total: every hit; unique: the distinct subscribers). Any status; a draft’s counts are zero. Needs scope read.

Parameters

NameInTypeDescription
project_idrequired path string · uuid The project’s id
campaign_idrequired path string · uuid The campaign’s id

Request body

None.

Responses

200

The campaign’s stats

  • CampaignStats object · all fields required
  • campaign_idstring · uuid
  • Its clicks: follows of its tracked links (message.clicked).

    2 fields
    • CampaignEventCounts object · all fields required
    • totalinteger · int64

      Every event, repeats included.

      ≥ 0

    • uniqueinteger · int64

      The distinct subscribers of those events.

      ≥ 0

  • Its deliveries by status.

    8 fields
    • CampaignDeliveryCounts object · all fields required
    • bouncedinteger · int64

      Refused for good at RCPT (a hard bounce).

      ≥ 0

    • cancelledinteger · int64

      Not sent: the campaign was cancelled.

      ≥ 0

    • deferredinteger · int64

      Refused for now; tried again later.

      ≥ 0

    • failedinteger · int64

      Refused for good otherwise, out of attempts, or not made.

      ≥ 0

    • queuedinteger · int64

      Waiting for their first attempt.

      ≥ 0

    • sentinteger · int64

      Taken by the recipient’s server.

      ≥ 0

    • suppressedinteger · int64

      Held back by a suppression or the subscriber’s status.

      ≥ 0

    • totalinteger · int64

      Every delivery: the sum of the above.

      ≥ 0

  • Its opens: loads of the open pixel (message.opened).

    2 fields
    • CampaignEventCounts object · all fields required
    • totalinteger · int64

      Every event, repeats included.

      ≥ 0

    • uniqueinteger · int64

      The distinct subscribers of those events.

      ≥ 0

  • statusstring

    The campaign’s status now.

    example sending

  • total_recipientsinteger · int64 | null

    How many recipients its launch wrote; null before the launch.

    ≥ 0

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)

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)