Execute browser action
Executes a browser action on the session. Returns 200 if completed within wait_seconds, 202 if still in-flight.
Action types: navigate, observe, click, fill, select, press, scroll, wait_for, screenshot, batch.
curl --request POST \
--url https://api.telnyx.com/v2/browser_sessions/{id}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "navigate",
"url": "https://example.com/"
}
'{
"data": {
"id": "bact_075cfdc9-...",
"session_id": "<string>",
"seq": 123,
"type": "<string>",
"status": "queued",
"result": {
"url": "<string>",
"title": "<string>",
"observation": {
"observation_id": "<string>",
"url": "<string>",
"title": "<string>",
"refs": {},
"tree": "<string>",
"truncated": true,
"ref_count": 123
},
"artifact": {
"artifact_id": "<string>",
"content_type": "<string>",
"size_bytes": 123
},
"results": [
{}
]
},
"request": {},
"error": {
"code": "<string>",
"retryable": true
},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "bact_075cfdc9-...",
"session_id": "<string>",
"seq": 123,
"type": "<string>",
"status": "queued",
"result": {
"url": "<string>",
"title": "<string>",
"observation": {
"observation_id": "<string>",
"url": "<string>",
"title": "<string>",
"refs": {},
"tree": "<string>",
"truncated": true,
"ref_count": 123
},
"artifact": {
"artifact_id": "<string>",
"content_type": "<string>",
"size_bytes": 123
},
"results": [
{}
]
},
"request": {},
"error": {
"code": "<string>",
"retryable": true
},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "validation_error",
"message": "invalid request: policy.allowed_domains must have at least 1 item(s)",
"retryable": false
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not find any usable credentials in the request.",
"source": {
"pointer": "/"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"error": {
"code": "not_found",
"message": "session not found",
"retryable": false
}
}{
"error": {
"code": "session_not_ready",
"message": "session is provisioning",
"retryable": true
}
}{
"error": {
"code": "execution_lost",
"message": "Request could not be completed reliably",
"retryable": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Maximum seconds the submission request waits for completion, not an execution timeout. If still queued or running, returns 202 without cancelling execution; poll the returned action ID.
0 <= x <= 25Body
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
Discriminated union on type. Variants are strict: unknown fields are rejected with 400. Reusing an idempotency_key with an identical request replays the original resource; with a different request it returns 409 idempotency_conflict.
Response
Terminal action: succeeded, failed, or unknown. Inspect data.status and data.error; HTTP 200 does not imply successful execution.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://api.telnyx.com/v2/browser_sessions/{id}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "navigate",
"url": "https://example.com/"
}
'{
"data": {
"id": "bact_075cfdc9-...",
"session_id": "<string>",
"seq": 123,
"type": "<string>",
"status": "queued",
"result": {
"url": "<string>",
"title": "<string>",
"observation": {
"observation_id": "<string>",
"url": "<string>",
"title": "<string>",
"refs": {},
"tree": "<string>",
"truncated": true,
"ref_count": 123
},
"artifact": {
"artifact_id": "<string>",
"content_type": "<string>",
"size_bytes": 123
},
"results": [
{}
]
},
"request": {},
"error": {
"code": "<string>",
"retryable": true
},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": "bact_075cfdc9-...",
"session_id": "<string>",
"seq": 123,
"type": "<string>",
"status": "queued",
"result": {
"url": "<string>",
"title": "<string>",
"observation": {
"observation_id": "<string>",
"url": "<string>",
"title": "<string>",
"refs": {},
"tree": "<string>",
"truncated": true,
"ref_count": 123
},
"artifact": {
"artifact_id": "<string>",
"content_type": "<string>",
"size_bytes": 123
},
"results": [
{}
]
},
"request": {},
"error": {
"code": "<string>",
"retryable": true
},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "validation_error",
"message": "invalid request: policy.allowed_domains must have at least 1 item(s)",
"retryable": false
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not find any usable credentials in the request.",
"source": {
"pointer": "/"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"error": {
"code": "not_found",
"message": "session not found",
"retryable": false
}
}{
"error": {
"code": "session_not_ready",
"message": "session is provisioning",
"retryable": true
}
}{
"error": {
"code": "execution_lost",
"message": "Request could not be completed reliably",
"retryable": true
}
}