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

# List batches

> Returns API-created batches and aggregate recipient counts using newest-first cursor pagination. Every response includes Brightalk-Version and X-Request-Id; rate-limited responses also expose the effective bucket counters.



## OpenAPI

````yaml /openapi/openapi.yaml get /batches
openapi: 3.1.0
info:
  title: Brightalk Public API
  version: '2026-07-16'
  description: >-
    Private-beta server-to-server REST API for AI calls, batch dialing, and
    dashboard-managed Automation runs.
  license:
    name: Brightalk Private Beta Terms
    identifier: LicenseRef-Brightalk-Private-Beta
servers:
  - url: https://api.brightalk.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Eligible dashboard-managed AI voice agents.
  - name: Automations
    description: Dashboard-managed Automation summaries.
  - name: Contacts
    description: Organization contacts and external identities.
  - name: Calls
    description: Immediate asynchronous AI calls and their scalar results.
  - name: Batches
    description: Draft, schedule, and control aggregate batch dialing.
  - name: Automation runs
    description: Start and control one-contact Automation runs.
paths:
  /batches:
    get:
      tags:
        - Batches
      summary: List batches
      description: >-
        Returns API-created batches and aggregate recipient counts using
        newest-first cursor pagination. Every response includes
        Brightalk-Version and X-Request-Id; rate-limited responses also expose
        the effective bucket counters.
      operationId: listBatches
      parameters:
        - $ref: '#/components/parameters/BrightalkVersion'
        - $ref: '#/components/parameters/XRequestId'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
        - $ref: '#/components/parameters/BatchStatus'
        - $ref: '#/components/parameters/CreatedAfter'
        - $ref: '#/components/parameters/CreatedBefore'
      responses:
        '200':
          description: Batches returned.
          headers:
            Brightalk-Version:
              $ref: '#/components/headers/Brightalk-Version'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET 'https://api.brightalk.ai/batches?limit=20' \
              --header "Authorization: Bearer $BRIGHTALK_API_KEY" \
              --header "Brightalk-Version: 2026-07-16"
        - lang: javascript
          label: JavaScript
          source: >-
            const response = await
            fetch("https://api.brightalk.ai/batches?limit=20", {
              method: "GET",
              headers: {
                Authorization: `Bearer ${process.env.BRIGHTALK_API_KEY}`,
                "Brightalk-Version": "2026-07-16",
              },
            });

            console.log(response.status, await response.json());
        - lang: python
          label: Python
          source: |-
            import os
            import requests

            response = requests.request(
                "GET",
                "https://api.brightalk.ai/batches?limit=20",
                headers={
                "Authorization": f"Bearer {os.environ['BRIGHTALK_API_KEY']}",
                "Brightalk-Version": "2026-07-16",
                },
            )
            print(response.status_code, response.json())
components:
  parameters:
    BrightalkVersion:
      name: Brightalk-Version
      in: header
      required: false
      description: >-
        Selects the date-based API version. Omission uses the organization’s
        pinned private-beta default.
      schema:
        type: string
        const: '2026-07-16'
        default: '2026-07-16'
    XRequestId:
      name: X-Request-Id
      in: header
      required: false
      description: >-
        A caller-generated correlation value matching [A-Za-z0-9._:-]{1,64}.
        Invalid values are replaced.
      schema:
        type: string
        pattern: ^[A-Za-z0-9._:-]{1,64}$
        maxLength: 64
    Limit:
      name: limit
      in: query
      required: false
      description: Number of resources to return. Defaults to 20 and is capped at 100.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
    Cursor:
      name: cursor
      in: query
      required: false
      description: An opaque cursor returned by the previous page.
      schema:
        type: string
        minLength: 1
        maxLength: 2048
    BatchStatus:
      name: status
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/BatchStatus'
    CreatedAfter:
      name: created_after
      in: query
      required: false
      schema:
        type: string
        format: date-time
    CreatedBefore:
      name: created_before
      in: query
      required: false
      schema:
        type: string
        format: date-time
  headers:
    Brightalk-Version:
      description: The date-based version applied to the request.
      required: true
      schema:
        type: string
        const: '2026-07-16'
    X-Request-Id:
      description: The accepted caller correlation value or a server-generated replacement.
      required: true
      schema:
        type: string
        pattern: ^[A-Za-z0-9._:-]{1,64}$
    RateLimit-Limit:
      description: The effective request allowance for the selected bucket.
      schema:
        type: integer
        minimum: 1
    RateLimit-Remaining:
      description: The nonnegative number of requests remaining in the selected bucket.
      schema:
        type: integer
        minimum: 0
    RateLimit-Reset:
      description: >-
        A nonnegative integer number of delta-seconds from response generation
        until the effective bucket resets; never an epoch timestamp.
      schema:
        type: integer
        minimum: 0
    Allow:
      description: A comma-separated list of methods allowed on the known path.
      schema:
        type: string
        example: GET, POST
    Retry-After:
      description: >-
        A nonnegative integer number of delta-seconds to wait before retrying;
        never an epoch timestamp.
      schema:
        type: integer
        minimum: 0
  schemas:
    BatchList:
      type: object
      additionalProperties: false
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Batch'
        next_cursor:
          type:
            - string
            - 'null'
      required:
        - data
        - next_cursor
    BatchStatus:
      type: string
      enum:
        - draft
        - scheduled
        - queued
        - in_progress
        - paused
        - completed
        - failed
        - cancelled
    Batch:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 255
          description: An opaque resource identifier.
          example: bat_demo_001
        status:
          $ref: '#/components/schemas/BatchStatus'
        name:
          type: string
          example: Renewal reminders
        agent_id:
          type: string
          minLength: 1
          maxLength: 255
          description: An opaque resource identifier.
          example: agt_demo_001
        scheduled_start_at:
          type: string
          format: date-time
          description: The configured earliest start instant.
          example: '2026-07-20T01:00:00Z'
        calling_window:
          $ref: '#/components/schemas/CallingWindow'
        total_recipients:
          type: integer
          minimum: 0
          example: 2
        pending_recipients:
          type: integer
          minimum: 0
          example: 2
        queued_recipients:
          type: integer
          minimum: 0
          example: 0
        in_progress_recipients:
          type: integer
          minimum: 0
          example: 0
        completed_recipients:
          type: integer
          minimum: 0
          example: 0
        failed_recipients:
          type: integer
          minimum: 0
          example: 0
        cancelled_recipients:
          type: integer
          minimum: 0
          example: 0
        answered_recipients:
          type: integer
          minimum: 0
          example: 0
        no_answer_recipients:
          type: integer
          minimum: 0
          example: 0
        busy_recipients:
          type: integer
          minimum: 0
          example: 0
        started_at:
          type: string
          format: date-time
          description: When dispatch began.
          example: '2026-07-20T01:00:00Z'
        paused_at:
          type: string
          format: date-time
          description: When the batch was paused.
          example: '2026-07-20T01:00:00Z'
        completed_at:
          type: string
          format: date-time
          description: When the batch reached completion.
          example: '2026-07-20T01:00:00Z'
        cancelled_at:
          type: string
          format: date-time
          description: When the batch was cancelled.
          example: '2026-07-20T01:00:00Z'
        created_at:
          type: string
          format: date-time
          description: When the batch was created.
          example: '2026-07-20T01:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: When the batch was last updated.
          example: '2026-07-20T01:00:00Z'
      required:
        - id
        - status
        - name
        - agent_id
        - total_recipients
        - pending_recipients
        - queued_recipients
        - in_progress_recipients
        - completed_recipients
        - failed_recipients
        - cancelled_recipients
        - answered_recipients
        - no_answer_recipients
        - busy_recipients
        - created_at
        - updated_at
    ErrorEnvelope:
      type: object
      additionalProperties: false
      properties:
        error:
          $ref: '#/components/schemas/Error'
      required:
        - error
    CallingWindow:
      type: object
      additionalProperties: false
      description: >-
        One contiguous daily calling window. The runtime requires end_time to be
        later than start_time; x-brightalk-end-after-start records that
        checker-only cross-field rule because standard JSON Schema cannot
        compare two time strings.
      x-brightalk-end-after-start: true
      properties:
        time_zone:
          type: string
          enum:
            - Asia/Taipei
            - Asia/Hong_Kong
            - Asia/Shanghai
            - Asia/Tokyo
            - Asia/Seoul
            - Asia/Singapore
            - Asia/Bangkok
            - America/Los_Angeles
            - America/New_York
            - Europe/London
          example: Asia/Taipei
        weekdays:
          type: array
          minItems: 1
          maxItems: 7
          uniqueItems: true
          items:
            type: string
            enum:
              - sunday
              - monday
              - tuesday
              - wednesday
              - thursday
              - friday
              - saturday
          example:
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
        start_time:
          type: string
          pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
          example: '09:00'
        end_time:
          type: string
          pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
          example: '18:00'
      required:
        - time_zone
        - weekdays
        - start_time
        - end_time
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
          enum:
            - authentication_required
            - invalid_api_key
            - api_key_expired
            - organization_not_enabled
            - insufficient_scope
            - unsupported_version
            - validation_error
            - invalid_json
            - resource_not_found
            - resource_state_conflict
            - method_not_allowed
            - request_too_large
            - unsupported_destination
            - contact_identity_conflict
            - idempotency_key_required
            - idempotency_conflict
            - idempotency_in_progress
            - duplicate_active_run
            - rate_limit_exceeded
            - internal_error
          example: validation_error
        message:
          type: string
          example: The request could not be validated.
        request_id:
          type: string
          pattern: ^[A-Za-z0-9._:-]{1,64}$
          example: req_demo_001
        details:
          $ref: '#/components/schemas/ErrorDetails'
      required:
        - code
        - message
        - request_id
    ErrorDetails:
      type: object
      additionalProperties: false
      properties:
        fields:
          type: array
          maxItems: 50
          items:
            $ref: '#/components/schemas/ErrorField'
        truncated:
          type: boolean
          const: true
        supported_versions:
          type: array
          items:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        existing_run_id:
          type: string
          minLength: 1
          maxLength: 255
          description: An opaque resource identifier.
          example: run_demo_001
    ErrorField:
      type: object
      additionalProperties: false
      properties:
        path:
          type: string
          example: recipient.phone_number
        code:
          type: string
          example: invalid_e164
      required:
        - path
        - code
  responses:
    BadRequest:
      description: >-
        The version, request, query, or state-independent destination validation
        failed.
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            validationError:
              value:
                error:
                  code: validation_error
                  message: The request could not be validated.
                  request_id: req_demo_001
                  details:
                    fields:
                      - path: recipient.phone_number
                        code: invalid_e164
            unsupportedVersion:
              value:
                error:
                  code: unsupported_version
                  message: The requested API version is not supported.
                  request_id: req_demo_001
                  details:
                    supported_versions:
                      - '2026-07-16'
            unsupportedDestination:
              value:
                error:
                  code: unsupported_destination
                  message: The destination is not supported.
                  request_id: req_demo_001
    Unauthorized:
      description: Authentication failed.
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            missingBearer:
              value:
                error:
                  code: authentication_required
                  message: Authentication is required.
                  request_id: req_demo_001
            malformedBearer:
              value:
                error:
                  code: authentication_required
                  message: Authentication is required.
                  request_id: req_demo_001
            unknownOrRevokedCredential:
              value:
                error:
                  code: invalid_api_key
                  message: The API key is invalid.
                  request_id: req_demo_001
            expiredCredential:
              value:
                error:
                  code: api_key_expired
                  message: The API key has expired.
                  request_id: req_demo_001
    Forbidden:
      description: >-
        The organization is not enabled or the credential lacks a required
        scope.
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            organizationNotEnabled:
              value:
                error:
                  code: organization_not_enabled
                  message: The organization is not enabled for the Public API.
                  request_id: req_demo_001
            insufficientScope:
              value:
                error:
                  code: insufficient_scope
                  message: The API key does not have the required scope.
                  request_id: req_demo_001
    MethodNotAllowed:
      description: The path is known but the method is not allowed.
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Allow:
          $ref: '#/components/headers/Allow'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            methodNotAllowed:
              value:
                error:
                  code: method_not_allowed
                  message: The method is not allowed for this resource.
                  request_id: req_demo_001
    TooManyRequests:
      description: The selected request bucket is exhausted.
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            rateLimitExceeded:
              value:
                error:
                  code: rate_limit_exceeded
                  message: The rate limit has been exceeded.
                  request_id: req_demo_001
    InternalError:
      description: The request could not be completed safely.
      headers:
        Brightalk-Version:
          $ref: '#/components/headers/Brightalk-Version'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimit-Limit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimit-Remaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            internalError:
              value:
                error:
                  code: internal_error
                  message: An unexpected error occurred.
                  request_id: req_demo_001
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Brightalk API key
      description: Use a private-beta server credential in the Authorization header.

````