POST
/
v2
/
batches

Headers

authorization
string
required

Your API key for authentication.

encrypted_key
string

Use your own Twilio account and only return inbound numbers associated with that account sid (optional).

Body

name
string
required

Name for your batch/campaign to later reference.

phone_numbers
object[]
required

An array of objects representing phone numbers to send calls to and call parameters.

  • phone_number - (STRING) The phone number to send a call to.
  • All other parameters supported by the Send Call endpoint are supported here as well. They will be applied to each call in the batch.
call_params
object

Parameters for the call.

All other parameters supported by the Send Call endpoint are supported here as well. They will be applied to each call in the batch.

sequence
object

THIS TURNS A BATCH INTO A CAMPAIGN.

If you pass in a sequence, the batch will be turned into a campaign. A campaign is a squence of calls, that continue to be sent until the user answers, or retries has been exhausted.

  • sequence.retries - (INTEGER) Number of times to retry when no answer.
  • sequence.wait_period - (INTEGER) Number of days to wait in between follow ups (retries).
  • sequence.wait_period_time_unit - (STRING) Time unit for the wait period. (MINUTE, HOUR, DAY)