curl --request POST \
--url https://guidinghand.ai/v1/sessions/{session_id}/expire \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/sessions/{session_id}/expire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/sessions/{session_id}/expire"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"object": "session",
"session_id": "K7QM-24XP",
"code": "K7QM-24XP",
"agent_id": "<string>",
"invite_url": "https://guidinghand.ai/acme/billing/K7QM-24XP",
"status": "waiting",
"device": {
"os": "mac",
"name": "<string>",
"width": 123,
"height": 123,
"app_version": "<string>"
},
"metadata": {
"customer_id": "cus_42"
},
"created_at": "2023-11-07T05:31:56Z",
"paired_at": "2023-11-07T05:31:56Z",
"last_active_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"task_count": 123,
"latest_task_id": "<string>"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer"
}
}Expire a session
Ends the session now instead of after 72 hours without use: its code, invite link and session token stop working, a running task stops and its computer is disconnected. Tasks and recordings are kept (delete the session to remove them). Expiring an expired session does nothing. Recorded in the audit log.
curl --request POST \
--url https://guidinghand.ai/v1/sessions/{session_id}/expire \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/sessions/{session_id}/expire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/sessions/{session_id}/expire"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"object": "session",
"session_id": "K7QM-24XP",
"code": "K7QM-24XP",
"agent_id": "<string>",
"invite_url": "https://guidinghand.ai/acme/billing/K7QM-24XP",
"status": "waiting",
"device": {
"os": "mac",
"name": "<string>",
"width": 123,
"height": 123,
"app_version": "<string>"
},
"metadata": {
"customer_id": "cus_42"
},
"created_at": "2023-11-07T05:31:56Z",
"paired_at": "2023-11-07T05:31:56Z",
"last_active_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"task_count": 123,
"latest_task_id": "<string>"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer"
}
}Authorizations
An org API key (gh_live_…) from Settings → API keys in the console.
Path Parameters
The session’s code, e.g. K7QM-24XP.
Response
The session, as it is now
"K7QM-24XP"
"K7QM-24XP"
"https://guidinghand.ai/acme/billing/K7QM-24XP"
waiting: no computer has used the code yet. connected: its computer is online now. disconnected: its computer went offline, or the team disconnected it. expired: unused for 72 hours, or expired by the team; the code and token no longer work.
waiting, connected, disconnected, expired Show child attributes
Show child attributes
Your own ids and labels (e.g. a ticket or customer id), returned as given.
Show child attributes
Show child attributes
{ "customer_id": "cus_42" }
When the code expires if it stays unused (null while connected), or when it was expired.