Assistant

Act on an assistant action

Acts on an actionable widget the assistant offered on a prior turn. Reference the action by its actionId from a prior assistant message. APPROVE (the default) completes the action; REJECT records the rejection. Two kinds are actionable via the API: accepting a workflow suggestion (APPROVE applies the suggested workflow and immediately starts generating; the returned assistant message carries the workflow run in generation), and applying an assistant edit (an APPLY_EDIT action with requiresApp false, which applies the edit to the project). Actions with requiresApp set to true (plans, tools, and other app-only widgets) can only be completed in the web app: open the assistant's projectUrl instead. Asynchronous: the response contains the messageId of the resulting assistant message. Poll GET /v1/assistant-messages/{messageId} for its terminal state.

post/v1/assistants/{assistantId}/actions/{actionId}

Path parameters

assistantIdstring required

The assistant chat id (e.g. vg_asst_...). Every API project has one assistant chat; find it on ProjectResponse.assistantId.

actionIdstring required

The actionId of the action to act on, from a prior assistant message.

Request body

decision'APPROVE' | 'REJECT'

Whether to approve (apply) or reject the action. Defaults to APPROVE.

Response

Assistant action accepted.

messageIdstring required

Opaque assistant message id for the assistant reply produced by acting on the action (e.g. vg_mesg_...). Poll GET /v1/assistant-messages/{messageId}.

Changes

No recorded changes to this endpoint across all 1 revision of this API.