Create a campaign
Creates a campaign, optionally with its steps, in one transaction. Campaigns are created as drafts unless `status: "active"` is set, which turns the campaign on after creation (requires at least one step).
Creates a campaign, optionally with its steps, in one transaction. Campaigns are created as drafts unless status: "active" is set, which turns the campaign on after creation (requires at least one step).
Authorization
apiKey In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/campaigns" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "campaign_type": "cold_outbound" }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"campaign_type": "cold_outbound",
"status": "draft",
"sending_provider": "gtm_native",
"provider_config": {
"property1": null,
"property2": null
},
"send_config": {
"property1": null,
"property2": null
},
"newsletter_config": null,
"suppression_config": null,
"enrichment_config": null,
"include_unsubscribe_link": true,
"auto_remove_on_reply": true,
"track_opens": true,
"track_clicks": true,
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"created_at": "string",
"updated_at": "string",
"steps": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904",
"step_number": 0,
"step_type": "message",
"channel": "email",
"content_type": "ai_generated",
"body_format": "html",
"email_thread_mode": "new_thread",
"content": "string",
"ai_prompt": "string",
"hybrid_config": null,
"subject_template": "string",
"delay_minutes": 0,
"target_campaign_id": "cb9903d4-aeac-4c5f-9c18-fdb4a1672efa",
"parent_connect_step_id": "8ca6059c-b7f8-4cdd-9a2e-a0131fac8cf2",
"task_assignee": "mailbox_owner",
"attachments": [
null
],
"created_at": "string",
"updated_at": "string"
}
],
"trigger_campaigns": [
null
],
"created_by_user": null
}
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}