Campaigns API
Campaigns are the primary resource in the API — all recipients and wallet cards are organized under campaigns.
List Campaigns
GET
/campaignsRequired scope:
campaigns:readRetrieve a list of campaigns for your organization.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum results (1-100, default: 20) |
offset | integer | No | Number of results to skip (default: 0) |
status | string | No | Filter by status: draft, active, completed, archived |
campaignType | string | No | Filter by type: event, coupon, loyalty, access, generic |
Response
{
"success": true,
"data": {
"campaigns": [
{
"id": "campaign_abc123",
"name": "Tech Conference 2025",
"campaignType": "event",
"status": "active",
"createdAt": "2025-12-01T10:00:00Z"
}
],
"pagination": {
"total": 10,
"limit": 20,
"offset": 0,
"hasMore": false
}
}
}
Create Campaign
POST
/campaignsRequired scope:
campaigns:writeCreate a new campaign. Campaigns are the primary resource in the API.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Campaign name |
campaignType | string | Yes | Type: event, coupon, loyalty, access, generic |
campaignData | object | Yes | Campaign-specific data (inherited by recipients) |
campaignData.barcodeType | string | No | Barcode type: none, qr (default), aztec, pdf417, code128 |
campaignData.barcodeValueStrategy | string | No | Barcode value strategy: auto (default) or custom |
startDate | string | No | Start date (ISO 8601 format: YYYY-MM-DD) |
endDate | string | No | End date (ISO 8601 format: YYYY-MM-DD) |
providerTypes | array | No | Providers: ["all"], ["apple"], ["google"], ["eudiw"] (default: ["all"]) |
metadata | object | No | Custom metadata (key-value pairs) |
Response
{
"success": true,
"data": {
"id": "campaign_abc123",
"name": "Tech Conference 2025",
"campaignType": "event",
"status": "active",
"campaignData": {
"location": "San Francisco Convention Center",
"barcodeType": "qr",
"barcodeValueStrategy": "auto"
},
"startDate": "2025-12-15",
"endDate": "2025-12-17",
"providerTypes": ["all"],
"createdAt": "2025-12-01T10:00:00Z",
"updatedAt": "2025-12-01T10:00:00Z"
}
}
Get Campaign
GET
/campaigns/{campaignId}Required scope:
campaigns:readRetrieve details of a specific campaign.
Response
{
"success": true,
"data": {
"id": "campaign_abc123",
"name": "Tech Conference 2025",
"campaignType": "event",
"status": "active",
"campaignData": {
"location": "San Francisco Convention Center",
"barcodeType": "qr",
"barcodeValueStrategy": "auto"
},
"startDate": "2025-12-15",
"endDate": "2025-12-17",
"providerTypes": ["all"],
"createdAt": "2025-12-01T10:00:00Z",
"updatedAt": "2025-12-01T10:00:00Z"
}
}
Update Campaign
PATCH
/campaigns/{campaignId}Required scope:
campaigns:writeUpdate a campaign. Changes automatically propagate to all active wallet cards for this campaign.
Response
{
"success": true,
"data": {
"id": "campaign_abc123",
"name": "Tech Conference 2025 Updated",
"status": "active",
"updatedAt": "2025-12-01T11:00:00Z"
}
}
Immutable Settings: Once a campaign has recipients, barcodeValueStrategy becomes immutable and cannot be changed. Attempting to change this setting will return a 400 Bad Request error with code SETTING_LOCKED.
Campaign Status
Campaigns have four possible status values:
Response Fields
| Status | Description | When Set | Can Change To |
|---|---|---|---|
draft | Campaign is being set up, not yet launched | Initial status when campaign is created | active (when first recipient is invited), archived (manual) |
active | Campaign is live and has invited recipients | Automatically set when first recipient is invited, or manually via API | archived (manual), completed (if end date passes) |
completed | Event end date has passed | Calculated in UI based on endDate (not automatically set in database) | archived (manual) |
archived | Campaign is hidden from main list | Manually set via API or dashboard | draft (via unarchive) |
Delete Campaign
DELETE
/campaigns/{campaignId}Required scope:
campaigns:writeDelete a campaign.
Response
{
"success": true,
"data": {
"id": "campaign_abc123",
"deleted": true
}
}