Answer an expert question
curl --request POST \
--url https://guidinghand.ai/v1/escalations/{escalation_id}/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"learn": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', learn: true})
};
fetch('https://guidinghand.ai/v1/escalations/{escalation_id}/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/escalations/{escalation_id}/answer"
payload = {
"text": "<string>",
"learn": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "escalation",
"id": "<string>",
"agent_id": "<string>",
"kind": "approval",
"status": "open",
"source": "live",
"summary": "<string>",
"count": 123,
"procedure": {
"id": "<string>",
"title": "<string>",
"revision": 123
},
"failed_at": "<string>",
"proposal": {
"base_revision": 123,
"body": "<string>"
},
"owner": "<string>",
"details": "<string>",
"tasks": [
"<string>"
],
"conversation_id": "<string>",
"request_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"resolution": "decided",
"resolved_by": {
"type": "<string>",
"email": "<string>",
"key_id": "<string>"
},
"resolved_revision": 123,
"delivery": {
"emailed_at": "2023-11-07T05:31:56Z",
"channels": [
{
"platform": "slack",
"channel": "<string>"
}
],
"webhook": true
},
"question": "<string>",
"on_hold": 123,
"waiting": [
{
"conversation_id": "<string>",
"question": "<string>",
"at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"holding_since": "2023-11-07T05:31:56Z"
}
],
"answer": {
"text": "<string>",
"at": "2023-11-07T05:31:56Z",
"learn": true,
"procedure_id": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"failed": true
},
"messages": 123
}{
"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>"
}
}{
"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>"
}
}Escalations
Answer an expert question
Answers an expert escalation: the agent asked its team because it didn’t know. Resolved as answered (the first answer counts). The agent then tells every conversation that asked, in a reply of its own, and keeps the answer as a chat procedure (written_by expert) unless learn is false or its tools.learn is off; with tools.learn review it is kept off, and a procedure_new escalation asks the team to turn it on. Members and above.
POST
/
v1
/
escalations
/
{escalation_id}
/
answer
Answer an expert question
curl --request POST \
--url https://guidinghand.ai/v1/escalations/{escalation_id}/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"learn": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', learn: true})
};
fetch('https://guidinghand.ai/v1/escalations/{escalation_id}/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/escalations/{escalation_id}/answer"
payload = {
"text": "<string>",
"learn": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "escalation",
"id": "<string>",
"agent_id": "<string>",
"kind": "approval",
"status": "open",
"source": "live",
"summary": "<string>",
"count": 123,
"procedure": {
"id": "<string>",
"title": "<string>",
"revision": 123
},
"failed_at": "<string>",
"proposal": {
"base_revision": 123,
"body": "<string>"
},
"owner": "<string>",
"details": "<string>",
"tasks": [
"<string>"
],
"conversation_id": "<string>",
"request_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"resolution": "decided",
"resolved_by": {
"type": "<string>",
"email": "<string>",
"key_id": "<string>"
},
"resolved_revision": 123,
"delivery": {
"emailed_at": "2023-11-07T05:31:56Z",
"channels": [
{
"platform": "slack",
"channel": "<string>"
}
],
"webhook": true
},
"question": "<string>",
"on_hold": 123,
"waiting": [
{
"conversation_id": "<string>",
"question": "<string>",
"at": "2023-11-07T05:31:56Z",
"delivered_at": "2023-11-07T05:31:56Z",
"holding_since": "2023-11-07T05:31:56Z"
}
],
"answer": {
"text": "<string>",
"at": "2023-11-07T05:31:56Z",
"learn": true,
"procedure_id": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"failed": true
},
"messages": 123
}{
"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>"
}
}{
"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
Body
application/json
Response
The escalation, answered.
eval: raised only by eval runs so far (no webhooks). test: sent for real from a team member's test chat (test_escalations: "real"), to check where escalations go: emailed, posted to Slack or Teams and sent to the webhook like a live one, marked as a test, and not counted in open_count.
Available options:
live, eval, test