> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# Cancel a run

POST https://api.cloudraker.com/v1/runs/{id}/cancel

Stops a run's in-flight work and returns the run in its cancelled state.

- **Files and the TTL are untouched** — the run still purges at `expiresAt`. To delete everything now, use [DELETE /v1/runs/{id}](https://docs.cloudraker.com/api/cloud-raker-api/runs/delete-run).
- **Idempotent** — cancelling an already-terminal run changes nothing and returns the current run body.

Reference: https://docs.cloudraker.com/api/cloud-raker-api/runs/cancel-run

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: CloudRaker API
  version: 1.0.0
paths:
  /v1/runs/{id}/cancel:
    post:
      operationId: cancel-run
      summary: Cancel a run
      description: >-
        Stops a run's in-flight work and returns the run in its cancelled state.


        - **Files and the TTL are untouched** — the run still purges at
        `expiresAt`. To delete everything now, use [DELETE
        /v1/runs/{id}](https://docs.cloudraker.com/api/cloud-raker-api/runs/delete-run).

        - **Idempotent** — cancelling an already-terminal run changes nothing
        and returns the current run body.
      tags:
        - runs
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The run after cancellation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Runs_cancelRun_Response_200'
        '404':
          description: Unknown run id.
          content:
            application/json:
              schema:
                description: Any type
        '410':
          description: The run expired.
          content:
            application/json:
              schema:
                description: Any type
        '429':
          description: >-
            Rate limited. The `/v1` API allows at least **67 requests per minute
            per organization** (about 1,000 requests per 15 minutes) — a
            guaranteed floor, enforced per edge location, so a geographically
            spread caller may get more. Wait for the `Retry-After` interval and
            retry — the error is `retryable`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelRunRequestTooManyRequestsError'
servers:
  - url: https://api.cloudraker.com
    description: Production
  - url: https://api.staging.raker.one
    description: Staging
  - url: https://api.dev.raker.one
    description: Development
components:
  schemas:
    V1ExtractRunStatus:
      type: string
      enum:
        - queued
        - processing
        - processed
        - failed
        - cancelled
        - expired
        - needs_input
      description: |-
        Where the run is in its life.

        | Status | Meaning |
        | --- | --- |
        | `queued` | Accepted, not started |
        | `processing` | Work in flight |
        | `needs_input` | Parked for a person — see `tasks[]` |
        | `processed` | Finished; `output` is populated |
        | `failed` | Finished unsuccessfully |
        | `cancelled` | Stopped on request |
        | `expired` | TTL elapsed and the data was purged |

        The last four are terminal.
      title: V1ExtractRunStatus
    V1ExtractRunFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1ExtractRunFilesItems
    V1ExtractRunFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1ExtractRunFile
    V1ExtractRunError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      description: >-
        Why the run failed. Present whenever `status` is `failed`, and only
        then.


        `code` is the stable, snake_case reason (`input_unavailable`,
        `parse_failed`, …); `message` is the human-readable detail. Per-file and
        per-step failures are also reported in `files[].error` and, for a
        pipeline, `steps[].error`.
      title: V1ExtractRunError
    V1ExtractRunTasksItems:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        url:
          type: string
      required:
        - id
        - title
        - url
      title: V1ExtractRunTasksItems
    V1ExtractRunConfig:
      type: object
      properties:
        schema:
          type: object
          additionalProperties:
            description: Any type
      required:
        - schema
      description: >-
        The output shape this run actually applied.


        On an inference run — one sent with neither `schema` nor `action` — this
        is where you read the schema that was inferred, ready to review and save
        as an action for the next run.
      title: V1ExtractRunConfig
    V1CitationTimecode:
      oneOf:
        - type: number
          format: double
        - type: string
      title: V1CitationTimecode
    V1Citation:
      type: object
      properties:
        fileId:
          type: string
        page:
          type: number
          format: double
        bbox:
          type: array
          items:
            type: number
            format: double
        timecode:
          $ref: '#/components/schemas/V1CitationTimecode'
        text:
          type: string
        confidence:
          type: number
          format: double
      required:
        - fileId
      title: V1Citation
    V1ExtractRunOutputDocumentsItems:
      type: object
      properties:
        fileId:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
        value:
          description: Any type
        citations:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/V1Citation'
          description: >-
            Where each extracted value came from, keyed by its JSON path inside
            `value`.


            Keys are paths like `load_number` or `line_items[0].description`;
            for a `rows_per_document` run they are prefixed with the row index,
            `[0].description`. Each entry names the `fileId` and, when known,
            the `page` and `bbox` — or a `timecode` for audio — plus the matched
            `text` and a `confidence` score.


            Present whenever the run was grounded. Send `citations: false` on
            the request to omit it.
      required:
        - fileId
        - name
        - status
      title: V1ExtractRunOutputDocumentsItems
    V1ExtractRunOutput:
      type: object
      properties:
        value:
          description: Any type
        citations:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/V1Citation'
          description: >-
            Where each extracted value came from, keyed by its JSON path inside
            `value`.


            Keys are paths like `load_number` or `line_items[0].description`;
            for a `rows_per_document` run they are prefixed with the row index,
            `[0].description`. Each entry names the `fileId` and, when known,
            the `page` and `bbox` — or a `timecode` for audio — plus the matched
            `text` and a `confidence` score.


            Present whenever the run was grounded. Send `citations: false` on
            the request to omit it.
        documents:
          type: array
          items:
            $ref: '#/components/schemas/V1ExtractRunOutputDocumentsItems'
      required:
        - documents
      description: >-
        The extracted data. Present once `status` is `processed`.


        `documents[]` always has one entry per input file. For a single-document
        run, `value` and `citations` are lifted to the top as aliases of
        `documents[0]` so the common case reads without indexing.
      title: V1ExtractRunOutput
    V1ExtractRun:
      type: object
      properties:
        object:
          type: string
          enum:
            - extract_run
        id:
          type: string
        status:
          $ref: '#/components/schemas/V1ExtractRunStatus'
          description: |-
            Where the run is in its life.

            | Status | Meaning |
            | --- | --- |
            | `queued` | Accepted, not started |
            | `processing` | Work in flight |
            | `needs_input` | Parked for a person — see `tasks[]` |
            | `processed` | Finished; `output` is populated |
            | `failed` | Finished unsuccessfully |
            | `cancelled` | Stopped on request |
            | `expired` | TTL elapsed and the data was purged |

            The last four are terminal.
        expiresAt:
          type:
            - string
            - 'null'
        statusUrl:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1ExtractRunFilesItems'
        file:
          $ref: '#/components/schemas/V1ExtractRunFile'
        error:
          $ref: '#/components/schemas/V1ExtractRunError'
          description: >-
            Why the run failed. Present whenever `status` is `failed`, and only
            then.


            `code` is the stable, snake_case reason (`input_unavailable`,
            `parse_failed`, …); `message` is the human-readable detail. Per-file
            and per-step failures are also reported in `files[].error` and, for
            a pipeline, `steps[].error`.
        metadata:
          type: object
          additionalProperties:
            description: Any type
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/V1ExtractRunTasksItems'
          description: >-
            The human steps currently blocking the run. Present while `status`
            is `needs_input`.


            Each task has a `url` — a ready-made page you can send a person to —
            or you can drive it yourself through `GET` and `POST
            /v1/runs/{id}/task`. E-signature runs never carry `tasks[]`: their
            signing links are signer-held secrets, so use `envelopeUrl` instead.
        config:
          $ref: '#/components/schemas/V1ExtractRunConfig'
          description: >-
            The output shape this run actually applied.


            On an inference run — one sent with neither `schema` nor `action` —
            this is where you read the schema that was inferred, ready to review
            and save as an action for the next run.
        output:
          $ref: '#/components/schemas/V1ExtractRunOutput'
          description: >-
            The extracted data. Present once `status` is `processed`.


            `documents[]` always has one entry per input file. For a
            single-document run, `value` and `citations` are lifted to the top
            as aliases of `documents[0]` so the common case reads without
            indexing.
      required:
        - object
        - id
        - status
        - expiresAt
        - statusUrl
        - files
      title: V1ExtractRun
    V1ParseRunStatus:
      type: string
      enum:
        - queued
        - processing
        - processed
        - failed
        - cancelled
        - expired
        - needs_input
      description: |-
        Where the run is in its life.

        | Status | Meaning |
        | --- | --- |
        | `queued` | Accepted, not started |
        | `processing` | Work in flight |
        | `needs_input` | Parked for a person — see `tasks[]` |
        | `processed` | Finished; `output` is populated |
        | `failed` | Finished unsuccessfully |
        | `cancelled` | Stopped on request |
        | `expired` | TTL elapsed and the data was purged |

        The last four are terminal.
      title: V1ParseRunStatus
    V1ParseRunFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1ParseRunFilesItems
    V1ParseRunFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1ParseRunFile
    V1ParseRunError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      description: >-
        Why the run failed. Present whenever `status` is `failed`, and only
        then.


        `code` is the stable, snake_case reason (`input_unavailable`,
        `parse_failed`, …); `message` is the human-readable detail. Per-file and
        per-step failures are also reported in `files[].error` and, for a
        pipeline, `steps[].error`.
      title: V1ParseRunError
    V1ParseRunTasksItems:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        url:
          type: string
      required:
        - id
        - title
        - url
      title: V1ParseRunTasksItems
    V1ParseRunOutput:
      type: object
      properties:
        markdownUrl:
          type: string
        jsonUrl:
          type: string
      description: >-
        The parsed document. Present once `status` is `processed`.


        Both links are signed and valid for about an hour: `markdownUrl` for the
        readable form, `jsonUrl` for the structured one.
      title: V1ParseRunOutput
    V1ParseRun:
      type: object
      properties:
        object:
          type: string
          enum:
            - parse_run
        id:
          type: string
        status:
          $ref: '#/components/schemas/V1ParseRunStatus'
          description: |-
            Where the run is in its life.

            | Status | Meaning |
            | --- | --- |
            | `queued` | Accepted, not started |
            | `processing` | Work in flight |
            | `needs_input` | Parked for a person — see `tasks[]` |
            | `processed` | Finished; `output` is populated |
            | `failed` | Finished unsuccessfully |
            | `cancelled` | Stopped on request |
            | `expired` | TTL elapsed and the data was purged |

            The last four are terminal.
        expiresAt:
          type:
            - string
            - 'null'
        statusUrl:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1ParseRunFilesItems'
        file:
          $ref: '#/components/schemas/V1ParseRunFile'
        error:
          $ref: '#/components/schemas/V1ParseRunError'
          description: >-
            Why the run failed. Present whenever `status` is `failed`, and only
            then.


            `code` is the stable, snake_case reason (`input_unavailable`,
            `parse_failed`, …); `message` is the human-readable detail. Per-file
            and per-step failures are also reported in `files[].error` and, for
            a pipeline, `steps[].error`.
        metadata:
          type: object
          additionalProperties:
            description: Any type
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/V1ParseRunTasksItems'
          description: >-
            The human steps currently blocking the run. Present while `status`
            is `needs_input`.


            Each task has a `url` — a ready-made page you can send a person to —
            or you can drive it yourself through `GET` and `POST
            /v1/runs/{id}/task`. E-signature runs never carry `tasks[]`: their
            signing links are signer-held secrets, so use `envelopeUrl` instead.
        output:
          $ref: '#/components/schemas/V1ParseRunOutput'
          description: >-
            The parsed document. Present once `status` is `processed`.


            Both links are signed and valid for about an hour: `markdownUrl` for
            the readable form, `jsonUrl` for the structured one.
      required:
        - object
        - id
        - status
        - expiresAt
        - statusUrl
        - files
      title: V1ParseRun
    V1RedactRunStatus:
      type: string
      enum:
        - queued
        - processing
        - processed
        - failed
        - cancelled
        - expired
        - needs_input
      description: |-
        Where the run is in its life.

        | Status | Meaning |
        | --- | --- |
        | `queued` | Accepted, not started |
        | `processing` | Work in flight |
        | `needs_input` | Parked for a person — see `tasks[]` |
        | `processed` | Finished; `output` is populated |
        | `failed` | Finished unsuccessfully |
        | `cancelled` | Stopped on request |
        | `expired` | TTL elapsed and the data was purged |

        The last four are terminal.
      title: V1RedactRunStatus
    V1RedactRunFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1RedactRunFilesItems
    V1RedactRunFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1RedactRunFile
    V1RedactRunError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      description: >-
        Why the run failed. Present whenever `status` is `failed`, and only
        then.


        `code` is the stable, snake_case reason (`input_unavailable`,
        `parse_failed`, …); `message` is the human-readable detail. Per-file and
        per-step failures are also reported in `files[].error` and, for a
        pipeline, `steps[].error`.
      title: V1RedactRunError
    V1RedactRunTasksItems:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        url:
          type: string
      required:
        - id
        - title
        - url
      title: V1RedactRunTasksItems
    V1RedactRunOutputFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
      required:
        - id
        - name
      title: V1RedactRunOutputFile
    V1RedactRunOutputFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
      required:
        - id
        - name
      title: V1RedactRunOutputFilesItems
    V1RedactRunOutput:
      type: object
      properties:
        file:
          $ref: '#/components/schemas/V1RedactRunOutputFile'
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1RedactRunOutputFilesItems'
        entities:
          type: object
          additionalProperties:
            type: number
            format: double
        skipped:
          type: number
          format: double
      required:
        - files
      description: >-
        The redacted files. Present once `status` is `processed`.


        `files[]` holds the new documents — `file` is an alias of the first for
        single-file runs — each with a signed download link. `entities` tallies
        what was removed per category, and `skipped` counts documents that
        contained nothing to redact and so produced no new file.
      title: V1RedactRunOutput
    V1RedactRun:
      type: object
      properties:
        object:
          type: string
          enum:
            - redact_run
        id:
          type: string
        status:
          $ref: '#/components/schemas/V1RedactRunStatus'
          description: |-
            Where the run is in its life.

            | Status | Meaning |
            | --- | --- |
            | `queued` | Accepted, not started |
            | `processing` | Work in flight |
            | `needs_input` | Parked for a person — see `tasks[]` |
            | `processed` | Finished; `output` is populated |
            | `failed` | Finished unsuccessfully |
            | `cancelled` | Stopped on request |
            | `expired` | TTL elapsed and the data was purged |

            The last four are terminal.
        expiresAt:
          type:
            - string
            - 'null'
        statusUrl:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1RedactRunFilesItems'
        file:
          $ref: '#/components/schemas/V1RedactRunFile'
        error:
          $ref: '#/components/schemas/V1RedactRunError'
          description: >-
            Why the run failed. Present whenever `status` is `failed`, and only
            then.


            `code` is the stable, snake_case reason (`input_unavailable`,
            `parse_failed`, …); `message` is the human-readable detail. Per-file
            and per-step failures are also reported in `files[].error` and, for
            a pipeline, `steps[].error`.
        metadata:
          type: object
          additionalProperties:
            description: Any type
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/V1RedactRunTasksItems'
          description: >-
            The human steps currently blocking the run. Present while `status`
            is `needs_input`.


            Each task has a `url` — a ready-made page you can send a person to —
            or you can drive it yourself through `GET` and `POST
            /v1/runs/{id}/task`. E-signature runs never carry `tasks[]`: their
            signing links are signer-held secrets, so use `envelopeUrl` instead.
        output:
          $ref: '#/components/schemas/V1RedactRunOutput'
          description: >-
            The redacted files. Present once `status` is `processed`.


            `files[]` holds the new documents — `file` is an alias of the first
            for single-file runs — each with a signed download link. `entities`
            tallies what was removed per category, and `skipped` counts
            documents that contained nothing to redact and so produced no new
            file.
      required:
        - object
        - id
        - status
        - expiresAt
        - statusUrl
        - files
      title: V1RedactRun
    V1FillRunStatus:
      type: string
      enum:
        - queued
        - processing
        - processed
        - failed
        - cancelled
        - expired
        - needs_input
      description: |-
        Where the run is in its life.

        | Status | Meaning |
        | --- | --- |
        | `queued` | Accepted, not started |
        | `processing` | Work in flight |
        | `needs_input` | Parked for a person — see `tasks[]` |
        | `processed` | Finished; `output` is populated |
        | `failed` | Finished unsuccessfully |
        | `cancelled` | Stopped on request |
        | `expired` | TTL elapsed and the data was purged |

        The last four are terminal.
      title: V1FillRunStatus
    V1FillRunFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1FillRunFilesItems
    V1FillRunFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1FillRunFile
    V1FillRunError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      description: >-
        Why the run failed. Present whenever `status` is `failed`, and only
        then.


        `code` is the stable, snake_case reason (`input_unavailable`,
        `parse_failed`, …); `message` is the human-readable detail. Per-file and
        per-step failures are also reported in `files[].error` and, for a
        pipeline, `steps[].error`.
      title: V1FillRunError
    V1FillRunTasksItems:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        url:
          type: string
      required:
        - id
        - title
        - url
      title: V1FillRunTasksItems
    V1FillRunOutputFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
      required:
        - id
        - name
      title: V1FillRunOutputFile
    V1FillRunOutputFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
      required:
        - id
        - name
      title: V1FillRunOutputFilesItems
    V1FillRunOutput:
      type: object
      properties:
        file:
          $ref: '#/components/schemas/V1FillRunOutputFile'
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1FillRunOutputFilesItems'
        fields:
          type: object
          additionalProperties:
            description: Any type
      required:
        - files
      description: >-
        The completed form. Present once `status` is `processed`.


        `file` is the filled PDF with a signed download link; `fields` reports
        the values that were written into it, keyed by field name.
      title: V1FillRunOutput
    V1FillRun:
      type: object
      properties:
        object:
          type: string
          enum:
            - fill_run
        id:
          type: string
        status:
          $ref: '#/components/schemas/V1FillRunStatus'
          description: |-
            Where the run is in its life.

            | Status | Meaning |
            | --- | --- |
            | `queued` | Accepted, not started |
            | `processing` | Work in flight |
            | `needs_input` | Parked for a person — see `tasks[]` |
            | `processed` | Finished; `output` is populated |
            | `failed` | Finished unsuccessfully |
            | `cancelled` | Stopped on request |
            | `expired` | TTL elapsed and the data was purged |

            The last four are terminal.
        expiresAt:
          type:
            - string
            - 'null'
        statusUrl:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1FillRunFilesItems'
        file:
          $ref: '#/components/schemas/V1FillRunFile'
        error:
          $ref: '#/components/schemas/V1FillRunError'
          description: >-
            Why the run failed. Present whenever `status` is `failed`, and only
            then.


            `code` is the stable, snake_case reason (`input_unavailable`,
            `parse_failed`, …); `message` is the human-readable detail. Per-file
            and per-step failures are also reported in `files[].error` and, for
            a pipeline, `steps[].error`.
        metadata:
          type: object
          additionalProperties:
            description: Any type
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/V1FillRunTasksItems'
          description: >-
            The human steps currently blocking the run. Present while `status`
            is `needs_input`.


            Each task has a `url` — a ready-made page you can send a person to —
            or you can drive it yourself through `GET` and `POST
            /v1/runs/{id}/task`. E-signature runs never carry `tasks[]`: their
            signing links are signer-held secrets, so use `envelopeUrl` instead.
        output:
          $ref: '#/components/schemas/V1FillRunOutput'
          description: >-
            The completed form. Present once `status` is `processed`.


            `file` is the filled PDF with a signed download link; `fields`
            reports the values that were written into it, keyed by field name.
      required:
        - object
        - id
        - status
        - expiresAt
        - statusUrl
        - files
      title: V1FillRun
    V1SignRunStatus:
      type: string
      enum:
        - queued
        - processing
        - processed
        - failed
        - cancelled
        - expired
        - needs_input
      description: |-
        Where the run is in its life.

        | Status | Meaning |
        | --- | --- |
        | `queued` | Accepted, not started |
        | `processing` | Work in flight |
        | `needs_input` | Parked for a person — see `tasks[]` |
        | `processed` | Finished; `output` is populated |
        | `failed` | Finished unsuccessfully |
        | `cancelled` | Stopped on request |
        | `expired` | TTL elapsed and the data was purged |

        The last four are terminal.
      title: V1SignRunStatus
    V1SignRunFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1SignRunFilesItems
    V1SignRunFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1SignRunFile
    V1SignRunError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      description: >-
        Why the run failed. Present whenever `status` is `failed`, and only
        then.


        `code` is the stable, snake_case reason (`input_unavailable`,
        `parse_failed`, …); `message` is the human-readable detail. Per-file and
        per-step failures are also reported in `files[].error` and, for a
        pipeline, `steps[].error`.
      title: V1SignRunError
    V1SignRunTasksItems:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        url:
          type: string
      required:
        - id
        - title
        - url
      title: V1SignRunTasksItems
    V1SignRunOutputFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
      required:
        - id
        - name
      title: V1SignRunOutputFile
    V1SignRunOutputFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
      required:
        - id
        - name
      title: V1SignRunOutputFilesItems
    V1SignRunOutputSignersItems:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        signedAt:
          type: string
      required:
        - name
        - email
      title: V1SignRunOutputSignersItems
    V1SignRunOutput:
      type: object
      properties:
        file:
          $ref: '#/components/schemas/V1SignRunOutputFile'
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1SignRunOutputFilesItems'
        envelopeId:
          type: string
        signers:
          type: array
          items:
            $ref: '#/components/schemas/V1SignRunOutputSignersItems'
        auditUrl:
          type: string
      required:
        - files
      description: >-
        The signed document. Present once every signer has completed.


        `file` is the sealed PDF, `signers[]` records who signed and when, and
        `auditUrl` points at the machine-readable audit trail.
      title: V1SignRunOutput
    V1SignRun:
      type: object
      properties:
        object:
          type: string
          enum:
            - sign_run
        id:
          type: string
        status:
          $ref: '#/components/schemas/V1SignRunStatus'
          description: |-
            Where the run is in its life.

            | Status | Meaning |
            | --- | --- |
            | `queued` | Accepted, not started |
            | `processing` | Work in flight |
            | `needs_input` | Parked for a person — see `tasks[]` |
            | `processed` | Finished; `output` is populated |
            | `failed` | Finished unsuccessfully |
            | `cancelled` | Stopped on request |
            | `expired` | TTL elapsed and the data was purged |

            The last four are terminal.
        expiresAt:
          type:
            - string
            - 'null'
        statusUrl:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1SignRunFilesItems'
        file:
          $ref: '#/components/schemas/V1SignRunFile'
        error:
          $ref: '#/components/schemas/V1SignRunError'
          description: >-
            Why the run failed. Present whenever `status` is `failed`, and only
            then.


            `code` is the stable, snake_case reason (`input_unavailable`,
            `parse_failed`, …); `message` is the human-readable detail. Per-file
            and per-step failures are also reported in `files[].error` and, for
            a pipeline, `steps[].error`.
        metadata:
          type: object
          additionalProperties:
            description: Any type
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/V1SignRunTasksItems'
          description: >-
            The human steps currently blocking the run. Present while `status`
            is `needs_input`.


            Each task has a `url` — a ready-made page you can send a person to —
            or you can drive it yourself through `GET` and `POST
            /v1/runs/{id}/task`. E-signature runs never carry `tasks[]`: their
            signing links are signer-held secrets, so use `envelopeUrl` instead.
        envelopeUrl:
          type: string
        output:
          $ref: '#/components/schemas/V1SignRunOutput'
          description: >-
            The signed document. Present once every signer has completed.


            `file` is the sealed PDF, `signers[]` records who signed and when,
            and `auditUrl` points at the machine-readable audit trail.
      required:
        - object
        - id
        - status
        - expiresAt
        - statusUrl
        - files
        - envelopeUrl
      title: V1SignRun
    V1PipelineRunStatus:
      type: string
      enum:
        - queued
        - processing
        - processed
        - failed
        - cancelled
        - expired
        - needs_input
      description: |-
        Where the run is in its life.

        | Status | Meaning |
        | --- | --- |
        | `queued` | Accepted, not started |
        | `processing` | Work in flight |
        | `needs_input` | Parked for a person — see `tasks[]` |
        | `processed` | Finished; `output` is populated |
        | `failed` | Finished unsuccessfully |
        | `cancelled` | Stopped on request |
        | `expired` | TTL elapsed and the data was purged |

        The last four are terminal.
      title: V1PipelineRunStatus
    V1PipelineRunFilesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1PipelineRunFilesItems
    V1PipelineRunFile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        error:
          type: string
      required:
        - id
        - name
        - status
      title: V1PipelineRunFile
    V1PipelineRunError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      description: >-
        Why the run failed. Present whenever `status` is `failed`, and only
        then.


        `code` is the stable, snake_case reason (`input_unavailable`,
        `parse_failed`, …); `message` is the human-readable detail. Per-file and
        per-step failures are also reported in `files[].error` and, for a
        pipeline, `steps[].error`.
      title: V1PipelineRunError
    V1PipelineRunTasksItems:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        url:
          type: string
      required:
        - id
        - title
        - url
      title: V1PipelineRunTasksItems
    V1PipelineStepViewCapability:
      type: string
      enum:
        - extract
        - parse
        - redact
        - fill
        - sign
        - action
      title: V1PipelineStepViewCapability
    V1PipelineStepViewStatus:
      type: string
      enum:
        - queued
        - processing
        - processed
        - failed
        - cancelled
        - expired
        - needs_input
      description: |-
        Where the run is in its life.

        | Status | Meaning |
        | --- | --- |
        | `queued` | Accepted, not started |
        | `processing` | Work in flight |
        | `needs_input` | Parked for a person — see `tasks[]` |
        | `processed` | Finished; `output` is populated |
        | `failed` | Finished unsuccessfully |
        | `cancelled` | Stopped on request |
        | `expired` | TTL elapsed and the data was purged |

        The last four are terminal.
      title: V1PipelineStepViewStatus
    V1PipelineStepView:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
        capability:
          $ref: '#/components/schemas/V1PipelineStepViewCapability'
        status:
          $ref: '#/components/schemas/V1PipelineStepViewStatus'
          description: |-
            Where the run is in its life.

            | Status | Meaning |
            | --- | --- |
            | `queued` | Accepted, not started |
            | `processing` | Work in flight |
            | `needs_input` | Parked for a person — see `tasks[]` |
            | `processed` | Finished; `output` is populated |
            | `failed` | Finished unsuccessfully |
            | `cancelled` | Stopped on request |
            | `expired` | TTL elapsed and the data was purged |

            The last four are terminal.
        error:
          type: string
        output:
          description: Any type
      required:
        - id
        - capability
        - status
      title: V1PipelineStepView
    V1PipelineRun:
      type: object
      properties:
        object:
          type: string
          enum:
            - pipeline_run
        id:
          type: string
        status:
          $ref: '#/components/schemas/V1PipelineRunStatus'
          description: |-
            Where the run is in its life.

            | Status | Meaning |
            | --- | --- |
            | `queued` | Accepted, not started |
            | `processing` | Work in flight |
            | `needs_input` | Parked for a person — see `tasks[]` |
            | `processed` | Finished; `output` is populated |
            | `failed` | Finished unsuccessfully |
            | `cancelled` | Stopped on request |
            | `expired` | TTL elapsed and the data was purged |

            The last four are terminal.
        expiresAt:
          type:
            - string
            - 'null'
        statusUrl:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/V1PipelineRunFilesItems'
        file:
          $ref: '#/components/schemas/V1PipelineRunFile'
        error:
          $ref: '#/components/schemas/V1PipelineRunError'
          description: >-
            Why the run failed. Present whenever `status` is `failed`, and only
            then.


            `code` is the stable, snake_case reason (`input_unavailable`,
            `parse_failed`, …); `message` is the human-readable detail. Per-file
            and per-step failures are also reported in `files[].error` and, for
            a pipeline, `steps[].error`.
        metadata:
          type: object
          additionalProperties:
            description: Any type
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/V1PipelineRunTasksItems'
          description: >-
            The human steps currently blocking the run. Present while `status`
            is `needs_input`.


            Each task has a `url` — a ready-made page you can send a person to —
            or you can drive it yourself through `GET` and `POST
            /v1/runs/{id}/task`. E-signature runs never carry `tasks[]`: their
            signing links are signer-held secrets, so use `envelopeUrl` instead.
        steps:
          type: array
          items:
            $ref: '#/components/schemas/V1PipelineStepView'
      required:
        - object
        - id
        - status
        - expiresAt
        - statusUrl
        - files
        - steps
      title: V1PipelineRun
    Runs_cancelRun_Response_200:
      oneOf:
        - $ref: '#/components/schemas/V1ExtractRun'
        - $ref: '#/components/schemas/V1ParseRun'
        - $ref: '#/components/schemas/V1RedactRun'
        - $ref: '#/components/schemas/V1FillRun'
        - $ref: '#/components/schemas/V1SignRun'
        - $ref: '#/components/schemas/V1PipelineRun'
      title: Runs_cancelRun_Response_200
    V1RunsIdCancelPostResponsesContentApplicationJsonSchemaCode:
      type: string
      enum:
        - rate_limited
      title: V1RunsIdCancelPostResponsesContentApplicationJsonSchemaCode
    CancelRunRequestTooManyRequestsError:
      type: object
      properties:
        code:
          $ref: >-
            #/components/schemas/V1RunsIdCancelPostResponsesContentApplicationJsonSchemaCode
        message:
          type: string
        retryable:
          type: boolean
        requestId:
          type: string
        docUrl:
          type: string
      required:
        - code
        - message
        - retryable
        - requestId
      title: CancelRunRequestTooManyRequestsError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples



**Response**

```json
{
  "object": "string",
  "id": "string",
  "status": "queued",
  "expiresAt": "string",
  "statusUrl": "string",
  "files": [
    {
      "id": "string",
      "name": "string",
      "status": "string",
      "error": "string"
    }
  ],
  "file": {
    "id": "string",
    "name": "string",
    "status": "string",
    "error": "string"
  },
  "error": {
    "code": "string",
    "message": "string"
  },
  "metadata": {},
  "tasks": [
    {
      "id": "string",
      "title": "string",
      "url": "string"
    }
  ],
  "config": {
    "schema": {}
  },
  "output": {
    "citations": {},
    "documents": [
      {
        "fileId": "string",
        "name": "string",
        "status": "string",
        "error": "string",
        "citations": {}
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.cloudraker.com/v1/runs/id/cancel"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cloudraker.com/v1/runs/id/cancel';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/v1/runs/id/cancel"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/v1/runs/id/cancel")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.cloudraker.com/v1/runs/id/cancel")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.cloudraker.com/v1/runs/id/cancel', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/v1/runs/id/cancel");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/v1/runs/id/cancel")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```