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

# Cancel Browse

> **WebRouter is in closed beta.** It's available to selected accounts, and the API may still change. To get access, [talk to the Nimble team](https://nimbleway.com/contact-general/).

Stop a browse task whose answer is no longer needed, and get it back as it stands then: a stopped task cannot be resumed. A task that already ended comes back as it is; one whose provider cannot stop it is refused (`job_not_cancellable`) and runs on.



## OpenAPI

````yaml /api-reference/web-router-openapi.json post /v2/web-router/browse/{job_id}/cancel
openapi: 3.1.0
info:
  title: WebRouter API
  version: 1.0.0
  description: >-
    Closed beta. One API to search, extract, research and browse the web, on
    Nimble or any provider your account may use. `route` picks the tool and
    provider for a query and runs it in one call. Search and extract answer
    within the call. Research and browse are jobs: start one, then poll it by
    `job_id` until `state` is `completed`, `failed` or `cancelled`. Authenticate
    with `Authorization: Bearer YOUR_API_KEY`.
servers:
  - url: https://sdk.nimbleway.com
security: []
paths:
  /v2/web-router/browse/{job_id}/cancel:
    post:
      tags:
        - WebRouter
      summary: Cancel Browse
      description: >-
        **WebRouter is in closed beta.** It's available to selected accounts,
        and the API may still change. To get access, [talk to the Nimble
        team](https://nimbleway.com/contact-general/).


        Stop a browse task whose answer is no longer needed, and get it back as
        it stands then: a stopped task cannot be resumed. A task that already
        ended comes back as it is; one whose provider cannot stop it is refused
        (`job_not_cancellable`) and runs on.
      operationId: cancel_browse
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            examples:
              - wgbj_00000000000000000000000000000000
            title: Job Id
          description: 'The task''s id: the `job_id` its start answered with.'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrowseJobResponse'
        '401':
          description: Missing or invalid API key, or Nimble refused your account.
        '402':
          description: 'Nimble refused your account: out of credits.'
        '403':
          description: Nimble refused your account, or WebRouter is not enabled for it.
        '404':
          description: No job of your account has that id.
        '410':
          description: >-
            The provider no longer knows the job: it ended there long ago, or
            the key it started on changed (`gone_at_provider`).
        '422':
          description: >-
            The job id is invalid, or the provider cannot cancel the job
            (`job_not_cancellable`).
        '502':
          description: >-
            The provider did not answer the cancel. Poll the job to see where it
            stands.
        '503':
          description: Your account's settings could not be read.
        '504':
          description: >-
            The provider did not answer the cancel. Poll the job to see where it
            stands.
      security:
        - BearerAuth: []
components:
  schemas:
    BrowseJobResponse:
      properties:
        meta:
          $ref: '#/components/schemas/ToolMeta'
          description: The tool that ran.
        result:
          $ref: '#/components/schemas/BrowseProgress'
          description: Where the task stands, and its answer once it has one.
      type: object
      required:
        - meta
        - result
      title: BrowseJobResponse
    ToolMeta:
      properties:
        tool:
          $ref: '#/components/schemas/Tool'
          description: The tool that ran.
      type: object
      required:
        - tool
      title: ToolMeta
    BrowseProgress:
      properties:
        job_id:
          type: string
          title: Job Id
          description: 'The job''s id: poll it and cancel it with this.'
          examples:
            - wgbj_00000000000000000000000000000000
        provider:
          type: string
          title: Provider
          description: >-
            `nimble_selection` when Nimble picked and served the call. The
            provider's name when your own key served it, with `byok` true.
          examples:
            - nimble_selection
        byok:
          type: boolean
          title: Byok
          description: Whether your own provider key served the call.
        state:
          type: string
          enum:
            - queued
            - running
            - completed
            - failed
            - cancelled
          title: State
          description: >-
            'queued' or 'running' while it works; 'completed', 'failed' or
            'cancelled' once it stopped, for good.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: >-
            What the provider said of the state, such as why the job failed.
            Only for a job on Nimble.
        response:
          anyOf:
            - $ref: '#/components/schemas/BrowseResponse'
            - type: 'null'
          description: The answer. Set exactly when `state` is 'completed'.
        job_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Url
          description: >-
            The job's path on the server. Poll the job by its `job_id` at `GET
            /v2/web-router/research/{job_id}` or `GET
            /v2/web-router/browse/{job_id}`.
      type: object
      required:
        - job_id
        - provider
        - byok
        - state
      title: BrowseProgress
      description: Where one browse task stands, and its answer once it has one.
    Tool:
      type: string
      enum:
        - search
        - extract
        - extract_template
        - browse
        - research
        - answer
      title: Tool
    BrowseResponse:
      properties:
        provider:
          type: string
          title: Provider
          description: >-
            `nimble_selection` when Nimble picked and served the call. The
            provider's name when your own key served it, with `byok` true.
          examples:
            - nimble_selection
        byok:
          type: boolean
          title: Byok
          description: Whether your own provider key served the call.
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
          description: The prose answer, when the task produced one.
        structured:
          anyOf:
            - additionalProperties: true
              type: object
            - items:
                anyOf:
                  - additionalProperties: true
                    type: object
                  - type: array
                  - type: string
                  - type: number
                  - type: boolean
                  - type: 'null'
              type: array
            - type: 'null'
          title: Structured
          description: The structured answer, conforming to the schema that was asked for.
        steps:
          items:
            $ref: '#/components/schemas/BrowseStep'
          type: array
          title: Steps
          description: The actions the provider reported, in order.
        outcome:
          type: string
          enum:
            - complete
            - partial
          title: Outcome
          description: Whether the provider finished the task or said it stopped early.
          default: complete
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: >-
            The provider's own id for the task. Only when your own key served
            the call.
        recording_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Recording Url
          description: >-
            A recording of the task, when the provider made one. Only when your
            own key served the call.
      type: object
      required:
        - provider
        - byok
      title: BrowseResponse
      description: A finished browse task's answer.
    BrowseStep:
      properties:
        action:
          anyOf:
            - type: string
            - type: 'null'
          title: Action
          description: What the agent did, in the provider's words.
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: The page the step happened on, when reported.
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          description: The agent's own note on the step -- its reasoning, a result.
        screenshot_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Screenshot Url
          description: A screenshot taken at this step, when reported.
        extra:
          additionalProperties: true
          type: object
          title: Extra
          description: Provider-specific fields with no normalized equivalent.
      additionalProperties: false
      type: object
      title: BrowseStep
      description: >-
        One action the agent reported taking.  Only what the provider reported:
        a task whose provider returns no step list has an empty
        `BrowseResponse.steps`, never one reconstructed from the final answer.
        There is no step number -- the list is in the order the provider gave,
        and a provider's own numbering, when it has one, is in `extra`.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.