curl -X POST "https://api.smooth.sh/api/v1/task/YOUR_TASK_ID/event" \
-H "Content-Type: application/json" \
-H "apikey: YOUR_API_KEY" \
-d '{
"name": "session_action",
"payload": {
"name": "run_task",
"input": {
"task": "Search for flights from NYC to LA",
"max_steps": 32
}
},
"id": "evt_abc123"
}'{
"r": {
"id": "<string>"
}
}Event
Send Event
Send an event to a running task. This is used for:
- Session actions:
run_task,goto,extract,evaluate_js,close - Custom tool responses: Responding to tool calls from the agent
The SDK handles this automatically when using session.run_task(), session.goto(), etc.
POST
/
task
/
{task_id}
/
event
curl -X POST "https://api.smooth.sh/api/v1/task/YOUR_TASK_ID/event" \
-H "Content-Type: application/json" \
-H "apikey: YOUR_API_KEY" \
-d '{
"name": "session_action",
"payload": {
"name": "run_task",
"input": {
"task": "Search for flights from NYC to LA",
"max_steps": 32
}
},
"id": "evt_abc123"
}'{
"r": {
"id": "<string>"
}
}Authorizations
Path Parameters
Body
application/json
Event model for sending actions to running tasks.
Event type: browser_action, session_action, or tool_call.
Event payload. For actions: {name, input}. For tool responses: {code, output}.
Unique event ID. Used to match responses to requests.
Unix timestamp of the event.
Response
Event successfully sent.
Response model for send event operation.
Show child attributes
Show child attributes