Send a visitor message
curl --request POST \
--url https://runtime.webless.ai/eve/v1/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Hello"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: 'Hello'})
};
fetch('https://runtime.webless.ai/eve/v1/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://runtime.webless.ai/eve/v1/session"
payload = { "message": "Hello" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"sessionId": "wrun_01EXAMPLE",
"status": "accepted"
}Agent Runtime API
Send a message
Start or continue a session with a visitor message. Use the access token from bootstrap in the Authorization header. Include indexId on the query string.
POST
/
eve
/
v1
/
session
Send a visitor message
curl --request POST \
--url https://runtime.webless.ai/eve/v1/session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "Hello"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: 'Hello'})
};
fetch('https://runtime.webless.ai/eve/v1/session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://runtime.webless.ai/eve/v1/session"
payload = { "message": "Hello" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"sessionId": "wrun_01EXAMPLE",
"status": "accepted"
}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.Authorizations
accessToken from POST /webless/v1/bootstrap. Get it on the Bootstrap docs page (Send in the playground) or use POST Send a message for the full flow.
Query Parameters
Your Webless index ID
Body
application/json
Visitor message. Hello is enough to see a reply.
Example:
"Hello"
Was this page helpful?