dograh/docs/api-reference/campaigns/create.mdx
2026-05-02 17:37:48 +05:30

22 lines
1 KiB
Text

---
title: "Create Campaign"
description: "Create a new outbound calling campaign"
openapi: "POST /api/v1/campaign/create"
---
Before creating a campaign, [upload your contacts CSV](/api-reference/campaigns/upload-contacts) to get a `source_url`.
Set `telephony_configuration_id` to pin the campaign to a specific [telephony configuration](/api-reference/telephony-configs). If omitted, Dograh falls back to the organization's [default outbound configuration](/api-reference/telephony-configs/set-default-outbound) — supplying an id that doesn't exist in your organization returns `400 telephony_configuration_not_found`.
The `time_slots` field controls when Dograh is allowed to place calls. If omitted, calls can be placed at any time. The `timezone` field applies to all time slot windows.
```json
{
"time_slots": [
{ "day": "monday", "start": "09:00", "end": "17:00" },
{ "day": "tuesday", "start": "09:00", "end": "17:00" }
]
}
```
Once created, the campaign is in `draft` status. Call [Start](/api-reference/campaigns/start) to begin dialing.