API to make outbound calls from the system to the customer's phone number. The call will be connected through the designated campaign — suitable for the agent to press the "Call" button on the CRM/telephony interface for the system to dial automatically and connect with the customer.
Authentication: Request needs to send header
X-Api-Key. Contact Alohub to obtain API Key.
{{base_url}}/v1/voice/click-to-callHeader | Required | Description |
|---|---|---|
| Yes | API Key for authentication |
| Yes |
|
Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | Customer's phone number to call |
| string | No | Transaction ID created by the client for matching results via webhook |
| string | Yes | Your IP address |
curl --location -g '{{base_url}}/v1/voice/click-to-call' \
--header 'X-Api-Key: {{api_key}}' \
--header 'Content-Type: application/json' \
--data '{
"phone": "0123456789",
"transactionId": "TXN_001",
"ipPhone": "6688"
}'const axios = require('axios')
const response = await axios.post('{{base_url}}/v1/voice/click-to-call', {
phone: '0123456789',
transactionId: 'TXN_001',
ipPhone: '6688'
}, {
headers: {
'X-Api-Key': '{{api_key}}',
'Content-Type': 'application/json'
}
})
console.log(response.data)import requests
response = requests.post('{{base_url}}/v1/voice/click-to-call',
json={
'phone': '0123456789',
'transactionId': 'TXN_001',
'ipPhone: '6688'
},
headers={
'X-Api-Key': '{{api_key}}',
'Content-Type': 'application/json'
}
)
print(response.json())Webhook callback: Use
transactionIdcreated by the client to reconcile the call results when Alohub calls the webhook to return results. See Voice Webhook for payload format and authentication method.