Code Reviews

Get a code review and linked agent state

Returns review metadata, grouped findings, discussion comments, and linked agent state for a REST-created code review.

GET /api/public/v1/code-reviews/{reviewId}

Get a code review and linked agent state

curl --request GET \
  --url 'https://api.buildprint.ai/api/public/v1/code-reviews/{REVIEWID}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "reviewId": "<string>",
  "review": {
    "sequence": 1,
    "mergeId": "<string>",
    "status": "open",
    "title": "<string>",
    "description": "<string>",
    "fromVersion": "<string>",
    "toVersion": "<string>",
    "fromVersionLabel": "<string>",
    "toVersionLabel": "<string>",
    "requestedByName": "<string>",
    "requestedByEmail": "<string>",
    "requestedByImage": "<string>"
  },
  "changes": [
    {
      "id": "<string>",
      "type": "change",
      "title": "<string>",
      "description": "<string>",
      "priority": "high",
      "state": "open",
      "createdBy": "ai",
      "createdByEmail": "<string>",
      "createdAt": 1,
      "updatedAt": 1,
      "completedAt": 1
    }
  ],
  "comments": [
    {
      "id": "<string>",
      "type": "change",
      "title": "<string>",
      "description": "<string>",
      "priority": "high",
      "state": "open",
      "createdBy": "ai",
      "createdByEmail": "<string>",
      "createdAt": 1,
      "updatedAt": 1,
      "completedAt": 1
    }
  ],
  "tests": [
    {
      "id": "<string>",
      "type": "change",
      "title": "<string>",
      "description": "<string>",
      "priority": "high",
      "state": "open",
      "createdBy": "ai",
      "createdByEmail": "<string>",
      "createdAt": 1,
      "updatedAt": 1,
      "completedAt": 1
    }
  ],
  "reviewComments": [
    {
      "id": "<string>",
      "parentId": "<string>",
      "authorName": "<string>",
      "authorEmail": "<string>",
      "authorImage": "<string>",
      "body": "<string>",
      "imageUrls": [
        "<string>"
      ],
      "isDeleted": true,
      "editedAt": 1,
      "createdAt": 1
    }
  ],
  "agent": {
    "agentId": "<string>",
    "kind": "agent",
    "status": "queued",
    "appId": "<string>",
    "projectId": "<string>",
    "projectName": "<string>",
    "model": "claude-opus-4.6",
    "reasoningEffort": "none",
    "permission": "read_only",
    "permittedBranches": [
      "<string>"
    ],
    "createdAt": 1,
    "updatedAt": 1
  }
}

Code review found

Authorizations

  • Authorization string required header

    Workspace REST API token prefixed with bp_

Path Parameters

  • reviewId string required

    Identifier of the code review to retrieve.

Query Parameters

  • historyLimit integer

    Maximum number of recent history items to return. Defaults to 100 and caps at 500.

Response

application/json
  • reviewId string

    Opaque identifier for the code review.

  • review object

    Summary metadata for the code review.

    + Show Child Attributes
    • sequence number

      Human-readable sequence number for the review within the project.

    • mergeId string

      Stable merge identifier for the review.

    • status string enum enum

      Current review status. Allowed values: open, merged, closed.

    • title string | null

      Review title.

    • description string | null

      Optional review description provided at creation time.

    • fromVersion string

      Source branch or version being reviewed.

    • toVersion string

      Target branch or version being compared against.

    • fromVersionLabel string | null

      Display label for the source branch or version.

    • toVersionLabel string | null

      Display label for the target branch or version.

    • requestedByName string | null

      Display name of the user who requested the review.

    • requestedByEmail string | null

      Email of the user who requested the review.

    • requestedByImage string | null

      Avatar URL for the user who requested the review.

    • linearIssueId string | null

      Linked Linear issue ID when one is associated.

    • linearIssueIdentifier string | null

      Linked Linear issue identifier when one is associated.

    • provider string enum enum

      Provider backing the selected model. Allowed values: claude, openai, gemini, opencode.

    • model string enum enum

      Model identifier used for the review. 15 allowed enum values.

    • createdAt number

      Unix timestamp in milliseconds when the review was created.

    • updatedAt number

      Unix timestamp in milliseconds when the review was last updated.

    • completedAt number | null

      Unix timestamp in milliseconds when the review completed.

    • mergedAt number | null

      Unix timestamp in milliseconds when the review was marked merged.

    • closedAt number | null

      Unix timestamp in milliseconds when the review was closed without merging.

    • conversationStatus string enum | null

      Current lifecycle state of the linked agent conversation.

    • conversationErrorCode string | null

      Internal error code from the linked conversation when one exists.

  • changes[] object array

    Change findings attached to the review. Review element surfaced within a code review.

    + Show Child Attributes
    • id string

      Unique identifier for the review element.

    • type string enum enum

      Category of review element. Allowed values: change, comment, test.

    • title string

      Short title shown for the review element.

    • description string

      Detailed explanation of the change, comment, or test.

    • priority string enum | null

      Priority assigned to the element when one exists.

    • state string enum enum

      Whether the element still needs attention. Allowed values: open, completed.

    • createdBy string enum enum

      Whether the element was created by AI or by a user. Allowed values: ai, user.

    • createdByEmail string | null

      Email of the user who created the element when available.

    • createdAt number

      Unix timestamp in milliseconds when the element was created.

    • updatedAt number

      Unix timestamp in milliseconds when the element was last updated.

    • completedAt number | null

      Unix timestamp in milliseconds when the element was completed, if it was completed.

  • comments[] object array

    Comment findings attached to the review. Review element surfaced within a code review.

    + Show Child Attributes
    • id string

      Unique identifier for the review element.

    • type string enum enum

      Category of review element. Allowed values: change, comment, test.

    • title string

      Short title shown for the review element.

    • description string

      Detailed explanation of the change, comment, or test.

    • priority string enum | null

      Priority assigned to the element when one exists.

    • state string enum enum

      Whether the element still needs attention. Allowed values: open, completed.

    • createdBy string enum enum

      Whether the element was created by AI or by a user. Allowed values: ai, user.

    • createdByEmail string | null

      Email of the user who created the element when available.

    • createdAt number

      Unix timestamp in milliseconds when the element was created.

    • updatedAt number

      Unix timestamp in milliseconds when the element was last updated.

    • completedAt number | null

      Unix timestamp in milliseconds when the element was completed, if it was completed.

  • tests[] object array

    Test findings attached to the review. Review element surfaced within a code review.

    + Show Child Attributes
    • id string

      Unique identifier for the review element.

    • type string enum enum

      Category of review element. Allowed values: change, comment, test.

    • title string

      Short title shown for the review element.

    • description string

      Detailed explanation of the change, comment, or test.

    • priority string enum | null

      Priority assigned to the element when one exists.

    • state string enum enum

      Whether the element still needs attention. Allowed values: open, completed.

    • createdBy string enum enum

      Whether the element was created by AI or by a user. Allowed values: ai, user.

    • createdByEmail string | null

      Email of the user who created the element when available.

    • createdAt number

      Unix timestamp in milliseconds when the element was created.

    • updatedAt number

      Unix timestamp in milliseconds when the element was last updated.

    • completedAt number | null

      Unix timestamp in milliseconds when the element was completed, if it was completed.

  • reviewComments[] object array

    Threaded discussion comments attached to the review. Comment left on a code review.

    + Show Child Attributes
    • id string

      Unique identifier for the review comment.

    • parentId string | null

      Parent comment identifier when this comment is part of a thread.

    • authorName string | null

      Display name of the comment author.

    • authorEmail string | null

      Email address of the comment author.

    • authorImage string | null

      Avatar URL for the comment author.

    • body string | null

      Comment body text, or null if the comment has been deleted.

    • imageUrls[] string array

      Images attached to the comment. Absolute URL for an image attached to the comment.

    • isDeleted boolean

      Whether the comment has been deleted.

    • editedAt number | null

      Unix timestamp in milliseconds when the comment was last edited.

    • createdAt number

      Unix timestamp in milliseconds when the comment was created.

  • agent object

    Linked agent state for the review conversation.

    + Show Child Attributes
    • agentId string

      Opaque identifier for the linked agent conversation.

    • kind string enum enum

      Type of REST API resource represented by the response. Allowed values: agent, code_review.

    • status string enum enum

      Current high-level lifecycle state for the asynchronous run. Allowed values: queued, running, completed, error.

    • appId string

      Bubble app ID for the workspace project this request targets.

    • projectId string

      Opaque identifier for the workspace project.

    • projectName string

      Human-readable name of the workspace project.

    • model string enum enum

      Model identifier used for the run. 15 allowed enum values.

    • reasoningEffort string enum | null

      Requested reasoning effort for the selected model.

    • permission string enum enum

      Whether the run can only inspect the app or is also allowed to make edits. Allowed values: read_only, allow_edits.

    • permittedBranches[] string array

      Branches the run is allowed to access when branch restrictions apply.

    • createdAt number

      Unix timestamp in milliseconds when the resource was created.

    • updatedAt number

      Unix timestamp in milliseconds when the resource was last updated.

    • completedAt number | null

      Unix timestamp in milliseconds when the resource completed.

    • lastError string | null

      Last error message recorded for the run.

    • history[] object array

      Recent conversation history for the run. Single message returned in agent or review history.

      + Show Child Attributes
      • id string

        Unique identifier for the history message.

      • sequence number

        Conversation sequence number for the message.

      • role string enum enum

        Normalized role for the history message. 6 allowed enum values.

      • content string | null

        Message content when the message carries textual content.

      • toolName string | null

        Tool name associated with the message when the message represents tool activity.

      • toolParameters any | null

        Structured tool arguments when the message represents a tool call.

      • attachments[] oneOf array

        Files and linked issues attached to the message.

        + Show Child Attributes
        • oneOf options 2 variants oneOf

          Exactly one option applies.

          + Show Child Attributes
          • option 1 object
            + Show Child Attributes
            • id string

              Unique identifier for the attached file.

            • type string

              Attachment type.

            • name string

              Display name of the attached file.

            • contentType anyOf

              MIME type for the attached file.

              + Show Child Attributes
              • anyOf options 2 variants anyOf

                One or more options can apply.

                + Show Child Attributes
                • option 1 string

                  Schema traversal was truncated at maximum depth.

                • option 2 null

                  Schema traversal was truncated at maximum depth.

            • sizeBytes anyOf

              Size of the attached file in bytes.

              + Show Child Attributes
              • anyOf options 2 variants anyOf

                One or more options can apply.

                + Show Child Attributes
                • option 1 number

                  Schema traversal was truncated at maximum depth.

                • option 2 null

                  Schema traversal was truncated at maximum depth.

            • createdAt number

              Unix timestamp in milliseconds when the attachment was created.

          • option 2 object
            + Show Child Attributes
            • id string

              Unique identifier for the linked Linear attachment.

            • type string

              Attachment type.

            • name string

              Display name of the linked Linear issue.

            • linearIssue anyOf

              Linked Linear issue metadata when one is associated.

              + Show Child Attributes
              • anyOf options 2 variants anyOf

                One or more options can apply.

                + Show Child Attributes
                • option 1 object

                  Schema traversal was truncated at maximum depth.

                • option 2 null

                  Schema traversal was truncated at maximum depth.

            • createdAt number

              Unix timestamp in milliseconds when the attachment was created.

      • createdAt number

        Unix timestamp in milliseconds when the message was created.

    • lifecycle object

      Lifecycle summary for the linked agent conversation.

      + Show Child Attributes
      • conversationState string enum enum

        Internal lifecycle state of the linked conversation. Allowed values: draft, ready, running_turn, errored, archived.

      • sandboxState string enum enum

        Current lifecycle state of the sandbox used by the run. 6 allowed enum values.

      • queuedTurnCount number

        Number of turns still queued to run.

      • lastLifecycleEventAt number | null

        Unix timestamp in milliseconds for the most recent lifecycle event.