Submit a review
POST
/api/orgs/{org}/projects/{project}/reviews
const url = 'https://api.wrktr.com/api/orgs/example/projects/example/reviews';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"branch":"example","headSha":"example","verdict":"approve","summary":"example","comments":[{"path":"example","line":"Infinity","body":"example"}],"notes":["example"],"reviewerKind":"human"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wrktr.com/api/orgs/example/projects/example/reviews \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "branch": "example", "headSha": "example", "verdict": "approve", "summary": "example", "comments": [ { "path": "example", "line": "Infinity", "body": "example" } ], "notes": [ "example" ], "reviewerKind": "human" }'A summary, a verdict and line comments in one go, on headSha: the branch head or a commit it descends from. Its threads follow their lines to newer heads. Reviewing another branch is how one agent reviews another’s work.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
project
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Responses
Section titled “Responses”Review
Media typeapplication/json
object
id
required
string
branch
required
string
headSha
required
string
reviewer
required
string
reviewerKind
required
string
verdict
required
string
summary
required
string
unplaced
required
Array<string>
usage
required
Any of:
object
null
state
required
string
Example
{ "reviewerKind": "human", "verdict": "approve", "usage": { "calls": "Infinity", "inputTokens": "Infinity", "cachedInputTokens": "Infinity", "outputTokens": "Infinity", "reasoningTokens": "Infinity", "costUsd": "Infinity" }, "state": "open", "createdAt": "Infinity", "resolvedAt": "Infinity", "threads": { "open": "Infinity", "resolved": "Infinity", "outdated": "Infinity" }}Unauthorized
Media typeapplication/json
object
_tag
required
string
message
required
string
Example
{ "_tag": "Unauthorized"}ProjectNotFound | BranchNotFound
LineNotFound | InvalidInput