POST /api/sites/:slug/actions/:state/:action
Navigates to the page state and executes the action’s interaction code on the live page. Use this to click buttons, fill forms, submit data, and trigger any interaction the AI discovered.
When you call this endpoint, the execution server:
- Looks up the manifest for the site
- Finds the target state and action
- Opens a new browser page
- Navigates to the state’s URL (expanding template variables from inputs)
- Waits for the DOM to settle
- Runs the action’s code with the provided inputs
- Returns the result
Path parameters
The site identifier (e.g.,
example-com).The state name from the manifest (e.g.,
LoginPage, CheckoutPage).The action name within the state (e.g.,
submit_login, add_to_cart).Request body
Action inputs are supplied as a flat JSON object. The available inputs are defined in the manifest under the action’sinputs array.
{}.
Example
Response fields
| Field | Type | Description |
|---|---|---|
ok | boolean | true on success |
state | string | The state name where the action was executed |
steps | array | Ordered list of steps the executor performed |
Error responses
| Status | Body |
|---|---|
404 | { "error": "Manifest not found" } |
404 | { "error": "State 'BadState' not found" } |
404 | { "error": "Route 'bad_action' not found" } |
429 | { "error": "Max concurrent executions (3) reached. Try again later." } |
500 | { "error": "Action 'submit_login' failed: <message>" } |