Create a campaign
POST
https://server.heyrik.com/api/v1/campaignsHeaders
AuthorizationstringRequiredUse Bearer $HEYRIK_API_KEY with an account-scoped API key. Keep the key on your server.
Parameters 7
Fields documented for this operation. See the request example for placement and structure.
agency_idstringRequiredAgent that makes the calls.
trunk_idstringRequiredNumber to dial FROM (a phone-number id).
namestringLabel.
filemultipart fileCSV/XLSX of leads. Optional — leads can be pushed later.
phone_columnstringWhich column holds the number. Default "phone".
concurrencynumberCalls in flight at once. Default 1.
schedule_atstringISO time to start automatically.
Response
Explore the example values. This is not a complete response schema.
dataobjectExplore 4 properties
idstringExample "cmp_4a19"
namestringExample "July outreach"
statusstringExample "draft"
totalnumberExample 250
POST/campaigns
cURL
curl -X POST https://server.heyrik.com/api/v1/campaigns \
-H "Authorization: Bearer $HEYRIK_API_KEY" \
-F "name=July outreach" \
-F "agency_id=agc_9f2a1c30" \
-F "trunk_id=sip_45723ca5" \
-F "phone_column=phone" \
-F "file=@leads.csv"Response example
JSON
{
"data": { "id": "cmp_4a19", "name": "July outreach", "status": "draft", "total": 250 }
}Illustrative examples · No live request is sent
