> ## Documentation Index
> Fetch the complete documentation index at: https://docs.luly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a Batch of Calls

> Send large volumes of calls at once with a single API request.

### Headers

<ParamField header="authorization" type="string" required={true}>
  Your API key for authentication.
</ParamField>

### Body

<ParamField body="base_prompt" type="string" required={true}>
  This is the prompt or task used for all the phone calls in the request. Information can be inserted into it surrounding variable names with curly braces.

  Example:

  ```
  "You are calling business to renew their subscription to service before it expires on date."
  ;
  ```
</ParamField>

<ParamField body="call_data" type="array" required={true}>
  Define a list of calls to make and their properties. Each call in call\_data MUST have a “phone\_number” property. Properties are case-sensitive.

  Example:

  ```[
  {   
    "phone_number": "1234567890",
    "business": "ABC Corp",
    "service": "Netflix",
    "date": "September 4th"
  },
  {
    "phone_number": "32176540987",
    "business": "XYZ inc.",
    "service": "Window Cleaning",
    "date": "December 20th"
  }
  ]";
  ```
</ParamField>

<ParamField body="from" type="string">
  Use a purchased number to send batch calls from. We do not recommend this for large batches as there is risk of your number getting flagged for spam.
</ParamField>

<ParamField body="label" type="string">
  Adds a user-friendly label to your batch to keep track of it’s original intention. This can help differentiate multiple call batches that are part of the same Campaign. Shown when a batch is retreived
</ParamField>

<ParamField body="campaign_id" type="string">
  Use campaign\_id to organize related batches together. This can be set manually or auto-generated through Campaigns.
</ParamField>

<ParamField body="test_mode" type="boolean">
  When this is set to true, only the first call of call\_data will be dispatched. A common use case is to set the first phone\_number value to your own to confirm everything’s set up properly.

  Includes additional information in the response when true so that it’s easier to find any issues.
</ParamField>

{name='*'}

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

{'batch_webhook'}

A URL that will receive a POST request when the batch is completed. The request will include the batch\_id and the status of the batch.

### Response

<ResponseField name="message" type="string">
  If anything other than “success” is returned, there was an error.
</ResponseField>

<ResponseField name="batch_id" type="string">
  The unique identifier for the batch.
</ResponseField>

<ResponseExample>
  ```json Response
  {
    "status": "success",
    "pathway_id": "9d404c1b-6a23-4426-953a-a52c392ff8f1"
  }

  ```
</ResponseExample>
