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

# Create a task batch

> Create up to 10,000 Tasks from either an explicit tasks array or a Contact List plus one Task template. Each Task uses the same fields and retry contract as POST /api/v2/tasks. Submissions over 1,000 Tasks require Idempotency-Key and return 202 while they are created.



## OpenAPI

````yaml post /api/v2/tasks/batches
openapi: 3.0.0
info:
  version: 2.0.0
  title: Vida API
  description: Vida API Documentation
servers:
  - url: https://api.vida.dev
    description: Vida Production
    variables:
      baseUrl:
        default: api.vida.dev
        description: Production API Root
security: []
paths:
  /api/v2/tasks/batches:
    post:
      tags:
        - Tasks
      summary: Create a task batch
      description: >-
        Create up to 10,000 Tasks from either an explicit tasks array or a
        Contact List plus one Task template. Each Task uses the same fields and
        retry contract as POST /api/v2/tasks. Submissions over 1,000 Tasks
        require Idempotency-Key and return 202 while they are created.
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Required for submissions over 1,000 Tasks. Repeating the same key
            and payload safely resumes or returns that submission; reusing it
            for a different payload returns 409.
          schema:
            type: string
            maxLength: 200
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tasks:
                  type: array
                  minItems: 1
                  maxItems: 10000
                  description: >-
                    Explicit Task objects. Each requires type; call, text, and
                    email also require target.
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - call
                          - text
                          - email
                          - ping
                      target:
                        type: string
                      accountId:
                        type: integer
                      context:
                        type: string
                      taskContext:
                        type: string
                      greeting:
                        type: string
                      waitToGreet:
                        type: boolean
                      message:
                        type: string
                      scheduledFor:
                        type: integer
                      externalTaskId:
                        type: string
                        description: >-
                          Reusable correlation/grouping ID, not an idempotency
                          key
                      contactListName:
                        type: string
                      goal:
                        type: object
                        nullable: true
                        description: >-
                          Requires completionCriteria; omitted or null inherits
                          the organization default
                      retryPolicy:
                        type: object
                        nullable: true
                        description: >-
                          Supports delaysSeconds or mixed-channel steps plus
                          retryOn and responseTimeoutSeconds; omitted or null
                          inherits the organization default
                      meta:
                        type: object
                contactListName:
                  type: string
                  description: Create one Task for every eligible Contact List member
                task:
                  type: object
                  description: >-
                    Task template without target for the selected Contact List.
                    Supports call, text, and email and the same goal/retryPolicy
                    fields as POST /api/v2/tasks.
      responses:
        '201':
          description: Task batch created
        '202':
          description: Large Task submission accepted for asynchronous creation
        '400':
          description: Invalid Task template or Contact List
        '401':
          description: Unauthorized
        '409':
          description: Idempotency-Key was already used for a different payload
        '500':
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: Vida API Token

````