Answer a review case
POST
/v1/review/{case_id}/answer
const url = 'https://api.pensievelabs.co/v1/review/rev_grade_01/answer';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"answer":"false_pass","by":"maya@example.com","add_to_test":true}'};
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.pensievelabs.co/v1/review/rev_grade_01/answer \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "answer": "false_pass", "by": "maya@example.com", "add_to_test": true }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”case_id
required
string
Example
rev_grade_01Header Parameters
Section titled “Header Parameters”Idempotency-Key
string
Any unique string. Sending it again within 24 hours returns the first response.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
answer
required
string
by
required
string
note
string
add_to_test
Also hold the case out as a test case.
boolean
Example
{ "answer": "false_pass", "by": "maya@example.com", "add_to_test": true}Responses
Section titled “Responses”The answered case.
Media typeapplication/json
object
id
required
string
object
required
model
required
string
kind
required
unsure: the model fell under its threshold. disagreement: the outcome went against the model. signoff: a release waits for an expert.
string
state
required
string
call_id
required
string | null
release_id
required
string | null
model_answer
required
string | null
confidence
required
number | null
outcome
required
string | null
answer
required
string | null
answered_by
required
string | null
created_at
required
string format: date-time
Example
{ "id": "rev_grade_01", "object": "review_case", "kind": "unsure", "state": "open"}default
Section titled “default”Something went wrong; error.type says what.
Media typeapplication/json
object
error
required
object
type
required
string
message
required
string
param
The request field the error is about.
string | null
request_id
required
string
Example
{ "error": { "type": "invalid_request" }}