Send a customer message
curl --request POST \
--url https://back.leap.onclarity.com/api/integration/ai_service/customer/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": 123,
"ticket_id": 123,
"text": "<string>",
"files": [],
"ai_chat": false,
"trigger_internal_id": "<string>",
"suggested_actions": [
{}
],
"state": "<string>"
}
'import requests
url = "https://back.leap.onclarity.com/api/integration/ai_service/customer/send"
payload = {
"customer_id": 123,
"ticket_id": 123,
"text": "<string>",
"files": [],
"ai_chat": False,
"trigger_internal_id": "<string>",
"suggested_actions": [{}],
"state": "<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({
customer_id: 123,
ticket_id: 123,
text: '<string>',
files: [],
ai_chat: false,
trigger_internal_id: '<string>',
suggested_actions: [{}],
state: '<string>'
})
};
fetch('https://back.leap.onclarity.com/api/integration/ai_service/customer/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2023-11-07T05:31:56Z",
"internal_id": "<string>",
"files": [
{
"id": 123,
"original_url": "<string>",
"mime_type": "<string>",
"original_filename": "<string>",
"thumbnail_url": "<string>"
}
]
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}AI service
Send a customer message
POST
/
api
/
integration
/
ai_service
/
customer
/
send
Send a customer message
curl --request POST \
--url https://back.leap.onclarity.com/api/integration/ai_service/customer/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": 123,
"ticket_id": 123,
"text": "<string>",
"files": [],
"ai_chat": false,
"trigger_internal_id": "<string>",
"suggested_actions": [
{}
],
"state": "<string>"
}
'import requests
url = "https://back.leap.onclarity.com/api/integration/ai_service/customer/send"
payload = {
"customer_id": 123,
"ticket_id": 123,
"text": "<string>",
"files": [],
"ai_chat": False,
"trigger_internal_id": "<string>",
"suggested_actions": [{}],
"state": "<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({
customer_id: 123,
ticket_id: 123,
text: '<string>',
files: [],
ai_chat: false,
trigger_internal_id: '<string>',
suggested_actions: [{}],
state: '<string>'
})
};
fetch('https://back.leap.onclarity.com/api/integration/ai_service/customer/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2023-11-07T05:31:56Z",
"internal_id": "<string>",
"files": [
{
"id": 123,
"original_url": "<string>",
"mime_type": "<string>",
"original_filename": "<string>",
"thumbnail_url": "<string>"
}
]
}{
"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.
Body
application/json