Create Campaign

Authentication

AuthorizationBearer

Retrieve your API Key from Dashboard.

Request

This endpoint expects an object.
namestringRequired
This is the name of the campaign. This is just for your own reference.
assistantIdstringOptional

This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

workflowIdstringOptional

This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

squadIdstringOptional

This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

phoneNumberIdstringOptional

This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive.

dialPlanlist of objectsOptional

This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive.

schedulePlanobjectOptional

This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried.

customerslist of objectsOptional
These are the customers that will be called in the campaign. Required if dialPlan is not provided.

Response

statusenum
This is the status of the campaign.
Allowed values:
namestring
This is the name of the campaign. This is just for your own reference.
idstring
This is the unique identifier for the campaign.
orgIdstring
This is the unique identifier for the org that this campaign belongs to.
createdAtdatetime

This is the ISO 8601 date-time string of when the campaign was created.

updatedAtdatetime

This is the ISO 8601 date-time string of when the campaign was last updated.

callsobject
This is a map of call IDs to campaign call details.
callsCounterScheduleddouble
This is the number of calls that have been scheduled.
callsCounterQueueddouble
This is the number of calls that have been queued.
callsCounterInProgressdouble
This is the number of calls that have been in progress.
callsCounterEndedVoicemaildouble
This is the number of calls whose ended reason is 'voicemail'.
callsCounterEndeddouble
This is the number of calls that have ended.
endedReasonenum or null
This is the explanation for how the campaign ended.
Allowed values:
assistantIdstring or null

This is the assistant ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

workflowIdstring or null

This is the workflow ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

squadIdstring or null

This is the squad ID that will be used for the campaign calls. Note: Only one of assistantId, workflowId, or squadId can be used.

phoneNumberIdstring or null

This is the phone number ID that will be used for the campaign calls. Required if dialPlan is not provided. Note: phoneNumberId and dialPlan are mutually exclusive.

dialPlanlist of objects or null

This is a list of dial entries, each specifying a phone number and the customers to call using that number. Use this when you want different phone numbers to call different sets of customers. Note: phoneNumberId and dialPlan are mutually exclusive.

schedulePlanobject or null

This is the schedule plan for the campaign. Calls will start at startedAt and continue until your organization’s concurrency limit is reached. Any remaining calls will be retried for up to one hour as capacity becomes available. After that hour or after latestAt, whichever comes first, any calls that couldn’t be placed won’t be retried.

customerslist of objects or null
These are the customers that will be called in the campaign. Required if dialPlan is not provided.