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

# Cancel an async job

> Requests cancellation of any async job by `job_id`, whatever its task. Accepting the request does not guarantee the job stopped — poll the task's status endpoint until it reads `cancelled`. An unknown or foreign `job_id` returns 404.



## OpenAPI

````yaml /openapi.json post /v2/async/jobs/{job_id}/cancel
openapi: 3.1.0
info:
  title: Nixtla Forecast API
  description: >-
    API for TimeGPT forecast. Just send your data as json and get results. We do
    the heavy lifting.
  version: 0.4.2
servers:
  - url: https://api.nixtla.io
security: []
paths:
  /v2/async/jobs/{job_id}/cancel:
    post:
      tags:
        - async jobs
      summary: Cancel an async job
      description: >-
        Requests cancellation of any async job by `job_id`, whatever its task.
        Accepting the request does not guarantee the job stopped — poll the
        task's status endpoint until it reads `cancelled`. An unknown or foreign
        `job_id` returns 404.
      operationId: cancel_async_job_v2_async_jobs__job_id__cancel_post
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncJobSubmitResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AsyncJobSubmitResponse:
      properties:
        job_id:
          type: string
          title: Job Id
          description: >-
            Identifier for the accepted job. Prefixed per task (e.g. `fc-` for
            forecast).
          examples:
            - fc-4f2a1c9e8b7d4a6f9c3e1b5d7a9f2c4e
      type: object
      required:
        - job_id
      title: AsyncJobSubmitResponse
      description: >-
        The 202 every async submit returns. Shared by all tasks — they differ in
        request, not reply.
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: HTTPBearer
      scheme: bearer

````