# Review Queue

## List review queue items

> Returns review items with rich filtering and sorting.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"PaginatedResponse_ReviewItemResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewItemResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ReviewItemResponse]"},"ReviewItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","enum":["pending","in_progress","completed","rejected"],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the review item was created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string","enum":["approve","reject","correct","approved","rejected","corrected"]},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue":{"get":{"tags":["Review Queue"],"summary":"List review queue items","description":"Returns review items with rich filtering and sorting.","operationId":"list_review_items_v1__workspace_id__review_queue_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"asc","title":"Sort Order"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"exclusiveMinimum":0,"default":10,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Continuation Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ReviewItemResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /v1/{workspace\_id}/review-queue/stats

> Review queue statistics

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"ReviewStatsResponse":{"properties":{"pending":{"type":"integer","title":"Pending"},"completed":{"type":"integer","title":"Completed"},"rejected":{"type":"integer","title":"Rejected"},"avg_review_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Review Minutes"}},"type":"object","required":["pending","completed","rejected","avg_review_minutes"],"title":"ReviewStatsResponse"}}},"paths":{"/v1/{workspace_id}/review-queue/stats":{"get":{"tags":["Review Queue"],"summary":"Review queue statistics","operationId":"review_stats_v1__workspace_id__review_queue_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewStatsResponse"}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}]}}}}
```

## Review queue dashboard composite

> Aggregated view for the review queue page: stats, priority breakdown, recent completions.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"ReviewDashboardResponse":{"properties":{"stats":{"$ref":"#/components/schemas/ReviewStatsResponse"},"pending_by_priority":{"additionalProperties":{"type":"integer"},"type":"object","title":"Pending By Priority"},"pending_by_reason":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Pending By Reason"},"recent_completed":{"items":{"$ref":"#/components/schemas/ReviewItemResponse"},"type":"array","title":"Recent Completed"},"completion_rate_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Completion Rate 24H"}},"type":"object","required":["stats","pending_by_priority","pending_by_reason","recent_completed","completion_rate_24h"],"title":"ReviewDashboardResponse","description":"Composite dashboard for the review queue page."},"ReviewStatsResponse":{"properties":{"pending":{"type":"integer","title":"Pending"},"completed":{"type":"integer","title":"Completed"},"rejected":{"type":"integer","title":"Rejected"},"avg_review_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Review Minutes"}},"type":"object","required":["pending","completed","rejected","avg_review_minutes"],"title":"ReviewStatsResponse"},"ReviewItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","enum":["pending","in_progress","completed","rejected"],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the review item was created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string","enum":["approve","reject","correct","approved","rejected","corrected"]},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."}}},"paths":{"/v1/{workspace_id}/review-queue/dashboard":{"get":{"tags":["Review Queue"],"summary":"Review queue dashboard composite","description":"Aggregated view for the review queue page: stats, priority breakdown, recent completions.","operationId":"review_dashboard_v1__workspace_id__review_queue_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewDashboardResponse"}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}]}}}}
```

## Review queue trends over time

> Daily buckets: queue depth, completion rate, avg review time.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/trends":{"get":{"tags":["Review Queue"],"summary":"Review queue trends over time","description":"Daily buckets: queue depth, completion rate, avg review time.","operationId":"review_trends_v1__workspace_id__review_queue_trends_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Review Trends V1  Workspace Id  Review Queue Trends Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Per-reviewer performance stats

> Items reviewed, avg time, approval/reject/correct ratio per reviewer.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/performance":{"get":{"tags":["Review Queue"],"summary":"Per-reviewer performance stats","description":"Items reviewed, avg time, approval/reject/correct ratio per reviewer.","operationId":"reviewer_performance_v1__workspace_id__review_queue_performance_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reviewer Performance V1  Workspace Id  Review Queue Performance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Review history / audit trail

> Returns completed review items for auditing. Filter by action, reviewer, and date range.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"PaginatedResponse_ReviewItemResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewItemResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ReviewItemResponse]"},"ReviewItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","enum":["pending","in_progress","completed","rejected"],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the review item was created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string","enum":["approve","reject","correct","approved","rejected","corrected"]},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/history":{"get":{"tags":["Review Queue"],"summary":"Review history / audit trail","description":"Returns completed review items for auditing. Filter by action, reviewer, and date range.","operationId":"review_history_v1__workspace_id__review_queue_history_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"reviewed_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By"}},{"name":"completed_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed After"}},{"name":"completed_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"exclusiveMinimum":0,"default":10,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Continuation Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ReviewItemResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /v1/{workspace\_id}/review-queue/my-queue

> Items assigned to current API key

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"PaginatedResponse_ReviewItemResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewItemResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[ReviewItemResponse]"},"ReviewItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","enum":["pending","in_progress","completed","rejected"],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the review item was created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string","enum":["approve","reject","correct","approved","rejected","corrected"]},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/my-queue":{"get":{"tags":["Review Queue"],"summary":"Items assigned to current API key","operationId":"my_queue_v1__workspace_id__review_queue_my_queue_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"exclusiveMinimum":0,"default":10,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Continuation Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_ReviewItemResponse_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get review item with full context

> Returns review item with inline event data and entity state — no extra calls needed.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"ReviewItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","enum":["pending","in_progress","completed","rejected"],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the review item was created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string","enum":["approve","reject","correct","approved","rejected","corrected"]},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/{item_id}":{"get":{"tags":["Review Queue"],"summary":"Get review item with full context","description":"Returns review item with inline event data and entity state — no extra calls needed.","operationId":"get_review_item_v1__workspace_id__review_queue__item_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get correction form schema hints

> Returns expected fields for the FHIR resource type, plus current event data as defaults.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"CorrectionSchemaResponse":{"properties":{"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fields":{"additionalProperties":true,"type":"object","title":"Fields"},"current_values":{"additionalProperties":true,"type":"object","title":"Current Values"}},"type":"object","required":["fhir_resource_type","fields","current_values"],"title":"CorrectionSchemaResponse","description":"Schema hints for building a correction form."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/{item_id}/correction-schema":{"get":{"tags":["Review Queue"],"summary":"Get correction form schema hints","description":"Returns expected fields for the FHIR resource type, plus current event data as defaults.","operationId":"get_correction_schema_v1__workspace_id__review_queue__item_id__correction_schema_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionSchemaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get event diff for a corrected review item

> Shows original event data vs corrected event data side-by-side.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"ReviewDiffResponse":{"properties":{"item_id":{"type":"string","title":"Item Id"},"original_events":{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array","title":"Original Events"},"corrected_events":{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array","title":"Corrected Events"}},"type":"object","required":["item_id","original_events","corrected_events"],"title":"ReviewDiffResponse","description":"Original vs corrected event data for a completed correction."},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/{item_id}/diff":{"get":{"tags":["Review Queue"],"summary":"Get event diff for a corrected review item","description":"Shows original event data vs corrected event data side-by-side.","operationId":"get_review_diff_v1__workspace_id__review_queue__item_id__diff_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewDiffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Approve review item

> Marks the review item approved and lets SDP projections rebuild entity state.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"ApproveRequest":{"properties":{"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ApproveRequest","description":"Approve events — promotes confidence to 0.95."},"ReviewItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","enum":["pending","in_progress","completed","rejected"],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the review item was created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string","enum":["approve","reject","correct","approved","rejected","corrected"]},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/{item_id}/approve":{"post":{"tags":["Review Queue"],"summary":"Approve review item","description":"Marks the review item approved and lets SDP projections rebuild entity state.","operationId":"approve_review_item_v1__workspace_id__review_queue__item_id__approve_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Reject review item

> Marks the review item rejected and lets SDP projections rebuild entity state.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"RejectRequest":{"properties":{"reason":{"type":"string","maxLength":2000,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"RejectRequest","description":"Reject events — demotes confidence to 0.0."},"ReviewItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","enum":["pending","in_progress","completed","rejected"],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the review item was created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string","enum":["approve","reject","correct","approved","rejected","corrected"]},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/{item_id}/reject":{"post":{"tags":["Review Queue"],"summary":"Reject review item","description":"Marks the review item rejected and lets SDP projections rebuild entity state.","operationId":"reject_review_item_v1__workspace_id__review_queue__item_id__reject_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Submit corrected data

> Creates a corrected event and lets SDP projections rebuild entity state.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"CorrectRequest":{"properties":{"corrected_data":{"additionalProperties":true,"type":"object","title":"Corrected Data"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["corrected_data"],"title":"CorrectRequest","description":"Submit corrected data — creates new event at confidence 1.0."},"ReviewItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"session_id":{"type":"string","title":"Session Id"},"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Event Ids"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"priority":{"type":"integer","title":"Priority"},"reason":{"type":"string","title":"Reason"},"judge_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judge Analysis"},"status":{"type":"string","enum":["pending","in_progress","completed","rejected"],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the review item was created"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_action":{"anyOf":[{"type":"string","enum":["approve","reject","correct","approved","rejected","corrected"]},{"type":"null"}],"title":"Completed Action"},"events":{"anyOf":[{"items":{"$ref":"#/components/schemas/EventSummary"},"type":"array"},{"type":"null"}],"title":"Events"},"entity":{"anyOf":[{"$ref":"#/components/schemas/EntitySummary"},{"type":"null"}]}},"type":"object","required":["id","workspace_id","session_id","event_ids","entity_id","entity_type","priority","reason","judge_analysis","status","assigned_to","completed_at","completed_action"],"title":"ReviewItemResponse"},"EventSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"fhir_resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Type"},"fhir_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fhir Resource Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","enum":["pending","raw","uncertain","verified","approved","human_approved","auto_approved","rejected","corrected","flagged"],"title":"Review Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the event was created"}},"type":"object","required":["id","event_type","fhir_resource_type","fhir_resource_id","data","confidence","review_status"],"title":"EventSummary","description":"Inline event data for review context — avoids extra API calls."},"EntitySummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State"}},"type":"object","required":["id","entity_type","display_name","state"],"title":"EntitySummary","description":"Inline entity state for review context."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/{item_id}/correct":{"post":{"tags":["Review Queue"],"summary":"Submit corrected data","description":"Creates a corrected event and lets SDP projections rebuild entity state.","operationId":"correct_review_item_v1__workspace_id__review_queue__item_id__correct_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Claim a review item

> Assigns the review item to the current API key, preventing concurrent reviews.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"ClaimResponse":{"properties":{"id":{"type":"string","title":"Id"},"assigned_to":{"type":"string","title":"Assigned To"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","assigned_to","status"],"title":"ClaimResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/{item_id}/claim":{"post":{"tags":["Review Queue"],"summary":"Claim a review item","description":"Assigns the review item to the current API key, preventing concurrent reviews.","operationId":"claim_review_item_v1__workspace_id__review_queue__item_id__claim_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Release a claimed review item

> Clears assignment — only the current claimant can unclaim.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"ClaimResponse":{"properties":{"id":{"type":"string","title":"Id"},"assigned_to":{"type":"string","title":"Assigned To"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","assigned_to","status"],"title":"ClaimResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/{item_id}/unclaim":{"post":{"tags":["Review Queue"],"summary":"Release a claimed review item","description":"Clears assignment — only the current claimant can unclaim.","operationId":"unclaim_review_item_v1__workspace_id__review_queue__item_id__unclaim_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Batch approve review items

> Approves multiple items in one call. Each item is processed independently.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"BatchApproveRequest":{"properties":{"item_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Item Ids"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["item_ids"],"title":"BatchApproveRequest","description":"Batch approve multiple review items."},"BatchActionResponse":{"properties":{"succeeded":{"items":{"type":"string"},"type":"array","title":"Succeeded"},"failed":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Failed"}},"type":"object","required":["succeeded","failed"],"title":"BatchActionResponse","description":"Result of a batch operation."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/batch-approve":{"post":{"tags":["Review Queue"],"summary":"Batch approve review items","description":"Approves multiple items in one call. Each item is processed independently.","operationId":"batch_approve_v1__workspace_id__review_queue_batch_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchApproveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}]}}}}
```

## Batch reject review items

> Rejects multiple items in one call. Each item is processed independently.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"BatchRejectRequest":{"properties":{"item_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Item Ids"},"reason":{"type":"string","maxLength":2000,"minLength":1,"title":"Reason"}},"type":"object","required":["item_ids","reason"],"title":"BatchRejectRequest","description":"Batch reject multiple review items."},"BatchActionResponse":{"properties":{"succeeded":{"items":{"type":"string"},"type":"array","title":"Succeeded"},"failed":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Failed"}},"type":"object","required":["succeeded","failed"],"title":"BatchActionResponse","description":"Result of a batch operation."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/review-queue/batch-reject":{"post":{"tags":["Review Queue"],"summary":"Batch reject review items","description":"Rejects multiple items in one call. Each item is processed independently.","operationId":"batch_reject_v1__workspace_id__review_queue_batch_reject_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRejectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amigo.ai/api-reference/readme/platform/review-queue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
