> ## 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.

# Get workspace status

> Returns a snapshot of one workspace: whether it is registered and still on disk, its
assigned teams, the inputs its agents need, its latest run and the runs going now.

An unregistered path is not an error: the reply has `registered: false`. With
`config_team_ref` the reply also has the settings snapshot taken when that team was
assigned.

From the CLI: `cliq status`.

No credential is needed from this machine. From another host, send `Authorization: Bearer` with a dispatch token CliqHub signed for this daemon or a `cliq_tok_…` personal token of a user in the daemon's realm; this only works once the daemon is connected to CliqHub. See [Authentication](/daemon-api/overview#authentication).



## OpenAPI

````yaml /openapi/daemon-by-tag/daemon-workspaces.yaml post /v1/workspaces/status
openapi: 3.1.0
info:
  title: cliqd API
  version: 1.9.48
  description: >-
    HTTP API of `cliqd`, the local Cliq daemon. Generated from the daemon source
    by `scripts/generate_daemon_openapi.mjs` — do not edit by hand. See the
    [overview](/daemon-api/overview).
servers:
  - url: http://127.0.0.1:4900
    description: Local daemon (default port; `CLIQ_DAEMON_PORT` changes it)
security: []
tags:
  - name: Daemon Workspaces
    description: >-
      A **workspace** is a project folder registered with this daemon. You
      register it once

      (Register a workspace, `cliq init`), assign one or more installed teams to
      it

      (Assign a team to a workspace, `cliq assemble`), then start runs in it
      (Start a run,

      `cliq run`). Workspaces live in the daemon's own catalog; the only thing
      written into

      the folder is an empty `.cliq/` directory.


      Most endpoints take the absolute folder path as `workspace_dir`; assign
      and remove also

      accept the catalog `workspace_id`. Relative paths are resolved against the
      daemon's

      working directory, so always send absolute paths.
paths:
  /v1/workspaces/status:
    post:
      tags:
        - Daemon Workspaces
      summary: Get workspace status
      description: >-
        Returns a snapshot of one workspace: whether it is registered and still
        on disk, its

        assigned teams, the inputs its agents need, its latest run and the runs
        going now.


        An unregistered path is not an error: the reply has `registered: false`.
        With

        `config_team_ref` the reply also has the settings snapshot taken when
        that team was

        assigned.


        From the CLI: `cliq status`.


        No credential is needed from this machine. From another host, send
        `Authorization: Bearer` with a dispatch token CliqHub signed for this
        daemon or a `cliq_tok_…` personal token of a user in the daemon's realm;
        this only works once the daemon is connected to CliqHub. See
        [Authentication](/daemon-api/overview#authentication).
      operationId: daemon_post_workspaces_status
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_dir:
                  type: string
                  minLength: 1
                  description: Absolute workspace path
                config_team_ref:
                  description: Include this team's assembly-time config snapshot
                  type: string
                  minLength: 1
            examples:
              default:
                value:
                  workspace_dir: /home/dev/acme-api
              with_config:
                summary: Include a team's settings snapshot
                value:
                  workspace_dir: /home/dev/acme-api
                  config_team_ref: acme/code-review
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                  - data
                properties:
                  ok:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/WorkspaceStatus'
              example:
                ok: true
                data:
                  workspace_dir: /home/dev/acme-api
                  registered: true
                  exists: true
                  workspace_id: 9b2e6f10-4c3a-4e7d-8f21-6a5b4c3d2e1f
                  name: acme-api
                  assembled: true
                  teams:
                    - scope: acme
                      slug: code-review
                      team_id: 3f6c2a8e-6b1d-4c1e-9a57-0d2f4b8e91c4
                      assembled_at: 1759830600000
                  agent_inputs:
                    - name: pr_url
                      description: Pull request to review
                      required: true
                      agent: claude-code
                      phase: review
                  last_run:
                    run_id: 0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f
                    state: completed
                    started_at: 1759834200000
        '400':
          description: >-
            `BAD_REQUEST` — `workspace_dir` was not sent (it is optional in the
            schema but required here), `config_team_ref` is not `scope/slug`, or
            the body is not valid JSON.


            `WORKSPACE_BAD_REQUEST` — The team in `config_team_ref` is not
            assigned to this workspace.


            `PAYLOAD_INVALID` — The body (query string for `GET`) fails the
            request schema. `details` lists each issue.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReply'
              examples:
                BAD_REQUEST:
                  summary: BAD_REQUEST
                  value:
                    ok: false
                    error:
                      code: BAD_REQUEST
                      message: workspace_dir is required
                WORKSPACE_BAD_REQUEST:
                  summary: WORKSPACE_BAD_REQUEST
                  value:
                    ok: false
                    error:
                      code: WORKSPACE_BAD_REQUEST
                      message: >-
                        Team 'acme/code-review' is not assembled in this
                        workspace
                PAYLOAD_INVALID:
                  summary: PAYLOAD_INVALID
                  value:
                    ok: false
                    error:
                      code: PAYLOAD_INVALID
                      message: Payload failed schema validation
        '401':
          description: >-
            `UNAUTHORIZED` — A caller on another host sent no `Authorization:
            Bearer` token, or one that does not verify (expired, wrong
            audience).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReply'
              examples:
                UNAUTHORIZED:
                  summary: UNAUTHORIZED
                  value:
                    ok: false
                    error:
                      code: UNAUTHORIZED
                      message: Missing or invalid Authorization Bearer token
        '403':
          description: >-
            `WEB_REQUEST_REFUSED` — The request carries an `Origin` header (it
            came from a web page).


            `HOST_NOT_LOCAL` — A loopback caller addressed a `Host` other than
            localhost (DNS rebinding guard).


            `LOCAL_ONLY` — The daemon isn't connected to CliqHub (no dispatch
            key) and the caller is on another host.


            `FORBIDDEN` — A `cliq_tok_…` token's user is not in this daemon's
            realm ACL, or the ACL is not loaded yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReply'
              examples:
                WEB_REQUEST_REFUSED:
                  summary: WEB_REQUEST_REFUSED
                  value:
                    ok: false
                    error:
                      code: WEB_REQUEST_REFUSED
                      message: cliqd doesn't accept requests from web pages
                HOST_NOT_LOCAL:
                  summary: HOST_NOT_LOCAL
                  value:
                    ok: false
                    error:
                      code: HOST_NOT_LOCAL
                      message: cliqd only answers requests addressed to localhost
                LOCAL_ONLY:
                  summary: LOCAL_ONLY
                  value:
                    ok: false
                    error:
                      code: LOCAL_ONLY
                      message: >-
                        This cliqd isn't connected to CliqHub yet, so from
                        another machine it only accepts a local token (minted by
                        tokens/create on the machine running cliqd)
                FORBIDDEN:
                  summary: FORBIDDEN
                  value:
                    ok: false
                    error:
                      code: FORBIDDEN
                      message: Access denied — identity not in realm ACL
        '404':
          description: >-
            `SCOPE_NOT_FOUND` — The scope in `config_team_ref` has no installed
            team.


            `TEAM_NOT_FOUND` — The team in `config_team_ref` is not installed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReply'
              examples:
                SCOPE_NOT_FOUND:
                  summary: SCOPE_NOT_FOUND
                  value:
                    ok: false
                    error:
                      code: SCOPE_NOT_FOUND
                      message: Scope 'acme' not found
                TEAM_NOT_FOUND:
                  summary: TEAM_NOT_FOUND
                  value:
                    ok: false
                    error:
                      code: TEAM_NOT_FOUND
                      message: Team 'acme/code-review' not found
        '500':
          description: >-
            `INTERNAL_ERROR` — An unexpected daemon fault. The message names the
            request id; the cause is in the cliqd log.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReply'
              examples:
                INTERNAL_ERROR:
                  summary: INTERNAL_ERROR
                  value:
                    ok: false
                    error:
                      code: INTERNAL_ERROR
                      message: >-
                        cliqd hit an unexpected error (request 7f3a…). Details
                        are in the cliqd log.
      security:
        - {}
        - DaemonBearer: []
components:
  schemas:
    WorkspaceStatus:
      type: object
      description: A snapshot of one workspace.
      required:
        - workspace_dir
        - registered
        - exists
        - assembled
        - teams
      properties:
        workspace_dir:
          type: string
          example: /home/dev/acme-api
        registered:
          type: boolean
          description: >-
            The path is registered. When `false` only `workspace_dir`, `exists`,
            `assembled` (false) and `teams` (empty) are present.
          example: true
        exists:
          type: boolean
          description: The folder is on disk.
          example: true
        workspace_id:
          type: string
          format: uuid
          example: 9b2e6f10-4c3a-4e7d-8f21-6a5b4c3d2e1f
        name:
          type: string
          example: acme-api
        assembled:
          type: boolean
          example: true
        teams:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/WorkspaceTeamRef'
              - type: object
                properties:
                  assembled_at:
                    type: integer
                    format: int64
                    description: When the team was assigned (epoch milliseconds).
                    example: 1759830600000
        agent_inputs:
          type: array
          description: >-
            Inputs the first assigned team's agents declare, so a client can
            prompt for them before a run. Absent when there is no team or its
            manifest cannot be read.
          items:
            type: object
            required:
              - name
              - agent
            properties:
              name:
                type: string
                example: pr_url
              description:
                type: string
                example: Pull request to review
              required:
                type: boolean
                example: true
              agent:
                type: string
                example: claude-code
              phase:
                type: string
                example: review
              input_type:
                type: string
                description: How a client should ask for it (for example `text`).
                example: text
              default_value:
                type: string
                description: Default from the manifest.
        last_run:
          type: object
          description: The most recent run here. Absent when there has been none.
          required:
            - run_id
            - state
            - started_at
          properties:
            run_id:
              type: string
              format: uuid
              example: 0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f
            state:
              $ref: '#/components/schemas/RunState'
            started_at:
              type: integer
              format: int64
              example: 1759834200000
        active_runs:
          type: array
          description: Runs still going here. Absent when there are none.
          items:
            type: object
            required:
              - run_id
              - state
              - started_at
            properties:
              run_id:
                type: string
                format: uuid
              state:
                $ref: '#/components/schemas/RunState'
              started_at:
                type: integer
                format: int64
        config_snapshot:
          type: object
          additionalProperties: true
          description: >-
            Only with `config_team_ref`. The daemon settings captured when that
            team was assigned (credentials are always read live and are not in
            it). Runs of the team use this snapshot.
    ErrorReply:
      type: object
      description: >-
        Every failure. Switch on `error.code` — it is stable; `message` is for
        people and may change.
      required:
        - ok
        - error
      properties:
        ok:
          type: boolean
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable error code. See [Errors](/daemon-api/errors).
              example: TEAM_NOT_FOUND
            message:
              type: string
              description: What went wrong and, where possible, what to do.
              example: Team 'acme/code-review' not found
            details:
              description: >-
                Structured detail when there is some: the list of schema issues
                for `PAYLOAD_INVALID`, the agent problems for
                `TEAM_AGENT_CONFIG_REQUIRED`, …
    WorkspaceTeamRef:
      type: object
      description: A team assigned to a workspace.
      required:
        - scope
        - slug
        - team_id
      properties:
        scope:
          type: string
          description: Team scope without the `@`.
          example: acme
        slug:
          type: string
          description: Team slug.
          example: code-review
        team_id:
          type: string
          format: uuid
          description: The team's id in this daemon's catalog.
          example: 3f6c2a8e-6b1d-4c1e-9a57-0d2f4b8e91c4
    RunState:
      type: string
      enum:
        - running
        - awaiting_input
        - completed
        - failed
        - cancelled
        - crashed
      description: >
        - `running` — a phase is executing

        - `awaiting_input` — paused until someone supplies inputs (Supply run
        inputs)

        - `completed` / `failed` / `cancelled` — finished

        - `crashed` — the daemon stopped while the run was going; it was marked
        crashed on restart
      example: completed
  securitySchemes:
    DaemonBearer:
      type: http
      scheme: bearer
      description: >-
        Not needed from the same machine. From another host: a dispatch JWT
        CliqHub signed for this daemon, or a `cliq_tok_…` personal token whose
        user is in the daemon's realm.

````

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