Campaigns

Schedule a campaign run

Schedules an email campaign run at the absolute ISO-8601 instant in scheduledFor, or immediately when omitted.

POST
/v1/campaigns/{id}/runs

Schedules an email campaign run at the absolute ISO-8601 instant in scheduledFor, or immediately when omitted. The optional idempotencyKey is scoped to the organization and replays return the original run.

x-api-key<token>

In: header

Path Parameters

id*string
Match^camp_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

scheduledFor?|null
idempotencyKey?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/campaigns/string/runs" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "campaignId": "string",  "status": "scheduled",  "scheduledFor": "string",  "idempotencyKey": "string",  "startedAt": "string",  "completedAt": "string",  "contentSnapshot": {    "channel": "email",    "email": {      "subject": "string",      "html": "string",      "text": "string",      "attachments": [        {          "filename": "string",          "content": "string",          "mediaId": "string",          "contentType": "string",          "size": 1        }      ],      "publicationId": "string",      "inputContractId": "string",      "templateId": "string",      "templateSlug": "string",      "templateData": {},      "inReplyToMessageId": "string",      "replyTo": [        "string"      ],      "unsubscribeGroupId": "string",      "tracking": {        "opens": true,        "clicks": true      },      "footer": {        "enabled": true      }    },    "conversationId": "string",    "metadata": {}  },  "audienceSnapshot": {    "includeTags": [      "string"    ],    "excludeTags": [      "string"    ],    "contactIds": [      "string"    ],    "groupIds": [      "string"    ]  },  "policySnapshot": {    "unsubscribeGroupId": "string",    "pageSize": 100  },  "totalRecipients": 0,  "dispatchedCount": 0,  "failedCount": 0,  "skippedCount": 0,  "failureReason": "string",  "holdReason": "string",  "holdDomainId": "string",  "lastContactId": "string",  "createdBy": "string",  "actorEmail": "string",  "memberRole": "string",  "createdAt": "string",  "updatedAt": "string"}