> ## 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.

# Trigger a single outbound call



## OpenAPI

````yaml /openapi/v1.json post /api/v1/crm/calls
openapi: 3.1.0
info:
  title: Oktivo CRM API v1
  version: 1.0.0
  description: >-
    The /api/v1/crm API. Every JSON object body now also carries `requestId`;
    success bodies add `timestamp` and (for paged lists) `meta`; error bodies
    add `code` and `errorInfo: { code, message, details? }`. Every field the
    routes returned before is unchanged. v1 `errorInfo` maps to v2 `error`.
    Legacy fields (`logs`, `log`, `endpoint`, `endpoints`, the string `error`,
    duplicated `message`) are frozen: never extended, removed only in a future
    major version with a Sunset date announced at least 6 months ahead. `GET
    /api/v1/crm/track.js` (the tracking script) is not listed.
servers:
  - url: https://client-backend.oktivo.com
security: []
tags:
  - name: Calls
  - name: Events
  - name: Webhooks
  - name: Agents
  - name: Leads
  - name: Tickets
  - name: Tracking
  - name: Shopify
  - name: Tokens
paths:
  /api/v1/crm/calls:
    post:
      tags:
        - Calls
      summary: Trigger a single outbound call
      operationId: triggerCall
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/RequestId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone:
                  type: string
                  description: E.164, e.g. +14155551234
                name:
                  type: string
                agentId:
                  type: string
                dynamicVariables:
                  type: object
                  properties: {}
                  additionalProperties: true
                deferIfUnavailable:
                  type: boolean
                scheduledAt:
                  type: string
                  description: ISO 8601 with UTC offset
                retryConfig:
                  type: object
                  properties:
                    retryCount:
                      type: integer
                    retryDelays:
                      type: array
                      items:
                        type: number
                  required:
                    - retryCount
                    - retryDelays
                  additionalProperties: true
              required:
                - phone
                - name
                - agentId
              additionalProperties: true
      responses:
        '201':
          description: Call placed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerCallResponse'
        '202':
          description: Call queued (scheduledAt or deferIfUnavailable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeferredCallResponse'
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1ErrorResponse'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1ErrorResponse'
        '402':
          description: Insufficient credits; `available` and `required` are included
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1ErrorResponse'
        '403':
          description: >-
            Contact is on the do-not-disturb list (`CONTACT_ON_DND`) or the
            feature is not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1ErrorResponse'
        '409':
          description: '`IDEMPOTENCY_IN_PROGRESS`: a request with this key is still running'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1ErrorResponse'
        '422':
          description: '`IDEMPOTENCY_KEY_REUSED`: the key was used with a different request'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1ErrorResponse'
        '429':
          description: Rate limit exceeded; see Retry-After
          headers:
            Retry-After:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1ErrorResponse'
        '500':
          description: Unexpected server error; quote `requestId` when contacting support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1ErrorResponse'
      security:
        - bearerAuth: []
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 (header Idempotent-Replay: true); same key with another body
        returns 422; a request still in progress returns 409. If the idempotency
        store is unavailable the request is processed without protection
        (fail-open).
      schema:
        type: string
        pattern: ^[\w.:-]{8,128}$
    RequestId:
      name: X-Request-ID
      in: header
      required: false
      description: >-
        Correlation id, echoed in the response header and in `requestId`;
        generated when absent or unsafe.
      schema:
        type: string
        pattern: ^[\w.-]{1,128}$
  schemas:
    TriggerCallResponse:
      allOf:
        - $ref: '#/components/schemas/V1SuccessEnvelope'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/CallRef'
          required:
            - success
            - data
          additionalProperties: true
    DeferredCallResponse:
      allOf:
        - $ref: '#/components/schemas/V1SuccessEnvelope'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/DeferredCall'
          required:
            - success
            - data
          additionalProperties: true
    V1ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
          description: Legacy summary. Same text as `errorInfo.message`.
        code:
          type: string
          description: Stable machine-readable code. Same value as `errorInfo.code`.
        requestId:
          type: string
          description: Same value as the `X-Request-ID` response header.
        errorInfo:
          $ref: '#/components/schemas/V1ErrorInfo'
        errors:
          type: array
          description: Field-level validation errors (400 `VALIDATION_ERROR`).
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            additionalProperties: true
        error:
          type: string
          description: >-
            Legacy error text returned by webhook, campaign-webhook and log
            routes. The tracking route returns an object here. Frozen legacy
            field: kept in v1 exactly as is, never extended; removal only in a
            future major version with a Sunset date announced at least 6 months
            ahead.
          x-frozen: true
        available:
          type: number
          description: '402 only: credits available.'
        required:
          type: number
          description: '402 only: credits required.'
        reason:
          type: string
          description: Extra reason such as `dnd`.
      required:
        - success
        - message
        - code
        - requestId
        - errorInfo
      additionalProperties: true
      examples:
        - success: false
          message: Validation failed
          errors:
            - field: phone
              message: phone is required
          code: VALIDATION_ERROR
          requestId: 3f1c2c0e-6a41-4e0b-9f0e-1f2d6f1b8a77
          errorInfo:
            code: VALIDATION_ERROR
            message: Validation failed
            details:
              - field: phone
                message: phone is required
    V1SuccessEnvelope:
      type: object
      properties:
        success:
          type: boolean
          description: >-
            `true` on success. The webhook test delivery returns `200` with
            `success: false` when the receiver failed.
        requestId:
          type: string
          description: >-
            Same value as the `X-Request-ID` response header. Added to every
            JSON object success body.
        timestamp:
          type: string
          format: date-time
          description: Server time when the response was produced.
        meta:
          $ref: '#/components/schemas/V1Meta'
      required:
        - success
      description: >-
        Additive envelope fields present on every migrated v1 success body. All
        fields the route returned before are still returned unchanged.
      additionalProperties: true
    CallRef:
      type: object
      properties:
        contactUID:
          type: string
          description: Poll `GET /calls/{contactUID}` with this id.
        campaignUID:
          type: string
      required:
        - contactUID
        - campaignUID
      additionalProperties: true
    DeferredCall:
      type: object
      properties:
        status:
          type: string
          enum:
            - scheduled
            - deferred
        reason:
          type: string
        notBefore:
          type: string
          format: date-time
        scheduledFor:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        deferredCallId:
          type: string
        contactUID:
          type: string
      required:
        - status
        - notBefore
        - deferredCallId
        - contactUID
      additionalProperties: true
    V1ErrorInfo:
      type: object
      properties:
        code:
          type: string
          description: Stable machine-readable code. See the error code table.
        message:
          type: string
          description: Human-readable summary. Do not parse it.
        details:
          description: >-
            Field errors (the legacy `errors` array), or the extra context of
            the error such as `available` and `required`.
      required:
        - code
        - message
      description: >-
        v1 spelling of the standard error object. v2 returns the same three keys
        under `error`.
      additionalProperties: true
    V1Meta:
      type: object
      properties:
        page:
          type: integer
        pageSize:
          type: integer
        total:
          type: integer
        totalPages:
          type: integer
        hasMore:
          type: boolean
        limit:
          type: integer
        nextCursor:
          type: string
      description: >-
        Additive mirror of the legacy `pagination` object. Only the keys that
        the legacy object has are present. Responses without `pagination` have
        no `meta`.
      additionalProperties: true
  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.