身份验证
请将 API 密钥作为 bearer 令牌发送。此端点在规范中未指明具体的权限,因此请为您的密钥赋予所需的最小权限,并通过检查响应来确认,而不是盲目假设。
此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。
免费试用
将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。
curl -X POST https://api.zinndigital.com/v1/ai/proposals/{proposalId}/decision \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "decision": <string<approve, reject>> }'已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点
详细信息
Approving APPLIES the action, **under the approver's own permissions**. The caller must hold the permission the action itself requires, in the proposal's own organization — so approving can never reach further than the approver could reach by hand. A caller without it gets a `404`, never a `403`: answering "forbidden" would confirm the proposal exists. ⛔ Not idempotent and not retryable. A second approval of an already-decided proposal is a `422`, which is the correct answer — a retry that applied the change twice would be a second cache purge or a second policy write nobody asked for.
参数
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
proposalId (path) | Uuid | 是 | — |
请求正文
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
decision | string<approve, reject> | 是 | — |
reason | string | 否 | — |
响应
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
id | Uuid | 是 | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
action | string | 是 | — |
conversation_id | Uuid | 否 | The AI conversation this came out of, or `null` for one raised by a scheduled review. ⭐ Lets a chat surface show its own suggestions without a second endpoint, and lets `/ai` sa… |
action_title | string | 是 | — |
target_label | string | 否 | — |
rationale | string | 否 | Why, citing the measurement. This is what a person reads before approving. |
state | AgentProposalState | 是 | — |
mode | AgentProposalMode | 是 | How an approved proposal executes — decided by the authority ladder at the moment of approval, never frozen when the proposal was written. `attended` is a person clicking; `cana… |
reversibility | string<automatic, self_healing, manual> | 否 | Whether this change can be put back, carried on the proposal itself so a client rendering an undo control does not have to join this list against the capability catalogue — a se… |
approval_means | string | 否 | — |
outcome | string | 否 | — |
proposed_by | string | 否 | — |
created_at | string | 是 | — |
decided_at | object | 否 | — |
applied_at | object | 否 | — |
reverted | boolean | 否 | — |
此端点可能返回的错误
401 · 404 · 422 · 429