MobiariDocs
Admin APIAssistant

Approve a proposal

POST
/assistant/proposals/{proposal_id}/approve

Applies the write the assistant proposed (with the permission the write needs, checked now), records it as an undoable action, and streams the assistant's follow-up turn. The first event after conversation is the tool_result saying whether it was applied. Proposals expire after an hour. Server-sent events as in chatWithAssistant.

Authorization

bearer_auth
AuthorizationBearer <token>

Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.

In: header

Path Parameters

proposal_id*string

Proposal id (from a proposal event)

Formatuuid

Query Parameters

confirmed?boolean

The admin ticked the confirmation of a destructive / money / external change. Without it such proposals answer 428.

Header Parameters

Idempotency-Key?string

A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.

Lengthlength <= 255

Response Body

text/event-stream

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/assistant/proposals/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve"
"string"
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}