to add customers to the automatic calling campaign on the Alohub platform.
| Information | Details |
|---|---|
| Base URL | {{baseUrl}}/api— Alohub provides a separate one for each tenant |
| Authentication | Header Authorization: {{apikey}} |
| Content-Type | application/json |
| Protocol | HTTPS |
{{baseUrl}}and {{apikey}}are provided by Alohub. Contact Alohub to receive information. /crm/addCampaignCustomer?userName={{userName}}
Add customer phone numbers to the Auto Call campaign. The system will automatically queue and make calls according to the campaign configuration.
| Param | Required | Description |
|---|---|---|
userName |
Yes | The account name making the request (used for audit log recording) |
{
"phone": "84901234567",
"campaignId": 12345,
"externalId": "CUST-2024-001",
"otp": "123456"
}
| Param | Type | Required | Description |
|---|---|---|---|
phone |
string | Yes | Customer phone number (recommended format 84xxx) |
campaignId |
integer | Yes | Auto Call campaign code (obtained from the Alohub CRM interface) |
externalId |
string | No | Reference code from the external system, used for reconciliation |
otp |
string | No | Text-to-speech content for the OTP reading campaign. The system will read this value to the customer |
curl -X POST "{{baseUrl}}/api/crm/addCampaignCustomer?userName=admin01" \
-H "Authorization: {{apikey}}" \
-H "Content-Type: application/json" \
-d '{
"phone": "84901234567",
"campaignId": 12345,
"externalId": "CUST-2024-001",
"otp": "123456"
}'
const axios = require('axios')
const BASE_URL = '{{baseUrl}}/api'
const API_KEY = '{{apikey}}'
async function addCampaignCustomer() {
try {
const response = await axios.post(
`${BASE_URL}/crm/addCampaignCustomer`,
{
phone: '84901234567',
campaignId: 12345,
externalId: 'CUST-2024-001',
otp: '123456'
},
{
params: { userName: 'admin01' },
headers: {
'Authorization': API_KEY,
'Content-Type': 'application/json'
}
}
)
console.log('Thành công:', response.data)
} catch (error) {
console.error('Lỗi:', error.response?.data || error.message)
}
}
addCampaignCustomer()
import requests
BASE_URL = "{{baseUrl}}/api"
API_KEY = "{{apikey}}"
response = requests.post(
f"{BASE_URL}/crm/addCampaignCustomer",
params={"userName": "admin01"},
headers={
"Authorization": API_KEY,
"Content-Type": "application/json"
},
json={
"phone": "84901234567",
"campaignId": 12345,
"externalId": "CUST-2024-001",
"otp": "123456"
}
)
if response.ok:
print("Thành công:", response.json())
else:
print("Lỗi:", response.status_code, response.text)
otp, the system will use text-to-speech to read the code to the customer.
{
"phone": "84912345678",
"campaignId": 100,
"otp": "482916"
}
otp—
{
"phone": "84987654321",
"campaignId": 200,
"externalId": "LEAD-2024-500"
}
externalIdto link customers between the external CRM system and Alohub,
campaignIdmust be the code of the campaign that is in an active state (Active). 84xxx— drop the leading 0, add country code 84. 0901234567→ 84901234567. externalIdto link customers between your system and Alohub,