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

# Place or schedule several calls

> Always returns 200; each item carries its own status and error.



## OpenAPI

````yaml /openapi/v2.json post /calls/bulk
openapi: 3.1.0
info:
  title: Oktivo API v2
  version: 2.0.0
  description: >-
    Layered, database-agnostic API. Every success response is `{ success: true,
    requestId, timestamp, data, meta? }`; every error is `{ success: false,
    requestId, error: { code, message, details? } }`. Authenticate with an API
    token or a dashboard JWT as a Bearer token (same credentials as
    /api/v1/crm).
servers:
  - url: https://client-backend.oktivo.com/api/v2
security:
  - bearerAuth: []
tags:
  - name: Calls
  - name: Call queue
  - name: Events
  - name: Webhooks
  - name: Agents
  - name: Leads
  - name: Tickets
  - name: Shopify
  - name: Operations
paths:
  /calls/bulk:
    post:
      tags:
        - Calls
      summary: Place or schedule several calls
      description: Always returns 200; each item carries its own status and error.
      operationId: createCallsBulk
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/RequestId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                calls:
                  type: array
                  items:
                    type: object
                    properties:
                      phone:
                        type: string
                        pattern: ^\+[1-9]\d{1,14}$
                      agentId:
                        type: string
                        minLength: 1
                        maxLength: 128
                      dynamicVariables:
                        type: object
                        additionalProperties:
                          type: string
                          maxLength: 512
                        propertyNames:
                          minLength: 1
                          maxLength: 64
                      deferIfUnavailable:
                        type: boolean
                      scheduledAt:
                        type: string
                        pattern: >-
                          ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z|[+-]\d{2}:\d{2})$
                      name:
                        type: string
                        minLength: 1
                        maxLength: 128
                      callerId:
                        type: string
                        minLength: 1
                        maxLength: 32
                    required:
                      - phone
                      - agentId
                    additionalProperties: false
                  minItems: 1
                  maxItems: 1000
                deferIfUnavailable:
                  type: boolean
                scheduledAt:
                  type: string
                  pattern: >-
                    ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?(Z|[+-]\d{2}:\d{2})$
              required:
                - calls
              additionalProperties: false
      responses:
        '200':
          description: Per-item results
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
            Idempotent-Replay:
              $ref: '#/components/headers/Idempotent-Replay'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
        '401':
          description: Missing or invalid credentials
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Authenticated but not allowed (feature not enabled for the account)
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            An identical request with this Idempotency-Key is still in progress,
            or the resource conflicts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation failed
          headers:
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        8-128 chars of [A-Za-z0-9_.:-]. Same key and body replays the stored
        response for 24h; same key with another body returns 422.
      schema:
        type: string
        pattern: ^[\w.:-]{8,128}$
    RequestId:
      name: X-Request-ID
      in: header
      required: false
      description: >-
        Correlation id (1-128 chars of [A-Za-z0-9_.-]). Echoed in the response;
        generated when absent or unsafe.
      schema:
        type: string
        pattern: ^[\w.-]{1,128}$
  headers:
    RateLimit-Limit:
      description: Requests allowed in the current window
      schema:
        type: integer
    RateLimit-Remaining:
      description: Requests left in the current window
      schema:
        type: integer
    RateLimit-Reset:
      description: Seconds until the window resets
      schema:
        type: integer
    X-Request-ID:
      description: Correlation id of this request
      schema:
        type: string
    Idempotent-Replay:
      description: >-
        true when the response was replayed from a previous request with the
        same Idempotency-Key
      schema:
        type: string
        enum:
          - 'true'
    Retry-After:
      description: Seconds to wait before retrying
      schema:
        type: integer
  schemas:
    Envelope:
      type: object
      required:
        - success
        - requestId
        - timestamp
        - data
      properties:
        success:
          type: boolean
          const: true
        requestId:
          type: string
        timestamp:
          type: string
          format: date-time
        data: {}
        meta:
          type: object
          additionalProperties: true
          description: 'Pagination: { limit, nextCursor } or { page, limit, total }'
    Error:
      type: object
      required:
        - success
        - requestId
        - error
      properties:
        success:
          type: boolean
          const: false
        requestId:
          type: string
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable code, e.g. VALIDATION_ERROR
            message:
              type: string
            details: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token (okt_...) or dashboard JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.