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

# Cancel Async Task



## OpenAPI

````yaml api-reference/endpoint/docparse/openapi.json post /v1/async/cancel/{task_id}
openapi: 3.1.0
info:
  title: OpenAPI Aryn DocParse
  description: DocParse API
  version: 0.1.0
servers:
  - url: https://api.aryn.cloud
    description: US Region
  - url: https://api.aryn.ai
    description: US Region
  - url: https://api.us.aryn.ai
    description: US Region
  - url: https://api.us.aryn.cloud
    description: US Region
security: []
paths:
  /v1/async/cancel/{task_id}:
    post:
      tags:
        - Partition
      summary: Cancel Async Task
      operationId: _async_partition_document_cancel_v1
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task ID
        - name: User-Agent
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: User-Agent
        - name: path_filter
          in: query
          required: true
          schema:
            type: string
            enum:
              - ^/v1/document/partition$
            title: Path Filter
      responses:
        '200':
          description: Task Cancelled Successfully
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    examples:
                      - No Aryn API key provided.
        '404':
          description: No such task.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    examples:
                      - Task not found.
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                type: string
                examples:
                  - Internal Server Error
      security:
        - HTTPBearer: []
components:
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````