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

# Terminate outbound calls

> Terminate or hang up an in-flight outbound call.


Hangs up a call that has not yet reached `phase=terminal`. Drives the call to `phase=terminal`, `outcome=canceled`. Don't use this API on a call that's already terminal. It returns the call's existing terminal state, not an error.


## OpenAPI

````yaml agent-platform/api-specs/outbound-calls.yaml post /api/v1/project/{projectSlug}/{env}/outbound-calls/{outboundCallId}/terminate
openapi: 3.1.0
info:
  title: Outbound Dial API
  version: 1.0.0
  summary: >-
    Project-scoped API for placing, tracking, and terminating outbound phone/SIP
    calls through KoreVG.
  description: >
    Places an outbound call through a project's telephony channel connection,
    and lets you

    track it through to completion — either by polling, by listing/searching the
    call log, or

    by subscribing to a live server-sent-events stream.


    Outbound calls are asynchronous by nature. Initiating a call returns
    immediately with an

    `outboundCallId` and an initial `phase` of `accepted` — the call has been
    accepted for

    submission, not yet answered. Track its progress with `GET
    .../outbound-calls/{id}`, the

    live event stream at `GET .../outbound-calls/{id}/events`, or by
    listing/searching the call

    log.


    ### Call lifecycle


    A call moves through `phase` values in order: `accepted` → `dialing` →
    `ringing` →

    `in_progress` (answered) → `terminal` (call has ended, either way). Once a
    call reaches

    `terminal`, `outcome` explains how it ended (`completed`, `busy`,
    `rejected`, `no_answer`,

    `machine`, `failed`, `canceled`, or `expired`), and `failureReason` carries
    additional

    detail for a non-`completed` outcome. A call that connects (`in_progress`)
    creates a

    session — `sessionId` on the call record correlates to that session's own
    history/traces

    once available.


    ### Idempotency


    Every initiate request requires an `idempotencyKey`. Retrying the identical
    request body

    with the same key returns the **original** call (`200`) instead of placing a
    duplicate

    call (`201` on first submission). Reusing the same key with a **different**
    body is

    rejected with `409 IDEMPOTENCY_CONFLICT` — pick a new key for a genuinely
    different call.


    ### Authentication


    Authenticate with the `x-api-key` header, using a Platform API key

    (`abl_...`) scoped to the project you are calling. Write operations
    (initiate, terminate)

    require the `outbound_calls.initiate` scope; read operations (lookup, list,
    summary,

    search, event stream) require `outbound_calls.read`.


    ### Privacy


    `destination` is always returned masked on the wire (e.g. `+1*******67`) —
    the full

    number is never echoed back after initiation. `providerCallSid` (the
    underlying telephony

    provider's own call identifier) is likewise masked in call-log responses.
    List and search

    responses never carry an unmasked destination either; use `POST
    .../outbound-calls/search`

    with the real number to look a call up by destination — it is matched
    against a blind

    index server-side, so the raw number never appears in a URL or is logged in
    access logs.


    ### Isolation


    A call belonging to a different project is concealed as `404
    CHANNEL_NOT_FOUND` /

    `404 Not Found`, never `403` — the API does not disclose whether a resource
    exists outside

    your project's scope.
servers:
  - url: https://example.com
    description: Base URL of your platform.
    variables:
      host:
        default: runtime.example.com
security:
  - ApiKeyAuth: []
tags:
  - name: Outbound Calls
    description: Place and track outbound phone/SIP calls.
paths:
  /api/v1/project/{projectSlug}/{env}/outbound-calls/{outboundCallId}/terminate:
    post:
      tags:
        - Outbound Calls
      summary: Terminate (hang up) an in-flight outbound call
      description: |
        Terminate or hang up an in-flight outbound call.
      operationId: terminateOutboundCall
      parameters:
        - $ref: '#/components/parameters/ProjectSlug'
        - $ref: '#/components/parameters/Env'
        - $ref: '#/components/parameters/OutboundCallId'
      responses:
        '200':
          description: The call's post-termination state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminateOutboundCallResponse'
              example:
                success: true
                data:
                  outboundCallId: oc_01a0a4af5a417f5186af
                  phase: terminal
                  outcome: canceled
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    ProjectSlug:
      name: projectSlug
      in: path
      required: true
      description: The project's slug.
      schema:
        type: string
        minLength: 1
    Env:
      name: env
      in: path
      required: true
      description: >-
        Deployment environment segment the call runs under, e.g. `production`,
        `staging`, `dev`.
      schema:
        type: string
        minLength: 1
    OutboundCallId:
      name: outboundCallId
      in: path
      required: true
      description: Identifier returned when the call was initiated.
      schema:
        type: string
        minLength: 1
  schemas:
    TerminateOutboundCallResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          required:
            - outboundCallId
            - phase
            - outcome
          properties:
            outboundCallId:
              type: string
            phase:
              $ref: '#/components/schemas/OutboundCallPhase'
            outcome:
              oneOf:
                - $ref: '#/components/schemas/OutboundCallOutcome'
                - type: 'null'
    OutboundCallPhase:
      type: string
      description: >
        Lifecycle phase, in order: accepted=submitted, not yet dialing;
        dialing=submitted to

        the carrier; ringing=destination is ringing; in_progress=answered, call
        is live;

        terminal=call has ended (see `outcome`).
      enum:
        - accepted
        - dialing
        - ringing
        - in_progress
        - terminal
    OutboundCallOutcome:
      type: string
      description: >
        How a terminal call ended. completed=ended normally after connecting;

        busy=destination was busy; rejected=destination actively
        declined/rejected the call;

        no_answer=rang without being picked up; machine=answering machine
        detected (only

        possible with `amdMode` other than `off`); failed=a hard failure
        prevented completion;

        canceled=terminated by a `.../terminate` call before it connected;
        expired=the call was

        abandoned before reaching a provider-reported outcome.
      enum:
        - completed
        - busy
        - rejected
        - no_answer
        - machine
        - failed
        - canceled
        - expired
    ErrorEnvelope:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code.
            message:
              type: string
              description: Human-readable detail.
            requestId:
              type: string
              description: Correlates this failure to platform-side logs.
  responses:
    Unauthorized:
      description: Missing or invalid `x-api-key`, or the key lacks the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: >
        `error.code=CHANNEL_NOT_FOUND` — either the `channelConnectionId`
        doesn't exist, or

        the `outboundCallId` doesn't exist or belongs to a different project
        (isolation is

        enforced by concealment, not a `403`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    InternalError:
      description: Unexpected failure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >
        Project-bound Platform API key (`abl_...`). The key must carry
        `outbound_calls.initiate`

        for write operations (initiate, terminate) or `outbound_calls.read` for
        read operations

        (lookup, list, summary, search, event stream).

````