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

# Stop Task Run

> Stop a running task execution

<RequestExample>
  ```bash theme={null}
  curl --request PUT \
    --url 'http://localhost:2003/api/v1/task/task_123/run/stop?runId=run_456' \
    --header 'x-api-key: <your-api-key>'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true
  }
  ```
</ResponseExample>


## OpenAPI

````yaml PUT /task/{taskId}/run/stop
openapi: 3.1.0
info:
  title: Browserable API
  description: API for managing automated browser tasks
  version: 1.0.0
servers:
  - url: https://api.browserable.ai/api/v1/
    description: API Server
security:
  - apiKey: []
paths:
  /task/{taskId}/run/stop:
    put:
      summary: Stop Task Run
      description: Stop a running task execution
      parameters:
        - name: taskId
          in: path
          required: true
          description: The ID of the task
          schema:
            type: string
        - name: runId
          in: query
          required: false
          description: The ID of the run. If not provided, stops the most recent run.
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                    description: Error message if the request failed
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header

````