> For the complete documentation index, see [llms.txt](https://api-vpbx.senbac.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-vpbx.senbac.com/readme.md).

# SENTECH

**HƯỚNG DẪN TÍCH HỢP VPBX API CƠ BẢN**

* **Xác thực**

{% hint style="info" %}
Mỗi DN sẽ có 1 API KEY . Dùng API KEY để lấy AccessToken.

Access Token sẽ có giá trị trong vòng 24h. Hết hạn thì tiến hành lấy lại

LẤY API KEY và XÁC THỰC

<https://api-vpbx.senbac.com/tong-quan>

<https://api-vpbx.senbac.com/xac-thuc>
{% endhint %}

* **Tạo mới nhân viên , tạo mới tổng đài cho nhân viên**

{% hint style="success" %}
Mỗi nhân viên được định danh trong hệ thống qua

số NỘI BỘ / EXTENSION / MÁY NHÁNH

Mỗi nhân viên sẽ có 3 giá trị để xác thực với tổng đài

* **domain** : Domain tổng đài của doanh nghiệp
* **username** : Mã máy nhánh ví dụ : 101, 102, 103 ...
* **password** : Mật khẩu máy nhánh

Dùng API bên dưới để tạo 1 nhân viên, VPBX sẽ response về thông tin tổng đài cho 1 nhân viên, bên thứ 3 có thể lưu vào hệ thống

<https://api-vpbx.senbac.com/nhan-vien>

API : /api/agent/invite

Hoặc : Nếu nhân viên đã có ở VPBX, mà không cần tạo mới thì có thể lấy dữ liệu tổng đài qua API

<https://api-vpbx.senbac.com/tong-dai>
{% endhint %}

**Nhận dữ liệu cuộc gọi**

{% hint style="success" %}
Sau khi kết thúc cuộc gọi, có thể lấy data cuộc gọi thông qua 2 cơ chế

**Webhook** : Nhận data cuộc gọi chủ động, lưu bên thứ 3

<https://api-vpbx.senbac.com/webhooks-1/tong-quan>

API lịch sử : Nhận dữ liệu qua API của VPBX

<https://api-vpbx.senbac.com/webhooks-1/webhook>
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api-vpbx.senbac.com/readme.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
