ai

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

Approve or reject one proposal.

Dukkan ai wuraren ƙarshe

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

SunaNau'iAna buƙataAbin da yake
proposalId (path)UuidEh

Jikin buƙata

SunaNau'iAna buƙataAbin da yake
decisionstring<approve, reject>Eh
reasonstringA'a

Martani

SunaNau'iAna buƙataAbin da yake
idUuidEhUUIDv7 identifier — sortable by creation time (docs/02 §8).
actionstringEh
conversation_idUuidA'aThe 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_titlestringEh
target_labelstringA'a
rationalestringA'aWhy, citing the measurement. This is what a person reads before approving.
stateAgentProposalStateEh
modeAgentProposalModeEhHow 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>A'aWhether 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_meansstringA'a
outcomestringA'a
proposed_bystringA'a
created_atstringEh
decided_atobjectA'a
applied_atobjectA'a
revertedbooleanA'a

Kuskuren da wannan matsaya za ta iya maido wa

401 · 404 · 422 · 429