curl --request POST \
--url https://api.anchorbrowser.io/v1/task/run \
--header 'Content-Type: application/json' \
--header 'anchor-api-key: <api-key>' \
--data '
{
"taskId": "550e8400-e29b-41d4-a716-446655440000"
}
'{
"data": {
"success": true,
"async": true,
"message": "<string>",
"taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"executionTime": 123,
"output": "<string>",
"error": "<string>",
"executionResultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": 123,
"message": "<string>"
}
}{
"error": {
"code": 123,
"message": "<string>"
}
}Run Task (Legacy)
Executes a task in a browser session. The task can be run with a specific version or the latest version. Optionally, you can provide an existing session ID or let the system create a new one.
If you are using the new Task Builder, see the non-deprecated Tasks endpoints in this API reference.
curl --request POST \
--url https://api.anchorbrowser.io/v1/task/run \
--header 'Content-Type: application/json' \
--header 'anchor-api-key: <api-key>' \
--data '
{
"taskId": "550e8400-e29b-41d4-a716-446655440000"
}
'{
"data": {
"success": true,
"async": true,
"message": "<string>",
"taskId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"executionTime": 123,
"output": "<string>",
"error": "<string>",
"executionResultId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": 123,
"message": "<string>"
}
}{
"error": {
"code": 123,
"message": "<string>"
}
}Authorizations
API key for your Anchor Browser account, sent as the anchor-api-key header on every
request. Create one at app.anchorbrowser.io (API Access),
or obtain one programmatically via the unauthenticated agent-access flow
(POST /v1/agent-access).
Body
Task identifier
Version to run (draft, latest, or version number)
^(draft|latest|\d+)$Optional existing browser session ID to use for task execution
Whether to run the task asynchronously.
Override browser configuration for this execution
Show child attributes
Show child attributes
Environment variables for task execution (keys must start with ANCHOR_)
Show child attributes
Show child attributes
Whether to cleanup browser sessions after task execution. Defaults to true.
Response
Task executed successfully
Show child attributes
Show child attributes
Was this page helpful?

