ai
POST /v1/ai/proposals/{proposalId}/decision
Approve or reject one proposal.
Tabbatar da Asali
Aiko da maɓallin API a matsayin bearer token. Wannan ma'anar ba ta bayyana takamaiman izini ba a cikin ƙayyadaddun bayanai, don haka ba wa maɓallin ku mafi ƙarancin abin da yake buƙata kuma ku bincika amsar maimakon yin zato.
Wannan wurin ƙarewa ba ya buƙatar ID na ƙungiya. Maɓallin ku ya riga ya gano ƙungiyar da yake ciki, kuma an iyakance amsa a kanta.
Gwada
May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.
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>> }'An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API
Bayani
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.
Sigogi
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
proposalId (path) | Uuid | Eh | — |
Jikin buƙata
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
decision | string<approve, reject> | Eh | — |
reason | string | A'a | — |
Martani
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
id | Uuid | Eh | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
action | string | Eh | — |
conversation_id | Uuid | A'a | 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 | Eh | — |
target_label | string | A'a | — |
rationale | string | A'a | Why, citing the measurement. This is what a person reads before approving. |
state | AgentProposalState | Eh | — |
mode | AgentProposalMode | Eh | 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> | A'a | 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 | A'a | — |
outcome | string | A'a | — |
proposed_by | string | A'a | — |
created_at | string | Eh | — |
decided_at | object | A'a | — |
applied_at | object | A'a | — |
reverted | boolean | A'a | — |
Kuskuren da wannan matsaya za ta iya maido wa
401 · 404 · 422 · 429