Skip to content

Turn the review of a project's agents' pull requests on or off

PUT
/projects/{id}/agent-reviews
Code sample: Shell / cURL
curl --request PUT \
--url https://example.com/api/v1/projects/example/agent-reviews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "monthlySecurityAudit": true, "qaOnReviewStatus": true, "reviewAgentPullRequests": true, "reviewTeamPullRequests": true }'

Each switch left out keeps its value. Turning reviewAgentPullRequests on spends money on every pull request an agent opens in the project, up to the review and ticket limits; reviewTeamPullRequests spends it on every pull request a team member opens that links one of the project’s tickets (the ticket’s link in the pull request description, else a ticket whose Pull request field is the pull request’s address; a pull request that maps to two or more tickets is not reviewed); qaOnReviewStatus spends it on a QA pass of each ticket that reaches the review status; monthlySecurityAudit spends it on a monthly read-only audit of the linked repository. Each adds its agent to the project’s members; the response says so in agentAdded. Turning one off leaves the agent a member. Refused with 422 when the agent is not installed. Requires projects.manage and tasks.delegate and a project the caller reaches.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

Media typeapplication/json
object
monthlySecurityAudit

True to audit the project’s linked repository for security every month, read-only, which spends money; false to stop. Omit to keep it

boolean
qaOnReviewStatus

True to run a QA pass when a ticket reaches the project’s review status, which spends money and needs that status mapped in the delegation statuses; false to stop. Omit to keep it

boolean
reviewAgentPullRequests

True to review the pull requests this project’s agents open, which spends money; false to stop. Omit to keep it

boolean
reviewTeamPullRequests

True to also review the pull requests the team’s own people open, found through the ticket link in the pull request description or the ticket’s Pull request field, which spends money; false to stop. Omit to keep it

boolean

Example generated

{
"monthlySecurityAudit": true,
"qaOnReviewStatus": true,
"reviewAgentPullRequests": true,
"reviewTeamPullRequests": true
}

The review settings after the change.

Media typeapplication/json
object
data
required

A project’s review settings after a change.

object
agent
required

The Code review agent that reviews; null when none is installed

Any of:
object
canOpenProject
required

False until the agent is a member of the project

boolean
id
required
string
name
required
string
agentAdded
required

True when switching on added the Code review agent to the project’s members

boolean
audit

The monthly security audit; absent on an older server

object
agent
required

The Security agent; null when none is installed

Any of:
object
canOpenProject
required

False until the agent is a member of the project

boolean
id
required
string
name
required
string
agentMonthUsd
required

What the Security agent spent this UTC month

number
enabledBy
required

Who switched the audit on, and answers for what it costs

Any of:
object
id
required
string
name
required
string
isOn
required

Whether the project’s repository is audited every month

boolean
projectMonthUsd
required

What this project’s audits spent this UTC month

number
canChange
required

Whether the caller may switch reviews on or off

boolean
enabledAt
required

When reviews were last switched on

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
enabledBy
required

Who switched them on, and answers for what they cost beyond a lead’s tickets

Any of:
object
id
required
string
name
required
string
githubReachable
required

Whether GitHub can deliver pull request events to this instance

boolean
hasRepository
required

Whether the project has a linked repository

boolean
projectId
required
string
qa

The QA pass of a ticket reaching review; absent on an older server

object
agent
required

The QA agent; null when none is installed

Any of:
object
canOpenProject
required

False until the agent is a member of the project

boolean
id
required
string
name
required
string
agentMonthUsd
required

What the QA agent spent this UTC month

number
enabledBy
required

Who switched the QA pass on, and answers for what it costs

Any of:
object
id
required
string
name
required
string
isOn
required

Whether a ticket reaching the review status gets a QA pass

boolean
reviewStatus
required

The status that starts it; null while the review stage is unmapped

Any of:
object
id
required
string
name
required
string
reviewAgentPullRequests
required

Whether agents’ pull requests are reviewed

boolean
spend
required
object
agentMonthLimitUsd
required

The agent’s monthly limit

number
agentMonthUsd
required

What the Code review agent spent this UTC month

number
projectMonthUsd
required

What this project’s reviews spent this UTC month

number
reviewLimitUsd
required

The most one review may spend, in dollars

number
ticketLimitUsd
required

The most all reviews of one ticket may spend

number
team

The review of the team’s own pull requests, found through their ticket link; absent on an older server

object
enabledBy
required

Who switched it on, and answers for what it costs

Any of:
object
id
required
string
name
required
string
isOn
required

Whether the team’s own pull requests are reviewed

boolean

Example generated

{
"data": {
"agent": {
"canOpenProject": true,
"id": "example",
"name": "example"
},
"agentAdded": true,
"audit": {
"agent": {
"canOpenProject": true,
"id": "example",
"name": "example"
},
"agentMonthUsd": 1,
"enabledBy": {
"id": "example",
"name": "example"
},
"isOn": true,
"projectMonthUsd": 1
},
"canChange": true,
"enabledAt": "2026-04-15T12:00:00Z",
"enabledBy": {
"id": "example",
"name": "example"
},
"githubReachable": true,
"hasRepository": true,
"projectId": "example",
"qa": {
"agent": {
"canOpenProject": true,
"id": "example",
"name": "example"
},
"agentMonthUsd": 1,
"enabledBy": {
"id": "example",
"name": "example"
},
"isOn": true,
"reviewStatus": {
"id": "example",
"name": "example"
}
},
"reviewAgentPullRequests": true,
"spend": {
"agentMonthLimitUsd": 1,
"agentMonthUsd": 1,
"projectMonthUsd": 1,
"reviewLimitUsd": 1,
"ticketLimitUsd": 1
},
"team": {
"enabledBy": {
"id": "example",
"name": "example"
},
"isOn": true
}
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Conflict.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.