Create campaign
Create a new email campaign
Path versioning. This resource is also reachable at the unversioned /campaigns, which is where it has always lived and which keeps working indefinitely — bitelio@0.1.0 calls it. Prefer /v1/campaigns: the /v1 prefix is the path that carries a version promise, and a future /v2 will be able to change shape without breaking anything written against this one.
Authorization
ApiKeyAuth API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. The project is automatically derived from the key.
In: header
Request Body
application/json
Campaign name
Campaign description
Email subject line
HTML email body
Sender email address (must be from verified domain)
emailSender name
Reply-to email address
emailTarget audience type
"ALL" | "SEGMENT" | "FILTERED"Segment ID (required if audienceType is SEGMENT)
Filter conditions (required if audienceType is FILTERED)
Response Body
application/json
curl -X POST "https://api.bitelio.com/v1/campaigns" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "subject": "string", "body": "string", "from": "user@example.com", "audienceType": "ALL" }'{
"success": true,
"data": {
"id": "string",
"name": "string",
"subject": "string",
"type": "ALL",
"status": "DRAFT",
"scheduledAt": "2019-08-24T14:15:22Z"
}
}