> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.videogen.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.videogen.io/_mcp/server.

# Act on an assistant action

POST https://api.videogen.io/v1/assistants/{assistantId}/actions/{actionId}
Content-Type: application/json

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.

Reference: https://docs.videogen.io/rest-api-reference/assistant/act-on-assistant-action

## Authentication

- `Authorization` header (bearer token, required) — API key from [app.videogen.io/api](https://app.videogen.io/api). The full key is only shown once when you create it.

## Request

### Path parameters

- `assistantId` (string, required) — The assistant chat id (e.g. `vg_asst_...`). Every API project has one assistant chat; find it on `ProjectResponse.assistantId`.
- `actionId` (string, required) — The `actionId` of the action to act on, from a prior assistant message.

### Body (application/json)

This endpoint expects an ActOnAssistantActionRequest.

- `decision` (enum, optional, default: APPROVE) — Whether to approve (apply) or reject the action. Defaults to `APPROVE`.
  - Allowed values: `APPROVE`, `REJECT`

## Response

### 202

Assistant action accepted.

- `messageId` (string, 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}`.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "messageId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.videogen.io/v1/assistants/assistantId/actions/actionId"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```