Create a shared history snapshot
curl --request POST \
--url https://api.webless.ai/api/v1/shares \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "a1c2d3e4-1111-2222-3333-444455556666",
"template_id": "mr"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({session_id: 'a1c2d3e4-1111-2222-3333-444455556666', template_id: 'mr'})
};
fetch('https://api.webless.ai/api/v1/shares', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webless.ai/api/v1/shares"
payload = {
"session_id": "a1c2d3e4-1111-2222-3333-444455556666",
"template_id": "mr"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"conversation_history_id": "<string>",
"template_id": "mr",
"session_id": "<string>",
"history": [
{
"timestamp": 123,
"query": "<string>",
"summary": "<string>",
"metadata": {},
"responses": [
"<unknown>"
],
"user_id": "<string>"
}
],
"conversation_history": [
"<unknown>"
]
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}Session API
Create share
Creates a shareable conversation history snapshot for a session.
POST
/
api
/
v1
/
shares
Create a shared history snapshot
curl --request POST \
--url https://api.webless.ai/api/v1/shares \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "a1c2d3e4-1111-2222-3333-444455556666",
"template_id": "mr"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({session_id: 'a1c2d3e4-1111-2222-3333-444455556666', template_id: 'mr'})
};
fetch('https://api.webless.ai/api/v1/shares', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webless.ai/api/v1/shares"
payload = {
"session_id": "a1c2d3e4-1111-2222-3333-444455556666",
"template_id": "mr"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"conversation_history_id": "<string>",
"template_id": "mr",
"session_id": "<string>",
"history": [
{
"timestamp": 123,
"query": "<string>",
"summary": "<string>",
"metadata": {},
"responses": [
"<unknown>"
],
"user_id": "<string>"
}
],
"conversation_history": [
"<unknown>"
]
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}Private sessions cannot be shared. Requests with
is_private_session: true
return 403.Body
application/json
Session ID to share.
mr shares the full multi-request history. sr shares only the latest request.
Available options:
mr, sr When true, include query history and persist a reloadable snapshot.
Was this page helpful?