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

# Cancel Batch



## OpenAPI

````yaml /openapi.yaml post /v1/batches/{batch_id}/cancel
openapi: 3.1.0
info:
  title: Kupe API
  version: 0.1.0
  description: >-
    Public Kupe REST API. Authenticate with `Authorization: Bearer sk-kupe-...`
    (project API key) or a Supabase user JWT. API-key callers can GET /v1/me for
    the org_id and project_id scoped to the key.
servers:
  - url: https://x.kupe.in
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Me
    description: Current principal — org and project scoped to an API key.
  - name: Agents
    description: Agent CRUD, versions, tools, analyses, memories, and tests.
  - name: Realtime
    description: Mint an ephemeral Realtime session for the WebSocket.
  - name: Sessions
    description: LiveKit web sessions and telephony call sessions.
  - name: Inbound
    description: Bind an agent to a phone number with availability windows.
  - name: Campaigns
    description: 'Outbound batches: contacts, schedule, start/pause/resume.'
  - name: Recipient lists
    description: Reusable contact lists that attach to campaigns.
  - name: Tools
    description: Org tool catalog (webhooks, MCP, Composio-backed).
  - name: Composio
    description: Connect third-party apps and attach actions as tools.
  - name: Analyses
    description: Post-call analysis configs and session results.
  - name: Databases
    description: Call databases, rows, export, and agent attachments.
  - name: Knowledge bases
    description: Files and RAG search for agent context.
  - name: Audio assets
    description: Ambient audio presets and project uploads.
  - name: Phones
    description: Search, buy, and manage telephony numbers.
  - name: Voices
    description: Catalog voices, clones, preview, and speak.
  - name: Providers
    description: STT, LLM, and TTS catalog (defaults + enabled models).
  - name: Logs
    description: Session transcripts, recordings, and tool-call events.
  - name: Billing
    description: Wallet balance and invoices (not checkout).
  - name: Usage
    description: Cost summary and daily usage (no per-service breakdown).
  - name: Orgs
    description: Organizations.
  - name: Projects
    description: Projects inside an org.
  - name: Members
    description: Org membership.
  - name: API keys
    description: Project API keys (`sk-kupe-...`).
  - name: Feature flags
    description: Workspace feature flags.
  - name: Health
    description: Liveness and readiness probes.
paths:
  /v1/batches/{batch_id}/cancel:
    post:
      tags:
        - Campaigns
      summary: Cancel Batch
      operationId: cancel_batch_v1_batches__batch_id__cancel_post
      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/BatchOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BatchOut:
      properties:
        id:
          type: string
          title: Id
        org_id:
          type: string
          title: Org Id
        project_id:
          type: string
          title: Project Id
        agent_id:
          type: string
          title: Agent Id
        telephony_account_id:
          type: string
          title: Telephony Account Id
        name:
          type: string
          title: Name
        status:
          type: string
          enum:
            - draft
            - running
            - paused
            - completed
            - cancelled
          title: Status
        max_concurrent_calls:
          type: integer
          title: Max Concurrent Calls
        retry_policy:
          $ref: '#/components/schemas/RetryPolicy'
        schedule:
          $ref: '#/components/schemas/BatchSchedule'
        recipient_list_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Recipient List Id
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        hidden_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Hidden At
      type: object
      required:
        - id
        - org_id
        - project_id
        - agent_id
        - telephony_account_id
        - name
        - status
        - max_concurrent_calls
        - retry_policy
        - created_at
      title: BatchOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RetryPolicy:
      properties:
        max_retries:
          type: integer
          minimum: 0
          title: Max Retries
          default: 0
        retry_delay_seconds:
          type: integer
          minimum: 0
          title: Retry Delay Seconds
          default: 60
        retryable_outcomes:
          items:
            type: string
          type: array
          title: Retryable Outcomes
      type: object
      title: RetryPolicy
    BatchSchedule:
      properties:
        recurrence:
          anyOf:
            - type: string
              enum:
                - once
                - daily
                - weekly
                - monthly
            - type: 'null'
          title: Recurrence
        start_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start At
        days_of_week:
          items:
            type: integer
          type: array
          title: Days Of Week
          description: 0=Sun..6=Sat, weekly only
        day_of_month:
          anyOf:
            - type: integer
              maximum: 28
              minimum: 1
            - type: 'null'
          title: Day Of Month
          description: monthly only
        window_start:
          anyOf:
            - type: string
            - type: 'null'
          title: Window Start
          description: HH:MM local dial-window start
        window_end:
          anyOf:
            - type: string
            - type: 'null'
          title: Window End
          description: HH:MM local dial-window end
        timezone:
          type: string
          title: Timezone
          default: UTC
        limit_per_period:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Limit Per Period
      type: object
      title: BatchSchedule
      description: |-
        {} (all fields default/None) means unscheduled — manual start/pause/
        resume only, same as before this feature existed.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: Project API key (`sk-kupe-...`) or a Supabase user JWT.

````