Tạo máy nhánh
API này dùng để tạo máy nhánh trên tổng đài.
POST /CreateExtension HTTP/1.1
Host: $BASE_URL.Etelecom
Content-Type: application/json
Accept: */*
Content-Length: 59
{
"extension_number": 1,
"hotline_id": "text",
"user_id": "text"
}
A successful response
{
"account_id": "text",
"created_at": "2025-07-12T20:28:52.728Z",
"expires_at": "2025-07-12T20:28:52.728Z",
"extension_number": "text",
"extension_password": "text",
"hotline_id": "text",
"id": "text",
"state": "Z",
"subscription_id": "text",
"tenant_domain": "text",
"tenant_id": "text",
"updated_at": "2025-07-12T20:28:52.728Z",
"user_id": "text"
}
Request:
curl --location '$BASE_URL.Etelecom/CreateExtension' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
"extension_number": 1001,
"hotline_id": "string",
"user_id": "string"
}'
Response Sample:
{
"account_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"extension_number": "string",
"extension_password": "string",
"hotline_id": "string",
"id": "string",
"state": "Z",
"subscription_id": "string",
"tenant_domain": "string",
"tenant_id": "string",
"updated_at": "2019-08-24T14:15:22Z",
"user_id": "string"
}
Cấu trúc body của request:
hotline_id required
string
ID hotline
extension_number required
int
Số máy nhánh
user_id
string
ID nhân viên gán máy nhánh
Cấu trúc thuộc tính dữ liệu trả về:
id
string
ID máy nhánh
user_id
string
ID nhân viên gán máy nhánh
account_id
string
ID tài khoản
extension_number
string
Số máy nhánh
extension_password
string
Mật khẩu máy nhánh
tenant_id
string
ID của tổng đài
tenant_domain
string
Domain của tổng đài
hotline_id
string
ID của hotline
created_at
string
Thời gian khởi tạo máy nhánh
updated_at
string
Thời gian cập nhật máy nhánh
expires_at
string
Thời gian hết hạn máy nhánh
subscription_id
string<date-time>
ID đăng ký
state
string
Trạng thái
Z
: Mới tạo
P
: Còn hạn
N
: Hết hạn
Last updated