Request a voice call
curl --request POST \
--url https://back.leap.onclarity.com/api/integration/ai_service/ticket/{ticket_id}/voice_handoff \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"brief": {
"reason": "",
"summary": "",
"key_facts": [
{
"label": "",
"value": ""
}
],
"commitments": [
"<string>"
],
"open_question": "",
"opening_line": "<string>",
"language": "<string>",
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"customer_id": "<string>"
},
"source": {
"channel": "<string>",
"agent_name": "<string>",
"voice_conversation_id": "<string>",
"ab_ticket_id": "<string>",
"link": "<string>"
}
}
}
'import requests
url = "https://back.leap.onclarity.com/api/integration/ai_service/ticket/{ticket_id}/voice_handoff"
payload = {
"phone": "<string>",
"brief": {
"reason": "",
"summary": "",
"key_facts": [
{
"label": "",
"value": ""
}
],
"commitments": ["<string>"],
"open_question": "",
"opening_line": "<string>",
"language": "<string>",
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"customer_id": "<string>"
},
"source": {
"channel": "<string>",
"agent_name": "<string>",
"voice_conversation_id": "<string>",
"ab_ticket_id": "<string>",
"link": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '<string>',
brief: {
reason: '',
summary: '',
key_facts: [{label: '', value: ''}],
commitments: ['<string>'],
open_question: '',
opening_line: '<string>',
language: '<string>',
customer: {
name: '<string>',
phone: '<string>',
email: '<string>',
customer_id: '<string>'
},
source: {
channel: '<string>',
agent_name: '<string>',
voice_conversation_id: '<string>',
ab_ticket_id: '<string>',
link: '<string>'
}
}
})
};
fetch('https://back.leap.onclarity.com/api/integration/ai_service/ticket/{ticket_id}/voice_handoff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "dialing",
"message": "<string>",
"reason": "handoff_limit"
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}AI service
Request a voice call
POST
/
api
/
integration
/
ai_service
/
ticket
/
{ticket_id}
/
voice_handoff
Request a voice call
curl --request POST \
--url https://back.leap.onclarity.com/api/integration/ai_service/ticket/{ticket_id}/voice_handoff \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"brief": {
"reason": "",
"summary": "",
"key_facts": [
{
"label": "",
"value": ""
}
],
"commitments": [
"<string>"
],
"open_question": "",
"opening_line": "<string>",
"language": "<string>",
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"customer_id": "<string>"
},
"source": {
"channel": "<string>",
"agent_name": "<string>",
"voice_conversation_id": "<string>",
"ab_ticket_id": "<string>",
"link": "<string>"
}
}
}
'import requests
url = "https://back.leap.onclarity.com/api/integration/ai_service/ticket/{ticket_id}/voice_handoff"
payload = {
"phone": "<string>",
"brief": {
"reason": "",
"summary": "",
"key_facts": [
{
"label": "",
"value": ""
}
],
"commitments": ["<string>"],
"open_question": "",
"opening_line": "<string>",
"language": "<string>",
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"customer_id": "<string>"
},
"source": {
"channel": "<string>",
"agent_name": "<string>",
"voice_conversation_id": "<string>",
"ab_ticket_id": "<string>",
"link": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '<string>',
brief: {
reason: '',
summary: '',
key_facts: [{label: '', value: ''}],
commitments: ['<string>'],
open_question: '',
opening_line: '<string>',
language: '<string>',
customer: {
name: '<string>',
phone: '<string>',
email: '<string>',
customer_id: '<string>'
},
source: {
channel: '<string>',
agent_name: '<string>',
voice_conversation_id: '<string>',
ab_ticket_id: '<string>',
link: '<string>'
}
}
})
};
fetch('https://back.leap.onclarity.com/api/integration/ai_service/ticket/{ticket_id}/voice_handoff', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "dialing",
"message": "<string>",
"reason": "handoff_limit"
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Path Parameters
Body
application/json
Response
Request fulfilled, document follows