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

# Cancel a step within an execution



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/org/executions/{execution_id}/steps/{step_id}/cancel
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/executions/{execution_id}/steps/{step_id}/cancel:
    post:
      tags:
        - Executions API
      summary: Cancel a step within an execution
      operationId: >-
        cancel_step_endpoint_api_v1_org_executions__execution_id__steps__step_id__cancel_post
      parameters:
        - in: path
          name: execution_id
          required: true
          schema:
            format: uuid4
            title: Execution Id
            type: string
        - in: path
          name: step_id
          required: true
          schema:
            format: uuid4
            title: Step Id
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelStepResponse'
          description: Successful Response
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    CancelStepResponse:
      properties:
        execution_id:
          format: uuid
          title: Execution Id
          type: string
        status:
          $ref: '#/components/schemas/JobStatus'
        step_id:
          format: uuid
          title: Step Id
          type: string
      required:
        - execution_id
        - step_id
        - status
      title: CancelStepResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    JobStatus:
      enum:
        - running
        - success
        - failed
        - timeout
        - pending
        - blocked
        - cancelling
        - cancelled
      title: JobStatus
      type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````