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

# Cancel A Batch Call

> Cancel a running batch call and set all recipients to cancelled status.



## OpenAPI

````yaml https://api.threetone.in/openapi.json post /v1/voiceai/batch-calling/{batch_id}/cancel
openapi: 3.1.0
info:
  title: Threetone API Documentation
  version: 1.0.0
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/voiceai/batch-calling/{batch_id}/cancel:
    post:
      tags:
        - Batch Calling
      summary: Cancel A Batch Call
      description: Cancel a running batch call and set all recipients to cancelled status.
      operationId: cancel_batch_call
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
            title: Batch Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchCallResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    BatchCallResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique batch call ID
        phone_number_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number Id
          description: Caller phone number ID
        phone_provider:
          anyOf:
            - $ref: '#/components/schemas/TelephonyProvider'
            - type: 'null'
        whatsapp_params:
          anyOf:
            - $ref: '#/components/schemas/BatchCallWhatsAppParams'
            - type: 'null'
        name:
          type: string
          title: Name
          description: Name of the batch call job
        agent_id:
          type: string
          title: Agent Id
          description: Agent ID to use for calls
        created_at_unix:
          type: integer
          title: Created At Unix
          description: Unix timestamp when created
        scheduled_time_unix:
          type: integer
          title: Scheduled Time Unix
          description: Unix timestamp when scheduled to start
        total_calls_dispatched:
          type: integer
          title: Total Calls Dispatched
          description: Number of calls dispatched
          default: 0
        total_calls_scheduled:
          type: integer
          title: Total Calls Scheduled
          description: Number of calls scheduled
          default: 0
        total_calls_finished:
          type: integer
          title: Total Calls Finished
          description: Number of calls finished (completed + failed)
          default: 0
        last_updated_at_unix:
          type: integer
          title: Last Updated At Unix
          description: Unix timestamp of last update
        status:
          $ref: '#/components/schemas/BatchCallStatus'
          description: Current status of the batch job
        retry_count:
          type: integer
          title: Retry Count
          description: Number of retries attempted
          default: 0
        agent_name:
          type: string
          title: Agent Name
          description: Name of the agent
      type: object
      required:
        - id
        - name
        - agent_id
        - created_at_unix
        - scheduled_time_unix
        - last_updated_at_unix
        - status
        - agent_name
      title: BatchCallResponse
      description: Response model for a single batch call job.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TelephonyProvider:
      type: string
      enum:
        - twilio
        - vobiz
        - sip_trunk
      title: TelephonyProvider
      description: Telephony provider for batch calls.
    BatchCallWhatsAppParams:
      properties:
        whatsapp_phone_number_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Whatsapp Phone Number Id
        whatsapp_call_permission_request_template_name:
          type: string
          title: Whatsapp Call Permission Request Template Name
        whatsapp_call_permission_request_template_language_code:
          type: string
          title: Whatsapp Call Permission Request Template Language Code
      type: object
      required:
        - whatsapp_call_permission_request_template_name
        - whatsapp_call_permission_request_template_language_code
      title: BatchCallWhatsAppParams
      description: WhatsApp parameters for batch calls (future support).
    BatchCallStatus:
      type: string
      enum:
        - pending
        - in_progress
        - completed
        - failed
        - cancelled
      title: BatchCallStatus
      description: Status of a batch call job.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: API key for programmatic access
      in: header
      name: x-api-key
    HTTPBearer:
      type: http
      description: JWT Bearer token for dashboard access
      scheme: bearer

````