Ask an agent to review a ticket's pull request now
curl --request POST \ --url https://example.com/api/v1/tasks/example/agent-reviews \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "again": true, "kind": "code_review" }'Starts a code review (code_review) or a QA pass (qa) of the ticket’s pull request at its current commit, even when the project’s review switches are off: those only start reviews on their own. It SPENDS MONEY, up to the review limit and the ticket limit that getProjectAgentReviews shows, and the caller answers for it. The pull request is the newest one an agent delivered, else the ticket’s Pull request field; it must be in the ticket’s repository, ready for review and into the project’s pull request branch, else 422 says what is missing. A review of the same commit the ticket already has is returned with outcome existing and nothing is spent; send again true to review a finished one again. 409 while another ticket’s review of the same commit runs. The report is an internal comment on the ticket. Requires tasks.delegate and a ticket the caller reaches.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Resource identifier (CUID2).
Resource identifier (CUID2).
Request Body
Section titled “Request Body”object
True to review again a commit the ticket already has a finished review of (reported, skipped or failed), which spends money again; omit to get that review back
Code_review for the Code review agent, qa for the QA agent checking the acceptance criteria
Responses
Section titled “Responses”The ticket’s review of this commit, already there; nothing was spent.
object
The review a person asked an agent for on a ticket’s pull request.
object
Queued: a session will run; skipped: it could not run and the ticket got a note naming the cause; existing: the ticket already has a review of this commit and nothing was spent
object
1 for the first review of this commit, higher for each review again
The commit reviewed
The pull request reviewed
Why a skipped or released review did not run
Where the review is; its report is an internal comment on the ticket
Example
{ "data": { "outcome": "queued", "review": { "kind": "code_review", "status": "QUEUED" } }}The review asked for: queued, or skipped with its cause.
object
The review a person asked an agent for on a ticket’s pull request.
object
Queued: a session will run; skipped: it could not run and the ticket got a note naming the cause; existing: the ticket already has a review of this commit and nothing was spent
object
1 for the first review of this commit, higher for each review again
The commit reviewed
The pull request reviewed
Why a skipped or released review did not run
Where the review is; its report is an internal comment on the ticket
Example
{ "data": { "outcome": "queued", "review": { "kind": "code_review", "status": "QUEUED" } }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Not found.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Conflict.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Invalid input.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC