POST
/
v2
/
batches
/
create
curl --request POST \
  --url https://api.bland.ai/v2/batches/create \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "call_objects": [
    {}
  ],
  "global": {}
}'
{
  "data": {
    "batch_id": "8b8e8c57-9e6e-4e4d-84d2-9826b2268c22"
  },
  "errors": null
}

Headers

authorization
string
required

Your API key for authentication.

encrypted_key
string

Optional encrypted key used for securing batch payloads.

Body

call_objects
array

A list of individual call objects to include in the batch. Each object follows the same schema as /v1/calls.

Example
"call_objects": [
  {
    "phone_number": "+1234567890",
    "task": "Say hello to the nice person!"
    // /v1/call properties
  },
  {
    "phone_number": "+1234567891",
    "task": "Say hello to the bad person!",
    "record": false
    // /v1/call properties
  }
]
global
object
required

Global call properties to apply to all call_objects, unless overridden per entry.

Required keys:

  • Must include at least one of: "task" or "pathway_id".

    Forbidden keys:
  • "phone_number" is not allowed in the global object.

Example:

Example
"global": {
  "task": "Say hello to the nice person!",
  "record": true
  // /v1/call properties
}

Response

data
object

The response includes the batch_id of the newly created batch.

data.batch_id
string

The unique identifier for the batch.

errors
null

Always null on success.

{
  "data": {
    "batch_id": "8b8e8c57-9e6e-4e4d-84d2-9826b2268c22"
  },
  "errors": null
}