Skip to Content
API ReferenceReviews (HITL)

Reviews (HITL)

The human-in-the-loop (HITL) review queue allows analysts to manually verify, approve, reject, or modify PII findings before final redaction is applied. Reviews are created automatically when a job’s policy requires human review or when a finding’s confidence falls below a configurable threshold.

Review Object

FieldTypeDescription
idstringUnique review identifier
job_idstringAssociated job ID
findingobjectThe PII finding under review
statusstringOne of pending, approved, rejected, modified
reviewerstringReviewer identifier (null if pending)
commentstringOptional reviewer comment
created_atstringISO 8601 timestamp
resolved_atstringISO 8601 timestamp (null if pending)

GET /reviews

List pending reviews for the current tenant.

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter by status (default: pending)
job_idstringNoFilter by job ID
limitnumberNoMax results (default: 50, max: 100)
offsetnumberNoPagination offset (default: 0)

Example

curl "https://api.pii-redactor.dev/api/v1/reviews?status=pending&limit=20" \ -H "X-API-Key: pk_live_abc123"
[ { "id": "rev_x1y2z3", "job_id": "job_8f3a1b2c4d5e", "finding": { "entity_type": "PERSON", "text": "Dr. Jane", "start": 15, "end": 23, "score": 0.62 }, "status": "pending", "reviewer": null, "comment": null, "created_at": "2026-02-13T10:00:00Z", "resolved_at": null } ]

GET /reviews/{review_id}

Get details of a specific review.

Example

curl https://api.pii-redactor.dev/api/v1/reviews/rev_x1y2z3 \ -H "X-API-Key: pk_live_abc123"

Returns a single review object.


POST /reviews/{review_id}/approve

Approve a finding, confirming it is valid PII and should be redacted.

Request Body

FieldTypeRequiredDescription
commentstringNoOptional reviewer comment

Example

curl -X POST https://api.pii-redactor.dev/api/v1/reviews/rev_x1y2z3/approve \ -H "X-API-Key: pk_live_abc123" \ -H "Content-Type: application/json" \ -d '{"comment": "Confirmed as patient name"}'
{ "id": "rev_x1y2z3", "status": "approved", "reviewer": "user_abc", "comment": "Confirmed as patient name", "resolved_at": "2026-02-13T10:05:00Z" }

POST /reviews/{review_id}/reject

Reject a finding, indicating it is a false positive and should not be redacted.

Request Body

FieldTypeRequiredDescription
commentstringNoOptional reviewer comment

Example

curl -X POST https://api.pii-redactor.dev/api/v1/reviews/rev_x1y2z3/reject \ -H "X-API-Key: pk_live_abc123" \ -H "Content-Type: application/json" \ -d '{"comment": "This is a product name, not a person"}'
{ "id": "rev_x1y2z3", "status": "rejected", "reviewer": "user_abc", "comment": "This is a product name, not a person", "resolved_at": "2026-02-13T10:05:00Z" }

POST /reviews/{review_id}/modify

Modify a finding by changing the entity type, boundaries, or redacted value.

Request Body

FieldTypeRequiredDescription
entity_typestringNoCorrected entity type
startnumberNoCorrected start offset
endnumberNoCorrected end offset
redactedstringNoCustom replacement value
commentstringNoOptional reviewer comment

Example

curl -X POST https://api.pii-redactor.dev/api/v1/reviews/rev_x1y2z3/modify \ -H "X-API-Key: pk_live_abc123" \ -H "Content-Type: application/json" \ -d '{ "entity_type": "MEDICAL_PROFESSIONAL", "comment": "Reclassified from PERSON to MEDICAL_PROFESSIONAL" }'
{ "id": "rev_x1y2z3", "status": "modified", "reviewer": "user_abc", "comment": "Reclassified from PERSON to MEDICAL_PROFESSIONAL", "resolved_at": "2026-02-13T10:05:00Z" }