> ## 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.

# List Batches

> Retrieves batch-specific data for each batch you’ve created.

### Headers

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

### Query Parameters

<ParamField query="campaign_id" type="string">
  Retrieve only batches with a specific campaign ID.
</ParamField>

<ParamField query="from" type="integer">
  The starting index (inclusive) for the range of batches to retrieve.
</ParamField>

<ParamField query="to" type="integer">
  The ending index for the range of batches to retrieve.
</ParamField>

<ParamField query="limit" type="integer">
  The maximum number of batches to return in the response.
</ParamField>

<ParamField query="ascending" type="boolean">
  Whether to sort the batches in ascending order of their creation time.
</ParamField>

### Response

<ResponseField name="status" type="string">
  Can be success or error.
</ResponseField>

<ResponseField name="batches" type="array">
  Contains an array of batch objects.
</ResponseField>

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

<ResponseField name="batches[i].base_prompt" type="string">
  The original base prompt used to create the batch. Will still contain the original placeholder variables such as  business  or  name.
</ResponseField>

<ResponseField name="batches[i].label" type="string">
  The label you assigned to the batch (if any).
</ResponseField>

<ResponseField name="batches[i].endpoint_code" type="string">
  Enterprise customers with custom endpoints will see the endpoint code here (if specified).
</ResponseField>

<ResponseField name="batches[i].call_params" type="array">
  The base call parameters used to create the batch, such as voice\_id, max\_duration, reduce\_latency, and wait\_for\_greeting.
</ResponseField>

<ResponseField name="batches[i].created_at" type="string">
  The date and time the batch was created.
</ResponseField>

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

  ```
</ResponseExample>
