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

# Disconnect a Jira workspace

> Disconnects a Jira workspace from a realm. `removed` is `false` when it was not connected.

No authentication: anyone can call this.



## OpenAPI

````yaml /openapi/hub-by-tag/hub-jira.yaml post /v1/integrations/jira/disconnect_workspace
openapi: 3.0.3
info:
  title: 'CliqHub API: Jira'
  version: 1.0.0
  description: >-
    The Jira (Forge) app's connection to CliqHub: it binds a Jira workspace to a
    realm so Jira

    can start runs and receive results. Called by the Jira app with a session or
    its `api_token`

    (a CliqHub user token). These endpoints answer 404 when the integration is
    turned off.
servers:
  - url: https://{host}
    variables:
      host:
        default: cliqhub.io
        description: CliqHub host
security: []
tags:
  - name: Jira
    description: >-
      The Jira (Forge) app's connection to CliqHub: it binds a Jira workspace to
      a realm so Jira

      can start runs and receive results. Called by the Jira app with a session
      or its `api_token`

      (a CliqHub user token). These endpoints answer 404 when the integration is
      turned off.
paths:
  /v1/integrations/jira/disconnect_workspace:
    post:
      tags:
        - Jira
      summary: Disconnect a Jira workspace
      description: >-
        Disconnects a Jira workspace from a realm. `removed` is `false` when it
        was not connected.


        No authentication: anyone can call this.
      operationId: POST_v1_integrations_jira_disconnect_workspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                api_token:
                  type: string
                  minLength: 1
                  description: Forge headless PAT; ignored when session Bearer is present
                realm_id:
                  type: string
                  minLength: 1
                  description: Realm the binding belongs to
                workspace_id:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: Atlassian workspace/cloud ID
              required:
                - realm_id
                - workspace_id
            examples:
              default:
                value:
                  realm_id: 5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b
                  workspace_id: 1a2b3c4d-acme-cloud
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                  - data
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                    description: Always `true` on success.
                  data:
                    type: object
                    properties:
                      removed:
                        type: boolean
              example:
                ok: true
                data:
                  removed: true
        '401':
          description: '`unauthorized`: No session and no valid `api_token`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    ok: false
                    error: invalid api_token
                    code: unauthorized
        '422':
          description: >-
            `invalid_params`: The body fails the request schema: a required
            field is missing or a value has the wrong type or format. The
            message lists every issue as `field: problem`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                invalid_params:
                  summary: invalid_params
                  value:
                    ok: false
                    error: 'realm_id: Required'
                    code: invalid_params
        '500':
          description: >-
            `internal_error`: An unexpected server fault. Retry later; if it
            persists, report it with the time of the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                internal_error:
                  summary: internal_error
                  value:
                    ok: false
                    error: Internal server error
                    code: internal_error
      security: []
components:
  schemas:
    HubErr:
      type: object
      required:
        - ok
        - error
      description: >-
        Every failure. Route-policy denials (401/403/404, and 400 when neither
        realm_id nor org_id was sent) answer `error` as `{ code, message }`;
        errors raised by the endpoint answer `error` as the message with the
        code beside it in `code`. Every error has a code. See
        [Errors](/hub-api/errors).
      properties:
        ok:
          type: boolean
          description: Always false on error
        error:
          description: The message, or `{ code, message }` for an access denial.
          oneOf:
            - type: string
            - type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                message:
                  type: string
        code:
          type: string
          description: Stable error code of an endpoint error.
        details:
          type: object
          additionalProperties: true
          description: Structured detail, when there is some.

````

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