ai

POST /v1/ai/proposals/{proposalId}/decision

Approve or reject one proposal.

所有 ai 端点

身份验证

请将 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

请求正文

名称类型必填内容简介
decisionstring<approve, reject>
reasonstring

响应

名称类型必填内容简介
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
actionstring
conversation_idUuidThe 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_titlestring
target_labelstring
rationalestringWhy, citing the measurement. This is what a person reads before approving.
stateAgentProposalState
modeAgentProposalModeHow 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…
reversibilitystring<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_meansstring
outcomestring
proposed_bystring
created_atstring
decided_atobject
applied_atobject
revertedboolean

此端点可能返回的错误

401 · 404 · 422 · 429