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

# Pause runs

> Pauses workflows or vault credentials so their queued runs are held and new runs submitted to them wait with the status `execution.paused`. Requires the Owner or Member workspace role.

Queued runs are moved to the paused queue and each sends an `execution.paused` [webhook](/concepts/webhooks). Runs that are already executing are not stopped. A pause stays until you lift it with [`POST /runs/unpause`](/run-api/unpause-runs); it does not expire.

A credential ID has the form `<workspace_id>:<permissioned_user_id>:<domain>`.



## OpenAPI

````yaml run-api/run-api.yaml post /runs/pause
openapi: 3.1.0
info:
  title: CloudCruise Run API
  version: 0.1.0
  description: >-
    Endpoints for managing workflow executions, user interactions, and
    retrieving execution results.
servers:
  - url: https://api.cloudcruise.com
    description: CloudCruise Platform Production API Server
security:
  - AuthScheme: []
paths:
  /runs/pause:
    post:
      summary: Pause runs
      description: >-
        Pauses workflows or vault credentials so their queued runs are held and
        new runs submitted to them wait with the status `execution.paused`.
        Requires the Owner or Member workspace role.


        Queued runs are moved to the paused queue and each sends an
        `execution.paused` [webhook](/concepts/webhooks). Runs that are already
        executing are not stopped. A pause stays until you lift it with [`POST
        /runs/unpause`](/run-api/unpause-runs); it does not expire.


        A credential ID has the form
        `<workspace_id>:<permissioned_user_id>:<domain>`.
      operationId: pause_runs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - pause_resource
                - resource_ids
              properties:
                pause_resource:
                  type: string
                  enum:
                    - workflow
                    - credential
                  description: What kind of resource to pause
                resource_ids:
                  type: array
                  items:
                    type: string
                  description: >-
                    Workflow IDs (UUIDs) for `workflow`; credential IDs for
                    `credential`
                reason:
                  type: string
                  description: >-
                    Why the resource is paused. Shown in the paused resources
                    list
                expire_existing_sessions:
                  type: boolean
                  description: >-
                    Credentials only. When true, the credential's saved browser
                    data (cookies and storage) is cleared when it is unpaused.
                    Sending it with `workflow` returns 400
            examples:
              workflow:
                summary: Pause a workflow
                value:
                  pause_resource: workflow
                  resource_ids:
                    - 11223344-5566-7788-9900-112233445566
                  reason: Portal maintenance
              credential:
                summary: Pause a credential
                value:
                  pause_resource: credential
                  resource_ids:
                    - <workspace_id>:<permissioned_user_id>:example.com
      responses:
        '200':
          description: The pause was applied
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  pausedRuns:
                    type: integer
                    description: Number of queued runs held by this pause
                  skippedResourceGroups:
                    type: array
                    items:
                      type: string
                    description: >-
                      Worker groups that were busy and could not be processed.
                      Their queued runs are not held yet, so repeat the request.
                  errors:
                    type: array
                    items:
                      type: string
                  pausedResources:
                    type: object
                    description: >-
                      The paused resources after this call, as returned by `GET
                      /runs/paused`
        '400':
          description: >-
            A credential ID is not in the form
            `<workspace_id>:<permissioned_user_id>:<domain>`, or
            `expire_existing_sessions` was sent with `workflow`
        '401':
          description: >-
            Unauthorized, or a workflow or credential belongs to another
            workspace
        '404':
          description: A workflow or credential was not found
components:
  securitySchemes:
    AuthScheme:
      type: apiKey
      name: cc-key
      in: header
      description: >-
        API key-based authentication. Provide your CloudCruise API key in the
        cc-key header.

````

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