Pagpapatotoo
Magpadala ng API key bilang bearer token. Ang endpoint na ito ay hindi naglatag ng tiyak na pahintulot sa pagtutukoy, kaya ibigay sa iyong key ang pinakamababang kailangan nito at suriin ang tugon sa halip na umasa.
Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
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>> }'Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
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.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
proposalId (path) | Uuid | Oo | — |
Katawan ng kahilingan
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
decision | string<approve, reject> | Oo | — |
reason | string | Hindi | — |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
action | string | Oo | — |
conversation_id | Uuid | Hindi | 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 | Oo | — |
target_label | string | Hindi | — |
rationale | string | Hindi | Why, citing the measurement. This is what a person reads before approving. |
state | AgentProposalState | Oo | — |
mode | AgentProposalMode | Oo | 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> | Hindi | 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 | Hindi | — |
outcome | string | Hindi | — |
proposed_by | string | Hindi | — |
created_at | string | Oo | — |
decided_at | object | Hindi | — |
applied_at | object | Hindi | — |
reverted | boolean | Hindi | — |
Mga error na maibabalik ng endpoint na ito
401 · 404 · 422 · 429