> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
