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

# Post Chat Cancel

> Cancel an in-progress task. Sends A2A tasks/cancel to the orchestrator. Only allowed if the task's session belongs to the same user and project.



## OpenAPI

````yaml /openapi/em-talk2data-v2.yaml post /talk2data/chat/messages/{task_id}/cancel
openapi: 3.1.0
info:
  title: Talk to Data Service
  version: 3.2.0-dev1
servers: []
security: []
paths:
  /talk2data/chat/messages/{task_id}/cancel:
    post:
      tags:
        - chat
      summary: Post Chat Cancel
      description: >-
        Cancel an in-progress task. Sends A2A tasks/cancel to the orchestrator.
        Only allowed if the task's session belongs to the same user and project.
      operationId: post_chat_cancel_talk2data_chat_messages__task_id__cancel_post
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            description: Project identifier
            title: X-Project-Id
          description: Project identifier
      responses:
        '200':
          description: Task canceled
          content:
            application/json:
              schema: {}
        '403':
          description: Access denied
        '404':
          description: Task not found
        '409':
          description: Task already completed or failed (cannot cancel)
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````