Skip to main content
POST
Create Code Review

Authorizations

Authorization
string
header
required

The API key to authenticate requests. Obtainable from the web dashboard.

Body

application/json
prUrl
string
required

The pull request or GitLab merge request URL. Accepts URLs with or without an HTTP or HTTPS scheme. Trailing paths, query parameters, and fragments are ignored when identifying the pull request or merge request.

Example:

"https://github.com/acme/backend/pull/123"

headSha
string

The full commit SHA to analyze. Defaults to the current pull request head when omitted.

Minimum string length: 40
Example:

"8a1b2c3d4e5f678901234567890123456789abcd"

deepReview
boolean

Whether to use deep review. Defaults to the organization's setting when omitted.

Example:

true

Response

Accepted - The run has been queued

id
string<uuid>
required

The ID of a resource that can be retrieved from the service.

status
enum<string>
required

The status of an asynchronous run. Poll while processing. Complete and failed are terminal states.

Available options:
processing,
complete,
failed
Example:

"processing"

headSha
string
required

The head commit SHA analyzed by this code review.

Example:

"8a1b2c3d4e5f678901234567890123456789abcd"

prUrl
string<uri>
required

URL of the pull request in its source control provider.

Example:

"https://github.com/acme/backend/pull/123"

headBranch
string
required

The pull request's source branch.

Example:

"feature/add-validation"

baseBranch
string
required

The pull request's target branch when this code review was created.

Example:

"main"

trigger
enum<string>
required

The event that triggered this code review.

Available options:
Pull request code changed,
Pull request opened,
Pull request ready for review,
Pull request reopened,
Pull request label added,
Manually triggered,
Public API
Example:

"Public API"

deepReview
boolean
required

Whether this review uses deep review.

Example:

true

error
string

An error message present when status is failed; omitted otherwise.

Example:

"Unable to retrieve the pull request diff."

comments
object[]

Present when status is complete; omitted otherwise. An empty array means no findings.