> For the complete documentation index, see [llms.txt](https://docs.amigo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amigo.ai/developer-guide/platform-api/integrations/review-queue.md).

# Review Queue

{% hint style="warning" %}
External write proposal review is in private preview and is available only in enabled workspaces and environments.
{% endhint %}

The review queue API lets authorized reviewers manage external write proposals - staged write-backs to external clinical systems that require human approval before delivery.

{% hint style="info" %}
**Separate approval workflow.** External write proposals are created by review-enabled connector sinks. Configuring a Platform Integration's `approval_policy` does not populate this queue; conversation-scoped integration calls use the endpoints documented in [Approval-Gated Integration Writes](/developer-guide/platform-api/integrations/approval-gated-integration-writes.md). In the current Console, this private-preview connector surface is labeled **Outbound Write Approvals**; the operator-shell **Review Queue** is a separate patient-facing Surface approval queue.
{% endhint %}

All endpoints are workspace-scoped and require authentication with an API key or session token that carries the appropriate ReviewQueue permissions.

## Endpoints

### List external write proposals

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/external-write-proposals" method="get" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

Returns a paginated list of external write proposals, newest first.

**Permissions:** Requires `ReviewQueue:View`.

***

### Get external write proposal

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/external-write-proposals/{proposal\_id}" method="get" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

Returns a single external write proposal by ID.

**Permissions:** Requires `ReviewQueue:View`.

***

### Approve external write proposal

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/external-write-proposals/{proposal\_id}/approve" method="post" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

Approves a proposal that is currently in `proposed` status. The reviewer identity is derived from the authenticated session.

**Error responses:**

| Status | Condition                                                                                       |
| ------ | ----------------------------------------------------------------------------------------------- |
| `403`  | Caller has no authenticated user identity (e.g., an API key without a bound person identity).   |
| `404`  | Proposal not found in this workspace.                                                           |
| `409`  | Proposal is no longer in `proposed` status (already decided or claimed by the delivery engine). |

**Permissions:** Requires `ReviewQueue:Review`.

***

### Reject external write proposal

{% openapi src="<https://api.platform.amigo.ai/v1/openapi.json>" path="/v1/{workspace\_id}/external-write-proposals/{proposal\_id}/reject" method="post" %}
<https://api.platform.amigo.ai/v1/openapi.json>
{% endopenapi %}

Rejects a proposal that is currently in `proposed` status. The reviewer identity is derived from the authenticated session.

**Error responses:**

| Status | Condition                                   |
| ------ | ------------------------------------------- |
| `403`  | Caller has no authenticated user identity.  |
| `404`  | Proposal not found in this workspace.       |
| `409`  | Proposal is no longer in `proposed` status. |

**Permissions:** Requires `ReviewQueue:Review`.

***

## Proposal lifecycle

Proposals move through the following states:

1. **`proposed`** - Staged by the connector system, awaiting human review.
2. **`approved`** - A reviewer approved the proposal. Awaiting delivery.
3. **`rejected`** - A reviewer rejected the proposal. Will not be delivered.
4. **`pushing`** - The delivery engine is actively sending the write to the external system.
5. **`pushed`** - Successfully delivered to the external system.
6. **`failed`** - Delivery reached a permanent failure, exhausted its retry attempts, or was blocked because retrying could create an unsafe duplicate write.
7. **`superseded`** - Reserved by the response schema. The current public routes do not transition proposals into this state.

Only proposals in `proposed` status can be approved or rejected. Attempting to decide a proposal in any other status returns a `409 Conflict` response.

## Concurrency safety

The approve and reject endpoints use guarded state transitions. If two reviewers attempt to decide the same proposal simultaneously, only one succeeds. The other receives a `409 Conflict` response and should reload the queue to see the current state.

## Audit logging

Every approval or rejection is audit-logged with the connector type, resource type, and reviewer identity. The proposed payload is never included in audit log entries.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.amigo.ai/developer-guide/platform-api/integrations/review-queue.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
