Create an empty campaign
Add leads later with `PUT /campaigns/{campaign_id}/leads`. Without `phoneNumberId` the agent's assigned number is used.
Add leads later with PUT /campaigns/{campaign_id}/leads. Without phoneNumberId the agent's assigned number is used.
X-API-Key<token>Create in the console: Settings → API & webhooks.
Idempotency-Key?stringAny unique string up to 255 characters. Retrying with the same key and body within 24 hours returns the first result instead of acting twice.
length <= 255application/json- body
Campaign fields to create or change. On update, send only the fields to change.
agentId?AgentidThe agent that makes the calls.
uuidcrmWebhookSecret?CrmwebhooksecretSecret used to sign those webhooks. Never returned.
crmWebhookUrl?CrmwebhookurlPublic HTTPS URL that receives this campaign's call results; empty clears it.
uridescription?DescriptionFree-text description.
direction?Directionoutbound (call leads) or inbound (answer calls).
"outbound""outbound""inbound"endDate?EnddatePlanned end date, free text.
isActive?IsactiveUpdate only: true starts the campaign, false stops it (same checks as start and stop).
isDefaultInbound?IsdefaultinboundInbound only: take calls to the number that no other campaign matches.
name?NameCampaign name. Defaults to Untitled.
phoneNumberId?PhonenumberidCaller ID. Required for inbound campaigns. Defaults to the agent's assigned number.
uuidphoneNumberIds?array<>Every number to call from, in order; the first is the primary caller ID.
settings?|Dialing rules; merged into the current ones.
startDate?StartdatePlanned start date, free text (for example 2026-12-01).
status?StatusDisplay status to set, for example draft.
[key: string]?anyOK
application/json- response
The campaign after the request.
campaign?|The campaign.
success?|Always true.
[key: string]?anycurl -X POST 'https://api.callmitra.ai/api/v1/campaigns/' \ -H 'Content-Type: application/json' \ -d '{ "agentId": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d", "name": "December renewals", "settings": { "maxCallsPerDay": 200, "maxConcurrentCalls": 2 }}'{ "campaign": { "agentId": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d", "autoDialEnabled": false, "createdAt": "2026-11-15T10:00:00Z", "direction": "outbound", "id": "3f6c1b2a-7d4e-4a1b-9c2d-5e6f7a8b9c0d", "isActive": false, "name": "December renewals", "phoneNumberId": "1b2c3d4e-5f6a-4b7c-8d9e-0f1a2b3c4d5e", "settings": { "dialWindowEnd": "18:00", "dialWindowStart": "10:00", "maxCallsPerDay": 200, "maxConcurrentCalls": 2, "pacingSeconds": 5 }, "stats": { "calledLeads": 0, "connectRate": 0, "totalLeads": 0 }, "status": "draft" }, "success": true}List calls GET
Newest first. For deep lists pass `cursor` (empty for the first page, then the `nextCursor` you got back): cursor pages skip the total count and stay fast. Without `cursor` the list pages by `page` and counts matches up to 10,000.
Create a campaign with its leads POST
The usual way to start: one request creates the campaign and adds or creates its leads. Start it with `POST /campaigns/{campaign_id}/start`, or send `campaignData.isActive: true` to start it right away (the same checks as start apply).