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

# List reviews

> Lists the reviews in your inbox, newest first, in a realm or across an organization; by default only `pending` ones.

Requires a signed-in user token; with `realm_id`, a realm member (or higher) with the `reviews.view` permission on that realm; with `org_id`, a role with the `reviews.view` permission in that organization. With neither, the results are limited to what you can see.



## OpenAPI

````yaml /openapi/hub-by-tag/hub-reviews.yaml post /v1/reviews/get
openapi: 3.0.3
info:
  title: 'CliqHub API: Reviews'
  version: 1.0.0
  description: >-
    Human-in-the-loop (HUG) reviews. When a team reaches a review phase, the
    agent opens a

    review; CliqHub notifies the reviewers (people and channels named in the
    team or at run

    start) and shows the review in their inbox. A reviewer reads it, can chat
    with the agent,

    and gives a verdict (`PASS`, `REJECT` or `ROUTE:<phase>`); with an `all`
    policy every group

    must answer first. The agent then picks up the decision and acknowledges it.


    A review is `pending`, then `decided`, then `completed` once the agent
    acknowledged it, or

    `expired` when nobody answered in time (4 hours by default).
servers:
  - url: https://{host}
    variables:
      host:
        default: cliqhub.io
        description: CliqHub host
security: []
tags:
  - name: Reviews
    description: >-
      Human-in-the-loop (HUG) reviews. When a team reaches a review phase, the
      agent opens a

      review; CliqHub notifies the reviewers (people and channels named in the
      team or at run

      start) and shows the review in their inbox. A reviewer reads it, can chat
      with the agent,

      and gives a verdict (`PASS`, `REJECT` or `ROUTE:<phase>`); with an `all`
      policy every group

      must answer first. The agent then picks up the decision and acknowledges
      it.


      A review is `pending`, then `decided`, then `completed` once the agent
      acknowledged it, or

      `expired` when nobody answered in time (4 hours by default).
paths:
  /v1/reviews/get:
    post:
      tags:
        - Reviews
      summary: List reviews
      description: >-
        Lists the reviews in your inbox, newest first, in a realm or across an
        organization; by default only `pending` ones.


        Requires a signed-in user token; with `realm_id`, a realm member (or
        higher) with the `reviews.view` permission on that realm; with `org_id`,
        a role with the `reviews.view` permission in that organization. With
        neither, the results are limited to what you can see.
      operationId: POST_v1_reviews_get
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                realm_id:
                  type: string
                  description: Only reviews in this realm.
                org_id:
                  type: string
                  format: uuid
                  description: |-
                    Organization UUID. Required when listing without realm_id.
                    Never invent from X-Org-Id.
                statuses:
                  type: array
                  items:
                    type: string
                  description: >-
                    Statuses to include: `pending` (default), `decided`,
                    `completed`, `expired`.
                limit:
                  type: integer
                  minimum: 1
                  description: Page size. Default 50.
                offset:
                  type: integer
                  description: Rows to skip, for paging.
            examples:
              default:
                value:
                  org_id: 2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                    description: Always `true` on success.
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/PendingReview'
                      total:
                        type: integer
                      offset:
                        type: integer
                      limit:
                        type: integer
                required:
                  - ok
              example:
                ok: true
                data:
                  items:
                    - review_id: 4a3b2c1d-0e9f-4a8b-9c7d-6e5f4a3b2c1d
                      realm_id: 5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b
                      realm_name: Production
                      realm_slug: production
                      org_slug: acme
                      run_id: 0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f
                      run_name: brave-otter
                      phase: approve
                      team: code-review
                      title: Approve the fix
                      message: 3 findings fixed; approve to merge.
                      review_url: >-
                        https://cliqhub.io/reviews/4a3b2c1d-0e9f-4a8b-9c7d-6e5f4a3b2c1d
                      event: hug.review_requested
                      requested_at: 1759834500000
                      notification_id: 5b4c3d2e-1f0a-4b9c-8d7e-6f5a4b3c2d1e
                      status: pending
                      artifact_count: 1
                      resolved_at: null
                      last_reminded_at: null
                  total: 1
                  offset: 0
                  limit: 50
                  type: array
        '401':
          description: >-
            `unauthorized`: No `Authorization` header, or the token is
            malformed, expired or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    ok: false
                    error:
                      code: unauthorized
                      message: Authentication required
        '403':
          description: >-
            `forbidden`: You can see the realm or organization but your role
            lacks the required permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    ok: false
                    error:
                      code: forbidden
                      message: You do not have access to do this
        '404':
          description: >-
            `not_found`: The realm or organization you named does not exist or
            you cannot see it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                not_found:
                  summary: not_found
                  value:
                    ok: false
                    error:
                      code: not_found
                      message: Not found
        '422':
          description: '`invalid_params`: Neither `realm_id` nor `org_id` was sent.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HubErr'
              examples:
                invalid_params:
                  summary: invalid_params
                  value:
                    ok: false
                    error: >-
                      org_id: org_id is required when listing reviews without
                      realm_id
                    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:
        - BearerAuth: []
components:
  schemas:
    PendingReview:
      type: object
      description: One review in your inbox.
      properties:
        review_id:
          type: string
        realm_id:
          type: string
        realm_name:
          type: string
          nullable: true
        realm_slug:
          type: string
          nullable: true
        org_slug:
          type: string
          nullable: true
        run_id:
          type: string
          nullable: true
        run_name:
          type: string
          nullable: true
        phase:
          type: string
          nullable: true
        team:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        review_url:
          type: string
          nullable: true
          description: Link to the review in the console.
        event:
          type: string
        requested_at:
          type: number
        notification_id:
          type: string
          description: Your ballot for this review; send it with Give a verdict.
        status:
          type: string
          enum:
            - pending
            - decided
            - completed
            - expired
        artifact_count:
          type: integer
        resolved_at:
          type: number
          nullable: true
        last_reminded_at:
          type: number
          nullable: true
    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.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cliq_tok_* | cliq_dt_*
      description: >-
        User PAT (`cliq_tok_…`, including session-scoped) or realm token
        (`cliq_dt_…`).

````

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