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

# Create Batch Call

> Upload a contact list and run a one-shot batch of outbound calls.

<Warning>
  **Legacy endpoint - deprecated.** Unversioned endpoints are scheduled for removal on **July 31, 2026**. Use the [`/v1` version](/docs/api-reference/v1/batches/create) for new integrations. This endpoint remains available for existing integrations until then.
</Warning>

A batch call lets you upload a CSV or XLSX file of contacts and trigger a single outbound call to each one. Every row in the file becomes one call. The batch starts processing immediately (or at a scheduled time) and calls are made concurrently up to your configured limit.

## File format

Your file must include a `phone_number` column. All other column headers become **dynamic variables** that are injected into the agent's prompt for each individual call:

| phone\_number | customer\_name | loan\_amount | product    |
| ------------- | -------------- | ------------ | ---------- |
| 9876543210    | Priya Sharma   | 500000       | home\_loan |
| 9123456789    | Rahul Mehra    | 250000       | car\_loan  |

In your agent prompt, reference these as `{{customer_name}}`, `{{loan_amount}}`, etc.

## Batch vs. Campaign

Use a **batch call** for a one-shot outreach where you upload the full list upfront and don't need to add leads later. If you need ongoing lifecycle control (pause, resume, add leads incrementally), use [Campaigns](/docs/api-reference/campaigns/create) instead.

## File requirements

* Formats: CSV, XLSX, XLS
* Max size: 10 MB
* Required column: `phone_number`
* Phone numbers should be valid international numbers. Include the country code for non-local destinations.

## Destination validation

Before launch, each row is checked against the outbound route selected for the batch. For non-SIP routes, the destination country and prefix must be enabled in **Workspace Settings > Telephony Config**.

If one or more rows fail validation, the API returns `400 Bad Request` with grouped error details, including the affected row numbers. Common reasons include invalid phone number format, unsupported destination country, unsupported prefix, or no enabled countries configured.


## OpenAPI

````yaml POST /batch-calls
openapi: 3.0.0
info:
  title: DialNexa API
  description: >-
    Public REST API for the DialNexa voice AI platform. Versioned endpoints are
    under /v1; unversioned endpoints are legacy and deprecated.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: API Keys
  - name: Agent Functions
  - name: Agents V1
  - name: Agents2
  - name: Batch Calls
  - name: Batch Calls V1
  - name: Call Logs
  - name: Calls
  - name: Calls V1
  - name: Campaign Leads
  - name: Campaigns
  - name: External Webhooks
  - name: Knowledge Base
  - name: Knowledge Base V1
  - name: LLMs
  - name: LLMs V1
  - name: Languages
  - name: Languages V1
  - name: Organization Phone Numbers
  - name: Organization Phone Numbers V1
  - name: Phone Number Pricing
  - name: Phone Number Pricing V1
  - name: Transcribers
  - name: Transcribers V1
  - name: User Webhooks
  - name: User Webhooks V1
  - name: V1
  - name: Voices
  - name: Voices V1
  - name: Webcall
  - name: Workflow Leads
  - name: Workflow Leads V1
  - name: Workflows
  - name: Workflows V1
paths:
  /batch-calls:
    post:
      tags:
        - Batch Calls
      summary: Create campaign, upload leads file, and enqueue calls
      description: >-
        **Legacy endpoint - deprecated, scheduled for removal on July 31,
        2026.** Use the `/v1` version for new integrations. 
      operationId: BatchCallsController_create
      parameters:
        - name: x-organization-id
          in: header
          description: RSA encrypted organization ID (base64 format)
          required: true
          schema:
            type: string
            example: BASE64_ENCRYPTED_ORG_ID_HERE
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: CSV or Excel leads file
                title:
                  type: string
                  example: Enter campaign title here
                agent_id:
                  type: string
                  example: agent_123
                agent_version_number:
                  type: number
                  example: 1
                starts_at:
                  type: string
                  example: ''
                ends_at:
                  type: string
                  example: ''
                calling_hours_start:
                  type: string
                  example: ''
                calling_hours_end:
                  type: string
                  example: ''
              required:
                - file
                - title
                - agent_id
                - agent_version_number
      responses:
        '201':
          description: Batch call created and queued
      deprecated: true
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````