General authentication: All APIs use Kong dual-auth : Header
Authorization(API key) is required. HeaderX-Tenant-IDinjected by Kong — if testing internally without going through Kong, omit this header, the backend will resolve tenantId based on the Authorization key. Do not use JWT (x-access-token) in this flow.
/v1/queues/inboundRetrieve the list of all inbound queues for the tenant. Supports pagination.
Authentication: Header
X-Api-Key(scope:queue). Kong dual-auth: prioritizeX-Tenant-IDheader, fallback to query DB based on the Authorization key.
Base URL: Dev:
https://xapi-dev.alohub.vn| Prod:https://xapi.alohub.vn
Parameters | Location | Required | Type | Description | Example |
|---|---|---|---|---|---|
| query | No |
| Page, starting from 0 (default: 0) | 0 |
| query | No |
| Number of records per page (default: 20) | 20 |
curl -X GET "https://xapi.alohub.vn/v1/queues/inbound" \
-H "X-Api-Key: sk_live_xxx" \
-H "X-Tenant-ID: 20260310"
# Phân trang
curl -X GET "https://xapi.alohub.vn/v1/queues/inbound?page=0&size=10" \
-H "X-Api-Key: sk_live_xxx" \
-H "X-Tenant-ID: 20260310"const axios = require('axios');
const response = await axios.get(
'{{host}}/api/v1/queues/inbound?page=0&size=20',
{ headers: { 'Authorization': '{{api-key}}', 'X-Tenant-ID': '{{tenant-id}}', 'Content-Type': 'application/json' } }
);
console.log(response.data);import requests
params = {"page": "0", "size": "20"}
headers = {"Authorization": "{{api-key}}", "X-Tenant-ID": "{{tenant-id}}", "Content-Type": "application/json"}
response = requests.get(
'{{host}}/api/v1/queues/inbound',
headers=headers, params=params
)
print(response.json()){
"success": "1",
"error_code": "SUCCESS",
"totalRecord": 3,
"data": [
{
"callinId": 1001226,
"callinName": "test",
"strategy": 1,
"musicinQueue": "waiting.wav",
"timeWait": "120",
"agentSelector": null,
"nguongRanhRoi": null,
"callinNumber": null
}
]
}Field | Type | Description | |
|---|---|---|---|
|
| "1" = success | |
|
| Total number of queues | |
|
| Queue ID — used as {id} in GET detail and PUT update | |
|
| Queue name | |
|
| null | 1=normal, 2=VIP, 3=blacklist, 4=divert, 99=temporarily locked |
|
| null | Hold music file name (music on hold) |
|
| null | Maximum wait time (seconds) |
|
| null | Agent selection algorithm |
|
| null | Announce position: 0=off, 1=on |
|
| null | Phone number of the queue |
HTTP | error_code | Description | FE handling |
|---|---|---|---|
401 | UNAUTHORIZED | Missing or incorrect API key | Redirect to re-enter key |
403 | INSUFFICIENT_SCOPE | Key does not have scope | Show message |
404 | NOT_FOUND | Not found | Show message |
429 | RATE_LIMIT_EXCEEDED | Exceeded request limit | Retry after Retry-After seconds |
500 | FAIL | System error | General error toast |
Header | Description |
|---|---|
| Tenant limit/10s |
| Remaining tenant/10s |
| Route limit/10s |
| Remaining route/10s |
| Seconds to wait when receiving 429 |
/v1/queues/inbound/{id}Retrieve details of 1 inbound queue. Backend checks ownership: the queue must belong to the tenant of the auth header.
Authentication: Header
X-Api-Key(scope:queue). Kong dual-auth: prioritizeX-Tenant-IDheader, fallback to query DB based on the Authorization key.
Base URL: Dev:
https://xapi-dev.alohub.vn| Prod:https://xapi.alohub.vn
Parameters | Location | Required | Type | Description | Example |
|---|---|---|---|---|---|
| path | Yes |
| callinId (obtained from GET /v1/queues/inbound) | 1001226 |
curl -X GET "https://xapi.alohub.vn/v1/queues/inbound/1001226" \
-H "X-Api-Key: sk_live_xxx" \
-H "X-Tenant-ID: 20260310"const axios = require('axios');
const response = await axios.get(
'{{host}}/api/v1/queues/inbound/{{id}}',
{ headers: { 'Authorization': '{{api-key}}', 'X-Tenant-ID': '{{tenant-id}}', 'Content-Type': 'application/json' } }
);
console.log(response.data);import requests
headers = {"Authorization": "{{api-key}}", "X-Tenant-ID": "{{tenant-id}}", "Content-Type": "application/json"}
response = requests.get(
'{{host}}/api/v1/queues/inbound/{{id}}',
headers=headers
)
print(response.json()){
"callinId": 1001226,
"callinName": "test",
"strategy": 1,
"musicinQueue": "waiting.wav",
"timeWait": "120",
"agentSelector": null,
"nguongRanhRoi": null,
"callinNumber": null
}Field | Type | Description | |
|---|---|---|---|
|
| Queue ID | |
|
| Queue name | |
|
| null | 1=normal, 2=VIP, 3=blacklist, 4=divert, 99=temporarily locked |
|
| null | Hold music file name |
|
| null | Maximum wait time (seconds) |
|
| null | Agent selection algorithm |
|
| null | Announce position: 0=off, 1=on |
|
| null | Phone number of the queue |
HTTP | error_code | Description | FE handling |
|---|---|---|---|
401 | UNAUTHORIZED | Missing or incorrect API key | Redirect to re-enter key |
403 | INSUFFICIENT_SCOPE | Key does not have scope | Show message |
404 | NOT_FOUND | Not found | Show message |
429 | RATE_LIMIT_EXCEEDED | Exceeded request limit | Retry after Retry-After seconds |
500 | FAIL | System error | General error toast |
Header | Description |
|---|---|
| Tenant limit/10s |
| Remaining tenant/10s |
| Route limit/10s |
| Remaining route/10s |
| Seconds to wait when receiving 429 |
/v1/queues/inbound/{id}Update inbound queue configuration. All fields are optional — at least 1 field is required. Strategy must be an integer in the set {1,2,3,4,99}.
Authentication: Header
X-Api-Key(scope:queue). Kong dual-auth: prioritizeX-Tenant-IDheader, fallback to query DB based on the Authorization key.
Base URL: Dev:
https://xapi-dev.alohub.vn| Prod:https://xapi.alohub.vn
Parameters | Location | Required | Type | Description | Example |
|---|---|---|---|---|---|
| path | Yes |
| callinId | 1001226 |
{
"moh_file_id": "waiting.wav",
"max_wait_sec": "180",
"strategy": 1,
"announce_position": "1"
}Field | Required | Description |
|---|---|---|
| No | Hold music file name |
| No | Maximum wait time (string number, unit in seconds) |
| No | Management type: 1/2/3/4/99 — must be an integer, use dropdown |
| No | "0" = turn off announce position, "1" = turn on |
curl -X PUT "https://xapi.alohub.vn/v1/queues/inbound/1001226" \
-H "X-Api-Key: sk_live_xxx" \
-H "X-Tenant-ID: 20260310" \
-H "Content-Type: application/json" \
-d '{"strategy":1}'
# Update nhiều field
curl -X PUT "https://xapi.alohub.vn/v1/queues/inbound/1001226" \
-H "X-Api-Key: sk_live_xxx" \
-H "X-Tenant-ID: 20260310" \
-H "Content-Type: application/json" \
-d '{"moh_file_id":"waiting.wav","max_wait_sec":"180","strategy":1}'const axios = require('axios');
const response = await axios.put(
'{{host}}/api/v1/queues/inbound/{{id}}',
{
"moh_file_id": "waiting.wav",
"max_wait_sec": "180",
"strategy": 1,
"announce_position": "1"
},
{ headers: { 'Authorization': '{{api-key}}', 'X-Tenant-ID': '{{tenant-id}}', 'Content-Type': 'application/json' } }
);
console.log(response.data);import requests
headers = {"Authorization": "{{api-key}}", "X-Tenant-ID": "{{tenant-id}}", "Content-Type": "application/json"}
payload = {
"moh_file_id": "waiting.wav",
"max_wait_sec": "180",
"strategy": 1,
"announce_position": "1"
}
response = requests.put(
'{{host}}/api/v1/queues/inbound/{{id}}',
json=payload,
headers=headers
)
print(response.json()){
"success": "1",
"error_code": "SUCCESS",
"error_message": "Inbound queue updated successfully"
}Field | Type | Description |
|---|---|---|
|
| "1" = success |
|
| SUCCESS when updated successfully |
|
| Result description |
HTTP | error_code | Description | FE handling |
|---|---|---|---|
401 | UNAUTHORIZED | Missing or incorrect API key | Redirect to re-enter key |
403 | INSUFFICIENT_SCOPE | Key does not have scope | Show message |
400 | INVALID_INPUT | Incorrect input | Show specific error |
404 | NOT_FOUND | Not found | Show message |
429 | RATE_LIMIT_EXCEEDED | Exceeded request limit | Retry after Retry-After seconds |
500 | FAIL | System error | General error toast |
Header | Description |
|---|---|
| Tenant limit/10s |
| Remaining tenant/10s |
| Route limit/10s |
| Remaining route/10s |
| Seconds to wait when receiving 429 |