Bootstrap visitor access
curl --request POST \
--url https://runtime.webless.ai/webless/v1/bootstrap \
--header 'Content-Type: application/json' \
--data '
{
"clientSessionId": "a1c2d3e4-1111-2222-3333-444455556666",
"indexId": "YOUR_INDEX_ID"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
clientSessionId: 'a1c2d3e4-1111-2222-3333-444455556666',
indexId: 'YOUR_INDEX_ID'
})
};
fetch('https://runtime.webless.ai/webless/v1/bootstrap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://runtime.webless.ai/webless/v1/bootstrap"
payload = {
"clientSessionId": "a1c2d3e4-1111-2222-3333-444455556666",
"indexId": "YOUR_INDEX_ID"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accessToken": "<accessToken>",
"tokenType": "Bearer",
"expiresAt": "2026-10-06T06:30:00.000Z",
"origin": "http://localhost:3000"
}{
"ok": false,
"error": "<string>",
"code": "<string>"
}Agent Runtime API
Bootstrap visitor access
Exchange your index ID and a browser session ID for a Bearer access token. The token is bound to the Origin of the page that calls this route.
POST
/
webless
/
v1
/
bootstrap
Bootstrap visitor access
curl --request POST \
--url https://runtime.webless.ai/webless/v1/bootstrap \
--header 'Content-Type: application/json' \
--data '
{
"clientSessionId": "a1c2d3e4-1111-2222-3333-444455556666",
"indexId": "YOUR_INDEX_ID"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
clientSessionId: 'a1c2d3e4-1111-2222-3333-444455556666',
indexId: 'YOUR_INDEX_ID'
})
};
fetch('https://runtime.webless.ai/webless/v1/bootstrap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://runtime.webless.ai/webless/v1/bootstrap"
payload = {
"clientSessionId": "a1c2d3e4-1111-2222-3333-444455556666",
"indexId": "YOUR_INDEX_ID"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accessToken": "<accessToken>",
"tokenType": "Bearer",
"expiresAt": "2026-10-06T06:30:00.000Z",
"origin": "http://localhost:3000"
}{
"ok": false,
"error": "<string>",
"code": "<string>"
}Try it in this order
1
1. Bootstrap
Open Bootstrap. Enter your index
ID, click Try it, then Send. The playground saves your
accessToken for the next two pages. You can only use it on this site, and
it expires in about 15 minutes.2
2. Send a message
Open Send a message. This page
fills in your token and index ID. Send
Hello. The playground saves your
sessionId (wrun_…).3
3. Stream the reply
Open Stream events. This page
fills in your token and that
sessionId. Click Send to read the reply.https://runtime.webless.ai. Use an index
that is published in Agentic mode on production.Body
application/json
Stable ID for this browser session. Generate a fresh UUID per browser; do not reuse the docs example value.
Example:
"a1c2d3e4-1111-2222-3333-444455556666"
Webless index ID from Setup.
Example:
"YOUR_INDEX_ID"
Available options:
published, unpublished Example:
"published"
Was this page helpful?