The Alohub CRM API allows partners and external systems to create leads directly in the CRM without manual operations on the interface.
Parameters | Value |
|---|---|
Base URL |
|
Authentication | Header |
Content-Type |
|
/crm/leadCreate a new lead in the CRM system. If the phone number already exists, the system will update the information instead of creating a new one.
Header | Value |
|---|---|
|
|
|
|
|
|
{
"phone": "0868793800",
"email": "bang@gmail.com",
"name": "bang do"
}
Param | Type | Required | Description |
|---|---|---|---|
| string | Yes | Customer's phone number |
| string | No | Customer's email |
| string | No | Customer's full name |
Phone number format: Supports Vietnamese format — starting with
0xxx(for example:0868793800) or+84xxx(for example:+84868793800).
curl -X POST "{{base_url}}/api/crm/lead" \
-H "accept: */*" \
-H "Content-Type: application/json" \
-H "Authorization: {{apiKey}}" \
-d '{
"phone": "0868793800",
"email": "bang@gmail.com",
"name": "bang do"
}'
const axios = require('axios')
const response = await axios.post(
'{{base_url}}/api/crm/lead',
{
phone: '0868793800',
email: 'bang@gmail.com',
name: 'bang do'
},
{
headers: {
'Content-Type': 'application/json',
'Authorization': '{{apiKey}}'
}
}
)
console.log(response.data)
import requests
response = requests.post(
"{{base_url}}/api/crm/lead",
json={
"phone": "0868793800",
"email": "bang@gmail.com",
"name": "bang do"
},
headers={
"Content-Type": "application/json",
"Authorization": "{{apiKey}}"
}
)
print(response.json())
Scenario | Description |
|---|---|
Landing page / Registration form | When customers submit the form on the website, call the lead creation API immediately for the sales team to process quickly. |
Sync from website / app | Sync customer data from internal systems (ERP, e-commerce) into Alohub CRM. |
Chatbot automatically creates leads | When the chatbot collects enough customer information, it automatically calls the lead creation API without requiring manual entry by staff. |
Duplicate phone numbers: Each phone number can only create one unique lead. If the phone number already exists in the system, the API will update the information (email, name) instead of creating a new lead.
API Key: Each API key is provided separately. Contact Alohub to receive the API key. Each key has specific permission scopes. Do not share the API key with third parties.
Security: Always call the API from the server-side (backend). Do not embed the API key directly in the frontend or mobile app source code.