try out ↗

← API Index


/api/stats/campaign1

Per-week statistics of a mail campaign (sends, opens, clicks, bounces and rates). Admin access only. Also reachable as /api/stats/campaign1/.

Change Note: typed CampaignStat objects instead of the hand-rolled 'CampaignStats' JSON; unauthorized is now 403 (was 401)

Parameters

Name Description Type
campaignid the campaign id from the mailstats table (see stats/mailcampaigns) int
oo-rf optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml String
oo-auth optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized. int

Error Responses

HTTP Status Error Code Description
400 bad_request No valid campaign ID provided
403 not_auth Not authenticated or no admin access
404 not_found Campaign not found

Response Types

Type Version Description
CampaignStat 1 One calendar week of mail campaign statistics

OpenAPI

See campaign1.yaml

Referenced in skills