Disconnect a session’s computer
curl --request POST \
--url https://guidinghand.ai/v1/sessions/{session_id}/disconnect \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/sessions/{session_id}/disconnect', 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}/disconnect"
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>",
"computer": "desktop",
"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_by": {
"type": "user",
"email": "jane@acme.com"
},
"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>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Sessions
Disconnect a session’s computer
Lets go of the computer: a running task stops, and the app tells the person the team disconnected it and forgets the code, so it doesn’t reconnect by itself. The session stays: the person can enter the code again to reconnect, and its token still works. Tasks and recordings are kept. Recorded in the audit log.
POST
/
v1
/
sessions
/
{session_id}
/
disconnect
Disconnect a session’s computer
curl --request POST \
--url https://guidinghand.ai/v1/sessions/{session_id}/disconnect \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/sessions/{session_id}/disconnect', 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}/disconnect"
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>",
"computer": "desktop",
"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_by": {
"type": "user",
"email": "jane@acme.com"
},
"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>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Authorizations
Response
The session, as it is now
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.
Available options:
waiting, connected, disconnected, expired