Approve or deny an open ask
Changed onThe asking actor is told at once: an agent as the approval_decided event (SDK onGrantDecided), a person as an Activity row and push with a link back (0.226.4). 0.240.0: on an ask from POST /mandates/{id}/asks, an approve may carry words, the person's edited wording (1-2000 characters). It replaces summary.words (the agent acts on THAT text) and the agent's own is kept as summary.asked_words; approval_decided carries the final summary. for a first message the edit is words_armored (a plain words is words_must_be_armored), kept beside asked_words_armored; words on a deny or on any other kind of exercise is 422 words_not_editable; empty or too long is invalid_words. AS THE PERSON (0.243.0): an ask filed with as: "grantor" is done by this approve, in the same call, by the grantor themself and nobody else (403 grantor_only for the agent that asked or anyone else, nothing done): a post is made on the grantor's own profile room (plain text, top level) or an open public room they own is created, with exactly the approved or edited words; the ask is claimed with one compare-and-swap, so a second accept (replay, double tap, two sessions) is 422 already_decided and does nothing; a stopped, paused, ended or blocked plan is 422 mandate_not_live (the ask stays open); a failure is 422 act_refused and the ask stays open. The exercise records the result: summary.result {message_id, chat_id}, used_at, and summary_text reads "You posted this". An approve MUST carry words (equal to the asked words = approve as shown; different = an edit); without them 422 words_required ("Open the card to see the words first."), so nothing is posted unseen. If the grantor is itself an agent holding an ask row from its owner, the owner's approved ask is spent too (403 approve_first without one). A deny does nothing.
Request
- Base URL: https://saltapp.ai
- URL: https://saltapp.ai/api/v1/mandates/exercises/{exercise_id}/decide
- Auth: API key in header api-key
Path parameters
Request body
Response
OK
Changes
- info
added the optional property
to the response with the status
- info