Sessions
Get a session
Returns pinned configuration versions, transcript, evidence, and a presigned download URL for the recording when available.
GET
https://dash.trainertwin.com/api/v1
/
sessions
/
{sessionId}
Get a session
curl --request GET \
--url https://dash.trainertwin.com/api/v1/sessions/{sessionId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.trainertwin.com/api/v1/sessions/{sessionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dash.trainertwin.com/api/v1/sessions/{sessionId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"session": {
"id": "session_123",
"personaSlug": "<string>",
"personaVersion": 123,
"agentSlug": "react-mock-interview",
"agentVersion": 123,
"domainSlug": "<string>",
"domainVersion": 123,
"status": "assigned",
"startedAt": "2023-11-07T05:31:56Z",
"userId": "user_123",
"mode": "chat",
"contextName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"transcript": {},
"evidence": {},
"audioUrl": "<string>"
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}⌘I
Get a session
curl --request GET \
--url https://dash.trainertwin.com/api/v1/sessions/{sessionId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://dash.trainertwin.com/api/v1/sessions/{sessionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dash.trainertwin.com/api/v1/sessions/{sessionId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"session": {
"id": "session_123",
"personaSlug": "<string>",
"personaVersion": 123,
"agentSlug": "react-mock-interview",
"agentVersion": 123,
"domainSlug": "<string>",
"domainVersion": 123,
"status": "assigned",
"startedAt": "2023-11-07T05:31:56Z",
"userId": "user_123",
"mode": "chat",
"contextName": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"transcript": {},
"evidence": {},
"audioUrl": "<string>"
}
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}{
"error": "Resource not found"
}