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

# Cancel Call Task

> Cancels a call task so that it is not called.

Returns a `200 OK` response with `canceled: true` when the task was still waiting to be called, and `canceled: false` when it had already reached a terminal status, in which case the request is a no-op.

When a call is already under way the cancellation cannot take effect immediately: the endpoint returns a `202 Accepted` response with `cancel_requested: true`, the call in progress runs its course, and no further call is placed.



## OpenAPI

````yaml DELETE /call-tasks/{CALL_TASK_ID}
openapi: 3.0.1
info:
  title: Alpharun API
  description: Alpharun REST API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.alpharun.com/api/v1
security:
  - bearerAuth: []
paths:
  /call-tasks/{CALL_TASK_ID}:
    delete:
      description: >-
        Cancels a call task so that it is not called.


        Returns a `200 OK` response with `canceled: true` when the task was
        still waiting to be called, and `canceled: false` when it had already
        reached a terminal status, in which case the request is a no-op.


        When a call is already under way the cancellation cannot take effect
        immediately: the endpoint returns a `202 Accepted` response with
        `cancel_requested: true`, the call in progress runs its course, and no
        further call is placed.
      parameters:
        - name: CALL_TASK_ID
          in: path
          description: ID of the call task
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Call task canceled, or already terminal
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - canceled
                      - cancel_requested
                    properties:
                      canceled:
                        type: boolean
                        description: >-
                          `true` when this request canceled the task, `false`
                          when it had already reached a terminal status.
                      cancel_requested:
                        type: boolean
                        description: '`false` on a `200` response; see the `202` response.'
              example:
                data:
                  canceled: true
                  cancel_requested: false
        '202':
          description: Cancellation recorded while a call was under way
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - canceled
                      - cancel_requested
                    properties:
                      canceled:
                        type: boolean
                        description: >-
                          Always `false`: the call under way could not be
                          canceled.
                      cancel_requested:
                        type: boolean
                        description: >-
                          Always `true`: no further call will be placed once the
                          call under way ends.
              example:
                data:
                  canceled: false
                  cancel_requested: true
        '404':
          description: Call task not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````