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

# Cancel a pending call



## OpenAPI

````yaml /openapi/v2.json delete /calls/{id}
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/{id}:
    delete:
      tags:
        - Calls
      summary: Cancel a pending call
      operationId: cancelCall
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
        - $ref: '#/components/parameters/RequestId'
      responses:
        '200':
          description: The cancelled call
          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/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'
        '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:
    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
    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.