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

# Cancel Call

> Cancel a queued call. Only calls with status `QUEUED` can be cancelled.



## OpenAPI

````yaml POST /calls/{id}/cancel
openapi: 3.1.0
info:
  title: RevRing Voice AI API
  description: >-
    RevRing Voice AI platform API for managing AI voice agents, phone calls, SIP
    trunks, and analytics. Build intelligent voice applications that can handle
    inbound and outbound phone calls with AI-powered conversational agents.
  version: 1.0.0
  contact:
    name: RevRing Support
    url: https://revring.ai
servers:
  - url: https://api.revring.ai/v1
    description: Production API
security:
  - apiKeyAuth: []
tags:
  - name: Messaging Connections
    description: Connect messaging providers so agents can send text messages
  - name: Messages
    description: Send text messages and read your message log
  - name: Conversations
    description: List and clear managed conversation threads
  - name: SIP Trunks
    description: Manage SIP trunks for connecting agents to the phone network
  - name: Agents
    description: Manage AI voice agents and their configuration
  - name: Agent Folders
    description: Organize agents into folders for dashboard navigation
  - name: Calls
    description: Manage and query phone calls
  - name: Analytics
    description: Get analytics and metrics about your calls
  - name: Knowledge Bases
    description: >-
      Manage knowledge bases and sources for agent retrieval-augmented
      generation
  - name: Test Suites
    description: Manage test suites, test cases, and test runs for agent evaluation
  - name: Voices
    description: Browse the voices available to your organization for agent speech
paths:
  /calls/{id}/cancel:
    parameters:
      - name: id
        in: path
        required: true
        description: Call ID
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Calls
      summary: Cancel Call
      description: Cancel a queued call. Only calls with status `QUEUED` can be cancelled.
      operationId: cancelCall
      responses:
        '200':
          description: Call cancelled
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Call'
        '400':
          description: Call is not cancellable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: call_not_cancellable
                  message:
                    type: string
                    example: Only queued calls can be cancelled
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/BillingInactiveError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    Call:
      type: object
      description: Phone call record
      properties:
        id:
          type: string
          format: uuid
        organizationId:
          type: string
          format: uuid
        agentId:
          type: string
          format: uuid
          nullable: true
        sipTrunkId:
          type: string
          format: uuid
          nullable: true
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
          description: Call direction
        status:
          type: string
          enum:
            - QUEUED
            - INITIATED
            - ONGOING
            - TRANSFERRED
            - COMPLETED
            - FAILED
            - CANCELED
          description: Current call status
        fromNumber:
          type: string
          description: >-
            Caller's number (E.164). For web widget calls, the visitor's
            anonymous ID in the form visitor:<id>.
        toNumber:
          type: string
          description: Called number (E.164). For web widget calls, the agent ID.
        source:
          type: string
          nullable: true
          enum:
            - web_widget
            - null
          description: >-
            How the call originated. web_widget for calls started from the Web
            Widget call button; null for phone calls.
        continuedFromCallId:
          type: string
          nullable: true
          description: >-
            When a dropped web widget call was silently re-dialed, the id of the
            call this one continues; null otherwise.
        agentCallerIdName:
          type: string
          nullable: true
          description: Caller ID name shown to recipient
        agentName:
          type: string
          nullable: true
          description: Name of the agent that handled this call
        variables:
          type: object
          nullable: true
          description: Template variables used
        recordingUrl:
          type: string
          nullable: true
          description: URL to call recording (available after call ends)
        hangupCause:
          type: string
          nullable: true
          description: >-
            Reason call ended. Common values: USER_ENDED, END_CALL_TOOL,
            SILENCE_TIMEOUT, MAX_DURATION, VOICEMAIL_DETECTED
        errorMessage:
          type: string
          nullable: true
          description: Error message if call failed
        transcript:
          type: array
          nullable: true
          description: Conversation transcript
          items:
            type: object
        summary:
          type: string
          nullable: true
          description: AI-generated summary
        metrics:
          type: object
          nullable: true
          description: Call quality and performance metrics
        initiatedAt:
          type: string
          format: date-time
          description: When call was initiated
        startedAt:
          type: string
          format: date-time
          nullable: true
          description: When call was answered (null if never answered)
        endedAt:
          type: string
          format: date-time
          nullable: true
          description: When call ended (null if still ongoing)
        durationSeconds:
          type: integer
          nullable: true
          description: Call duration in seconds (null if never answered)
        postCallWebhookStatus:
          type: string
          nullable: true
          enum:
            - sent
            - failed
            - null
          description: Status of post-call webhook delivery
        preCallWebhookStatus:
          type: string
          nullable: true
          enum:
            - sent
            - failed
            - skipped
            - null
          description: Status of pre-call webhook delivery
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - organizationId
        - direction
        - status
        - fromNumber
        - toNumber
        - initiatedAt
        - createdAt
        - updatedAt
  responses:
    UnauthorizedError:
      description: Authentication required or API key invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: unauthorized
    BillingInactiveError:
      description: Subscription inactive or billing issue
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: billing_inactive
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: not_found
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Generate API keys from the RevRing
        dashboard.

````