Download OpenAPI specification:
Tổ chức (Workspace): Là môi trường làm việc của một tổ chức doanh nghiệp trên GapoWork
Người dùng (User): Là các cá nhân, tổ chức sử dụng hệ thống GapoWork thông qua giao diện GapoWork (Web hoặc ứng dụng trên các thiết bị di dộng) hoặc thông qua Open API. Người dùng được chia làm các vai trò (Role):
API key (Token): Là phương thức xác thực cho phép User tương tác với GapoWork thông qua Open API. API key được truyền qua header của mỗi request với key "x-gapo-openapi-key". Mỗi nhóm người dùng sẽ được cấp những loại API key khác nhau:
Quyền (Permission): Là quyền thực hiện một hành động nhất định trên hệ thống thông qua api. Permission được tích hợp trong API key, mỗi API key có thể đi kèm 1 hoặc nhiều quyền khác nhau và chỉ thực hiện được những hành động tương ứng với quyền được tích hợp
(create:token) Tạo API key: Workspace Admin có thể tạo thêm các API key cho người dùng trong Workspace (đang cập nhật)
(read:list_token) Lấy danh sách API key: Workspace Admin có thể xem danh sách các API key đang có trên Workspace của mình
(deactivate:token) Vô hiệu hóa API key: Workspace Admin có thể vô hiệu hóa các API key đang hoạt động trên Workspace
(activate:token) Kích hoạt lại API key: Workspace Admin có thể kích hoạt lại API key đã bị vô hiệu hóa trước đó
(delete:token) Xóa API key: Workspace Admin có thể xóa vĩnh viển API key đang có trên Workspace
(invite:User) Mời User vào Workspace: Workspace Admin có thể mời User (đã có hoặc chưa có tài khoản GapoWork) tham gia vào Workspace
(deactivate:User) Vô hiệu hóa tài khoản người dùng: Workspace Admin có thể vô hiệu hóa tài khoản người dùng thuộc Workspace
(activate:User) Tái kích họa tài khoản người dùng: Workspace Admin có thể kích hoạt lại tài khoản người dùng đã bị vô hiệu hóa trước đó
(upgrade:user_account) Nâng cấp tài khoản người dùng: Workspace Admin có thể nâng cấp tài khoản người dùng trong Workspace của mình lên các gói Premium/Business sau khi đã kí hợp đồng với GapoWork
(downgrade:user_account) Hạ cấp tài khoản người dùng: Workspace Admin có thể hạ cấp tài khoản người dùng Premium/Business trong Workspace của mình về tài khoản thường
(update:user_info) Cập nhật thông tin tài khoản người dùng: Workspace Admin có thể cập nhật các thông tin hiển thị trên tài khoản người dùng trừ thông tin đăng nhập
(create:department) Thêm phòng ban mới: Workspace Admin có thể thêm Phòng Ban mới trên Workspace
(read:list_department) Lấy danh sách phòng ban: Workspace Admin có thể xem danh sách Phòng Ban hiện có trên Workspace
(update:department) Cập nhật phòng ban: Workspace Admin có thể cập nhật thông tin Phòng Ban trên Workspace
(delete:department) Xóa phòng ban: Workspace Admin có thể xóa vĩnh viễn một Phòng Ban trên Workspace
(create:role) Thêm chức vụ mới: Workspace Admin có thể thêm Chức Vụ mới trên Workspace
(read:list_role) Lấy danh sách chức vụ: Workspace Admin có thể lấy danh sách các Chức Vụ đang có trên Workspace
(update:role) Cập nhật chức vụ: Workspace Admin có thể cập nhật thông tin Chức Vụ trên Workspace
(delete:role) Xóa chức vụ: Workspace Admin có thể xóa vĩnh viễn một Chức Vụ trên Workspace
(create:chat_bot) Thêm chat bot: Workspace Admin có thể tạo chat bot mới hoạt động trên Workspace
(read:list_chat_bot) Lấy danh sách chat bot: Workspace Admin có thế lấy danh sách các chat bot đã tạo trên Workspace
(read:bot_info) Lấy thông tin từ chat bot: Workspace Admin có thể xem thông tin chi tiết của chat bot
(update:chat_bot) Cập nhật thông tin chat bot: Workspace Admin có thể cập nhật thông tin tên và ảnh đại diện của chat bot trên Workspace
(delete:chat_bot) Xóa chat bot: Workspace Admin có thể xóa vĩnh viễn chat bot đang có trên Workspace
(create:bot_command) Thêm command cho chat bot: Workspace Admin có thể cấu hình thêm command cho chat bot
(read:list_bot_command) Lấy danh sách command của chat bot: Workspace Admin có thể lấy danh sách các command đã được thiết lập của một chat bot cụ thể
(update:bot_command) Cập nhật command của chat bot: Workspace Admin có thể cập nhật mô tả và câu trả lời của command
(delete:bot_command) Xóa commnad của chat bot: Workspace Admin có thể xóa vĩ viễn một command bất kì được thiết lập trước đó của chat bot
(read:list_post) Lấy danh sách bài viết: Workspace Admin có thể lấy danh sách các bài viết đang có trên Workspace
(query:user_info) Lấy User ID: Workspace Admin có thể dùng thông tin đăng nhập để lấy id tài khoản người dùng
(create:survey) Tạo khảo sát: Workspace Admin có thể tạo khảo sát mới cho workspace
(update:survey) Cập nhật khảo sát: Workspace Admin có thể cập nhật thông tin khảo sát đã tồn tại
(export:survey_answer) Xuất kết quả khảo sát: Workspace Admin có thể xuất kết quả khảo sát dưới dạng file
(read:survey) Xem khảo sát: Workspace Admin có thể xem chi tiết thông tin khảo sát
(create:survey_template) Tạo mẫu khảo sát: Workspace Admin có thể tạo mẫu khảo sát để tái sử dụng
(read:survey_template) Xem mẫu khảo sát: Workspace Admin có thể xem danh sách và chi tiết mẫu khảo sát
(update:survey_template) Cập nhật mẫu khảo sát: Workspace Admin có thể chỉnh sửa mẫu khảo sát
(remind:survey) Nhắc nhở khảo sát: Workspace Admin có thể gửi nhắc nhở đến những người chưa trả lời khảo sát
(sudo:workspace) Quyền SUDO: Quyền SUDO có thể thay thế tất cả các quyền còn lại và cả các quyền có thể được thêm trong tương lai
Các thắc mắc khi sử dụng tài liệu này vui lòng liên hệ bộ phận hỗ trợ của GapoWork để được hỗ trợ
Kiểm tra email đã tồn tại trong workspace hay chưa.
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API Key |
content-type | string Example: application/json |
email required | string [ 1 .. 50 ] characters Email dùng để đăng nhập |
{- "email": "[email protected]"
}
{- "data": {
- "user_id": 12345,
- "display_name": "string",
- "email": "string",
- "phone_number": "string",
- "list_departments": [
- {
- "department_id": "string",
- "role_id": "string"
}
], - "custom_info": [
- {
- "key": "user_kyc_status",
- "value": 20
}
], - "employee_code": "string",
- "status": 0
}, - "message": "successful",
- "code": 200
}
Lấy danh sách API key đang có của User hoặc trả về API key mặc định tương ứng bằng access_token nhận được từ API login
x-gapo-workspace-id required | string Example: 523866125265220 WorkspaceID |
Authorization required | string Example: Bearer <jwt token> |
{- "message": "Succeeded!",
- "data": [
- {
- "id": "18791fe84f838ae95a84f41b0101",
- "title": "API key của A",
- "creator_id": "12345678",
- "value": "user - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE4XIiLCJwZXJtaXNzaW9ucyI6WyJjcmVhdGU6d29ya3NwYWNlIiwicmVhZDpsaXN0X3dvcmtzcGFjZSJdLCJjcmVhdG9yX2lkIjoicGFydG5lci14SVRHN3k3UFBxbkhGWUozIiwid29ya3NwYWNlX2lkIjoiIiwiZXhwIjoxNjUzNTM1Mjg2fQ.W57nBG8ZIkrU8mIUe_A3OIzvg7d9alBYjTuAdk_ZmAY\",",
- "role_type": "user",
- "workspace_id": "124352346457243",
- "permissions": [
- [
- "action:example1",
- "..",
- "action:example2"
]
]
}
]
}
Yêu cầu permission: read:list_token
Trường hợp sử dụng:
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!",
- "data": [
- {
- "id": "18791fe84f838ae95a84f41b0101",
- "title": "API key của A",
- "creator_id": "12345678",
- "value": "user - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE4XIiLCJwZXJtaXNzaW9ucyI6WyJjcmVhdGU6d29ya3NwYWNlIiwicmVhZDpsaXN0X3dvcmtzcGFjZSJdLCJjcmVhdG9yX2lkIjoicGFydG5lci14SVRHN3k3UFBxbkhGWUozIiwid29ya3NwYWNlX2lkIjoiIiwiZXhwIjoxNjUzNTM1Mjg2fQ.W57nBG8ZIkrU8mIUe_A3OIzvg7d9alBYjTuAdk_ZmAY\",",
- "role_type": "user",
- "workspace_id": "124352346457243",
- "permissions": [
- [
- "action:example1",
- "..",
- "action:example2"
]
]
}
], - "links": {
- "prev": 2,
- "next": null
}
}
Yêu cầu permission: create:token
Trường hợp thường dùng:
Note:
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
title required | string Tên phân biệt cho API key mới |
role_type required | string Enum: "user" "workspace" Loại API key cần tạo |
creator_id | number Đại diện cho người dùng sẽ sử dụng API key này, bỏ qua trường nay nếu muốn tạo API key mới cho bản thân |
{- "title": "API key của A",
- "role_type": "user",
- "creator_id": 123456789
}
{- "message": "Succeeded!",
- "data": {
- "id": "18791fe84f838ae95a84f41b0101",
- "title": "API key của A",
- "creator_id": "12345678",
- "value": "user - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjE4XIiLCJwZXJtaXNzaW9ucyI6WyJjcmVhdGU6d29ya3NwYWNlIiwicmVhZDpsaXN0X3dvcmtzcGFjZSJdLCJjcmVhdG9yX2lkIjoicGFydG5lci14SVRHN3k3UFBxbkhGWUozIiwid29ya3NwYWNlX2lkIjoiIiwiZXhwIjoxNjUzNTM1Mjg2fQ.W57nBG8ZIkrU8mIUe_A3OIzvg7d9alBYjTuAdk_ZmAY\",",
- "role_type": "user",
- "workspace_id": "124352346457243",
- "permissions": [
- [
- "action:example1",
- "..",
- "action:example2"
]
]
}
}
Yêu cầu permission: delete:token
Trường hợp sử dụng:
token_id required | string Example: token_id=18791f2208f838e95f41b001 Id của API key cần xóa |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!"
}
Yêu cầu permission: update:token
Trường hợp sử dụng:
token_id required | string Example: token_id=39f5050065d2484582c673ec3c41e213 ID của API key cần update |
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin key |
title required | string |
{- "title": "Tên phân biệt mới"
}
{- "message": "Succeeded!"
}
Yêu cầu permission: deactivate:token
Trường hợp sử dụng:
token_id required | string Example: token_id=39f5050065d2484582c673ec3c41e213 ID của API key cần update |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin key |
{- "message": "Succeeded!"
}
Yêu cầu permission: activate:token
Trường hợp sử dụng:
token_id required | string Example: token_id=39f5050065d2484582c673ec3c41e213 ID của API key cần update |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin key |
{- "message": "Succeeded!"
}
Yêu cầu permission: invite:user
Trường hợp thường dùng:
Note:
title
có hiệu lựu nếu trường departments
có giá trịcontent-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
string Email tài khoản người dùng, nếu không có thì điền "" | |
phone_number | string Số điện thoại liên kết với tài khoản, nếu không có thì điền "" |
identifier_code | string Mã số nhân viên của người dùng, nếu không có thì điền "" |
display_name | string Tên hiển thị của tài khoản |
department_id | string Id phòng ban |
role_id | string Id chức vụ |
password | string Mật khẩu ban đầu của tài khoản |
Array of objects Thông tin phòng ban chức vụ của tài khoản | |
Array of objects Các trường thông tin tùy chỉnh cần cập nhật | |
employee_code | string Mã nhân viên của người dùng |
region_id | string ID của vùng miền |
department | string Vui lòng điền thông tin các cấp phòng ban theo đúng thứ tự cấp độ để hệ thống tự động tạo phòng ban và sơ đồ tổ chức. Các phòng ban theo các cấp cần ngăn cách nhau bằng " || " |
title | string Tên chức vụ. Trường này có hiệu lưu khi trường |
check_department_role | boolean Hệ thống sẽ kiểm tra theo từng cấp độ phòng ban theo tên
|
contract_type | string Loại hợp đồng |
first_day_of_work | number Ngày vào công ty. Là giá trị timestamps in milliseconds |
first_official_contract_signing_date | number Ngày ký hợp đồng chính thức đầu tiên. Là giá trị timestamps in milliseconds |
last_day_of_work | number Ngày nghỉ việc. Là giá trị timestamps in milliseconds |
object Ngày sinh | |
manager_id | number Id của cấp trên quản lý trực tiếp |
{- "email": "",
- "phone_number": "",
- "identifier_code": "51363324",
- "display_name": "Trần Văn A",
- "department_id": "a89afe3b231847169817225b316cbc18",
- "role_id": "a0d3b0c5d3934cb894429d493a20a76c",
- "password": "TranV@nA3324",
- "list_departments": [
- {
- "department_id": "12f54b2151243d",
- "role_id": "16234bc5e13ad"
}
], - "custom_info": [
- {
- "key": "user_kyc_status",
- "value": 20
}
], - "employee_code": "string",
- "region_id": "string",
- "department": "Chi nhánh Hà Nội || Phòng Tài chính Kế toán || Kế toán",
- "title": "Kế toán trưởng",
- "check_department_role": true,
- "contract_type": "string",
- "first_day_of_work": 0,
- "first_official_contract_signing_date": 0,
- "last_day_of_work": 0,
- "birthday": {
- "day": 0,
- "month": 0,
- "year": 0
}, - "manager_id": 0
}
{- "message": "Succeeded!",
- "data": {
- "id": 260131949,
- "display_name": "Example",
- "domain": "",
- "company_name": "gapo",
- "identifier_code": "identifier_code_test",
- "phone_number": "84987654321",
- "status": 1,
- "state": 0,
- "department_id": "77b3a0440b614a3eb36ddca77ff6de2d",
- "role_id": "3f46f762f0694277a37c04e3aea822c3",
- "login_type": "identifier_code"
}
}
Yêu cầu permission: update:user_info
Trường hợp thường dùng:
Note:
user_id | string Example: user_id=184632584 Id tài khoản người dùng |
phone_number | string Example: phone_number=0123456789 Số điện thoại đăng nhập của người dùng |
identifier_code | string Example: identifier_code=134512346717 Mã định danh đăng nhập của người dùng |
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
tree_id | string ID của cây tổ chức |
user_id | number ID của người dùng |
display_name | string Tên hiển thị của người dùng |
string Email hiển thị trên tài khoản. Có thể thay đổi nếu không phải là thông tin đăng nhập | |
phone_number | string Số điện thoại hiển thị trên tài khoản. Có thể thay đổi nếu không phải là thông tin đăng nhập |
Array of objects Thông tin phòng ban và chức vụ của tài khoản | |
Array of objects Các trường thông tin tùy chỉnh cần cập nhật | |
employee_code | string Mã nhân viên của người dùng |
department | string Thông tin các cấp phòng ban theo thứ tự cấp độ, ngăn cách nhau bằng " || " |
region_id | string ID của vùng miền |
title | string Chức danh của người dùng |
contract_type | string Loại hợp đồng |
first_day_of_work | number Ngày vào công ty. Là giá trị timestamps in milliseconds |
first_official_contract_signing_date | number Ngày ký hợp đồng chính thức đầu tiên. Là giá trị timestamps in milliseconds |
last_day_of_work | number Ngày nghỉ việc. Là giá trị timestamps in milliseconds |
object Ngày sinh | |
manager_id | number Id của cấp trên quản lý trực tiếp |
{- "tree_id": "string",
- "user_id": 0,
- "display_name": "string",
- "email": "string",
- "phone_number": "string",
- "list_departments": [
- {
- "department_id": "string",
- "role_id": "string"
}
], - "custom_info": [
- {
- "key": "user_kyc_status",
- "value": 20
}
], - "employee_code": "string",
- "department": "string",
- "region_id": "string",
- "title": "string",
- "contract_type": "string",
- "first_day_of_work": 0,
- "first_official_contract_signing_date": 0,
- "last_day_of_work": 0,
- "birthday": {
- "day": 0,
- "month": 0,
- "year": 0
}, - "manager_id": 0
}
{- "message": "Succeeded!"
}
Yêu cầu permission: upgrade:user_account
Trường hợp sử dụng:
Note:
user_id required | string Example: user_id=162463473 Id tài khoản được upgrade |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
account_type | number Enum: 1 2 Gói tài khoản mục tiêu để nâng cấp
|
{- "account_type": 1
}
{- "message": "Succeeded!"
}
Yêu cầu permission: downgrade:user
Trường hợp sử dụng:
Note: Khi chuyển tài khoản Business/Premium thành tài khoản Free phụ lục sẽ được cập nhật trong chu kì thanh toán tiếp theo
user_id required | number Example: user_id=162463473 Id tài khoản cần downgrade |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!"
}
Yêu cầu permission: activate:user
Trường hợp sử dụng:
Note:
user_id required | number Example: user_id=30889369 ID Người dùng |
phone_number | string Example: phone_number=84123456789 Số điện thoại người dùng. Số điện thoại phải bắt đầu bằng 84 |
identifier_code | string Example: identifier_code=1 Mã định danh người dùng |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!"
}
Yêu cầu permission: deactivate:user
Trường hợp sử dụng:
Note:
user_id required | number Example: user_id=30889369 Id tài khoản |
phone_number | string Example: phone_number=84123456789 Số điện thoại người dùng. Số điện thoại phải bắt đầu bằng 84 |
identifier_code | string Example: identifier_code=1 Mã định danh người dùng |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!"
}
Yêu cầu permission: create:department
Trường hợp sử dụng:
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
tree_id required | string Id cây tổ chức, mặc định bằng workspace_id |
parent_id required | string Id phòng ban cấp trên, nếu không có thì để "" |
required | Array of objects (CreateDepartmentInfo) |
{- "tree_id": "584568543185435184",
- "parent_id": "",
- "departments": [
- {
- "name": "Marketing",
- "id": ""
}
]
}
{- "message": "Succeeded!"
}
Yêu cầu permission: read:list_department
Trường hợp sử dụng:
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!",
- "data": [
- {
- "id": "43261",
- "name": "Phòng kinh doanh",
- "id_primary": true,
- "childrens": [
- {
- "id": "1523613",
- "name": "Khu vực HCM",
- "tree_id": "215415413154153",
- "childens": [ ]
}, - {
- "id": "1624356",
- "name": "Khu vực Hà Nội",
- "tree_id": "215415413154153",
- "childrens": [ ]
}
]
}
]
}
Yêu cầu permission: update:department
Trường hợp sử dụng:
department_id required | string Example: department_id=1256237fb1a7 Id phòng ban cần cập nhật |
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
tree_id | string Id cây sơ đồ tổ chức, mặc định để bằng workspace_id |
name | string Tên mới sau khi cập nhật |
parent_id | string Id phòng ban cấp trên hiện tại hoặc Id phòng ban muốn chuyển đến. Nếu là phòng ban cao nhất, không có parent thì có thể để "" |
{- "tree_id": "54816584316484318",
- "name": "CSKH",
- "parent_id": ""
}
{- "message": "Succeeded!"
}
Yêu cầu permission: delete:department
Trường hợp sử dụng:
Note:
department_id required | string Example: department_id=1871325fb32 Id phòng ban muốn xóa |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!"
}
Yêu cầu permission: create:role
Trường hợp sử dụng:
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
required | Array of objects Danh sách các chức vụ muốn thêm |
{- "roles": [
- {
- "name": "Nhân viên trực tổng đài",
- "id": ""
}
]
}
{- "message": "Succeeded!"
}
Yêu cầu permission: read:list_role
Trường hợp sử dụng:
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!",
- "data": [
- {
- "id": "string",
- "name": "string"
}
]
}
Yêu cầu permission: update:role
Trường hợp sử dụng:
role_id required | string Example: role_id=1637fb1a7 Id chức vụ cần cập nhật |
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
name required | string Tên mới sau khi cập nhật |
{- "name": "Nhân viên kinh doanh"
}
{- "message": "Succeeded!"
}
Yêu cầu permission: delete:role
Trường hộp sử dụng:
Note:
role_id required | string Example: role_id=1871325fb32 Id chức vụ muốn xóa |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!"
}
Thêm hoặc xóa thành viên khỏi một quản lý cụ thể.
manager_id required | string ID của quản lý |
added_member_ids | Array of numbers |
removed_member_ids | Array of numbers |
{- "added_member_ids": [
- 0
], - "removed_member_ids": [
- 0
]
}
{- "message": "Ok"
}
Lấy danh sách thành viên của một quản lý cụ thể.
manager_id required | string ID của quản lý |
{- "id": 0,
- "avatar": "string",
- "display_name": "string",
- "info": {
- "work": [
- {
- "department_id": "string",
- "department": "string",
- "role_id": "string",
- "title": "string",
- "employee_code": "string"
}
]
}, - "members_count": 0,
- "members": [
- {
- "id": 0,
- "avatar": "string",
- "display_name": "string",
- "info": {
- "work": [
- {
- "department_id": "string",
- "department": "string",
- "role_id": "string",
- "title": "string"
}
]
}, - "members_count": 0
}
], - "is_director": true
}
{- "data": {
- "id": 0,
- "avatar": "string",
- "display_name": "string",
- "info": {
- "work": [
- {
- "department_id": "string",
- "department": "string",
- "role_id": "string",
- "title": "string",
- "employee_code": "string"
}
]
}, - "members_count": 0,
- "members": [
- {
- "id": 0,
- "avatar": "string",
- "display_name": "string",
- "info": {
- "work": [
- {
- "department_id": "string",
- "department": "string",
- "role_id": "string",
- "title": "string"
}
]
}, - "members_count": 0
}
], - "is_director": true
}
}
Lấy thông tin quản lý của một thành viên cụ thể.
user_id required | string ID của thành viên |
{- "data": {
- "id": 0,
- "avatar": "string",
- "display_name": "string",
- "info": {
- "work": [
- {
- "department_id": "string",
- "department": "string",
- "role_id": "string",
- "title": "string",
- "employee_code": "string"
}
]
}, - "manager": {
- "id": 0,
- "avatar": "string",
- "display_name": "string",
- "info": {
- "work": [
- {
- "department_id": "string",
- "department": "string",
- "role_id": "string",
- "title": "string"
}
]
}, - "members_count": 0
}
}
}
Yêu cầu permission: read:list_chat_bot
Trường hợp sử dụng:
last_id | number Default: 0 Example: last_id=13623512356361325000 Id chat bot gần nhất |
length | number Default: 2 Example: length=10 Số lượng bot muốn lấy tính từ bot_id=last_id |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!",
- "data": [
- {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "webhook_url": ""
}
]
}
Yêu cầu permission: create:chat_bot
Trường hợp sử dụng:
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
name required | string Tên bot |
avatar required | string Ảnh đại diện bot |
{- "name": "bot",
}
{- "message": "Succeeded!",
- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "webhook_url": ""
}
}
Yêu cầu permission: dalete:chat_bot
Trường hợp sử dụng:
Note:
bot_id required | string Example: bot_id=5820985907745992000 Id của chat bot cần xóa |
x-gapo-openapi-key required | string Example: Workspace Admin API key |
{- "message": "Succeeded!"
}
Yêu cầu permission: update:chat_bot
Trường hợp sử dụng:
bot_id required | string Example: bot_id=5820985907745992000 Id của chat bot cần cập nhật |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
name required | string Tên bot |
avatar required | string Ảnh đại diện bot |
{- "name": "bot",
}
{- "message": "Succeeded!",
- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "webhook_url": ""
}
}
Yêu cầu permission: read:bot_info
Trường hợp sử dụng:
bot_id required | string Example: 16131251234146124000 Id chat bot muốn xem thông tin |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!",
- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "webhook_url": ""
}
}
Yêu cầu permission: read:list_bot_command
Trường hộp sử dụng:
Note:
bot_id required | string Example: bot_id=2.154613512351346e+21 Id chat bot muốn kiểm tra |
x-gapo-bot-token | string Example: 52135a32f12c42e6423b12cfd352 Token nhận được khi tạo chat bot hoặc có trong thông tin chi tiết của chat bot |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!",
- "data": [
- {
- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
]
}
Yêu cầu permission: create:bot_command
Trường hợp sử dụng:
Note:
bot_id required | string Example: bot_id=2.154613512351346e+21 Id của chat bot muốn thêm command |
x-gapo-bot-token | string Example: 52135a32f12c42e6423b12cfd352 Token nhận được khi tạo chat bot hoặc có trong thông tin chi tiết của chat bot |
x-gapo-openapi-key | string Example: workspace - xxxxxxxx Workspace Admin API key |
description | string Mô tả về câu lệnh của chat bot |
command required | string Cú pháp câu lệnh của chat bot |
response required | string Câu trả lời của chat bot khi nhận được command |
{- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
{- "message": "Succeeded!",
- "data": {
- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
}
Yêu cầu permission: update:bot_command
Trường hợp sử dụng:
Note:
bot_id required | string Example: bot_id=2.154613512351346e+21 Id của chat bot cần cập nhật |
cmd required | string Example: cmd=ping Command cần cập nhật |
x-gapo-bot-token | string Example: 52135a32f12c42e6423b12cfd352 Token nhận được lúc tạo chat bot hoặc có trong thông tin chi tiết của chat bot |
x-gapo-openapi-key | string Example: workspace - xxxxxxxx Workspace Admin API key |
description | string Mô tả về câu lệnh |
response required | string Response tương ứng cho command |
{- "description": "",
- "response": "example_response"
}
{- "message": "Succeeded!",
- "data": {
- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
}
Yêu cầu permission: delete:bot_command
Trường hợp sử dụng:
Note:
bot_id required | string Example: bot_id=2.154613512351346e+21 Id chat bot muốn xóa bớt command |
cmd required | string Example: cmd=ping Command cần xóa |
x-gapo-bot-token | string Example: 52135a32f12c42e6423b12cfd352 Token nhận được lúc tạo chat bot hoặc có trong thông tin chi tiết của chat bot |
x-gapo-openapi-key | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!"
}
last_id | integer (Last Id) Default: 0 Id bot gần nhất |
length | number (Length) ( 1 .. 11 ] Default: 2 Số lượng bot muốn lấy tính từ bot(bot_id = last_id) |
{- "data": [
- {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "creator_type": "user",
- "show_welcome_msg": true,
- "welcome_msg": "Chào mừng bạn đã tham gia workspace",
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "receive_all_msg": true
}
], - "links": {
- "next": "?last_id=5820988421969205014"
}
}
Người dùng tạo mới bot
name required | string (Name) Tên bot |
avatar required | string (Avatar) Ảnh đại diện bot |
{- "name": "bot",
}
{- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "creator_type": "user",
- "show_welcome_msg": true,
- "welcome_msg": "Chào mừng bạn đã tham gia workspace",
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "receive_all_msg": true
}
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 Id bot |
{- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "creator_type": "user",
- "show_welcome_msg": true,
- "welcome_msg": "Chào mừng bạn đã tham gia workspace",
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "receive_all_msg": true
}
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 |
name required | string (Name) Tên bot |
avatar required | string (Avatar) Ảnh đại diện bot |
{- "name": "bot",
}
{- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "creator_type": "user",
- "show_welcome_msg": true,
- "welcome_msg": "Chào mừng bạn đã tham gia workspace",
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "receive_all_msg": true
}
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 Id bot |
{- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "creator_type": "user",
- "show_welcome_msg": true,
- "welcome_msg": "Chào mừng bạn đã tham gia workspace",
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "receive_all_msg": true
}
}
source_thread_id | integer Mã cuộc trò chuyện gốc |
source_message_ids | Array of arrays Danh sách mã tin nhắn muốn lưu |
{- "source_thread_id": 1231231,
- "source_message_ids": [
- 1,
- 2
]
}
{- "thread_id": 1231233
}
Authorization required | string (Authorization) Example: Bot 58210300580380:5430f06ae1e14fd1b75e820bd14302c2 |
partner_id | string (Partner Id) Gửi message đến user (user_id = partner_id) với cuộc trò chuyện 1-1 |
collab_id | string ID cuả collab mà bot muốn gửi đến |
thread_id | integer (Thread Id) Gửi message đến thread (id = thread_id) |
object (BotMessage) |
{- "partner_id": 123123,
- "collab_id": 6982807365109850000,
- "thread_id": 123122,
- "message": {
- "type": "text",
- "text": "string"
}
}
{- "data": {
- "event_id": "cf8aa7f1-3f39-4b10-a066-dfbde3d94daf"
}
}
bot_id required | integer Example: 5820985907745992000 id của bot |
{- "data": [
- {
- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
]
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 Id bot |
description | string (description) Mô tả cho bot command |
response | string (response) Nội dung sẽ trả về tương ứng với câu lệnh |
command | string (command) Câu lệnh |
object (Attach) |
{- "description": "Ping command",
- "response": "pong",
- "command": "ping",
- "attach": {
- "type": "text",
- "media": [
- "image-1 123123123"
], - "metadata": {
- "image_information": [
- {
- "type": "gif",
- "size": 40000000,
- "source": "aws",
- "quality": "unknown",
- "id": "cf8aa7f1-3f39-4b10-a066-dfbde3d94daf"
}
], - "image_thumb": [
- {
- "width": 2000,
- "height": 2000
}
], - "mentions": [
- {
- "target": "all",
- "offset": 0,
- "length": 10
}
]
}, - "payload": {
- "allow_add_choice": 1,
- "incognito": 0,
- "allow_multiple_choice": 12,
- "title": "Hay chon ai la nguoi dep trai",
- "end_at": 12312312321,
- "votes": [
- {
- "title": "ban biet Quang dep trai chu"
}
]
}
}
}
{- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 Id bot |
cmd required | string (Command) Example: ping command |
description | string (description) Mô tả cho bot command |
response | string (response) Nội dung sẽ trả về tương ứng với câu lệnh |
object (Attach) |
{- "description": "Ping command",
- "response": "pong",
- "attach": {
- "type": "text",
- "media": [
- "image-1 123123123"
], - "metadata": {
- "image_information": [
- {
- "type": "gif",
- "size": 40000000,
- "source": "aws",
- "quality": "unknown",
- "id": "cf8aa7f1-3f39-4b10-a066-dfbde3d94daf"
}
], - "image_thumb": [
- {
- "width": 2000,
- "height": 2000
}
], - "mentions": [
- {
- "target": "all",
- "offset": 0,
- "length": 10
}
]
}, - "payload": {
- "allow_add_choice": 1,
- "incognito": 0,
- "allow_multiple_choice": 12,
- "title": "Hay chon ai la nguoi dep trai",
- "end_at": 12312312321,
- "votes": [
- {
- "title": "ban biet Quang dep trai chu"
}
]
}
}
}
{- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
collab_id | string ID cuả collab mà bot đang ở trong đó |
thread_id | integer ID của thread mà bot đang ở trong đó |
message_id | integer ID message muốn tạo sub thread |
bot_id required | integer ID của bot |
required | object Body của tin nhắn, xem chi tiết tại Chat service |
receiver_id | integer ID của user mà bot muốn gửi tin nhắn đến |
{- "collab_id": 6982807365109850000,
- "thread_id": 0,
- "message_id": 0,
- "bot_id": 5821033660159239000,
- "body": {
- "type": "text",
- "is_markdown_text": true,
- "text": "Noi dung tin nhan",
- "media": [
- "string"
], - "metadata": { }
}, - "receiver_id": 0
}
{- "data": {
- "event_id": "cf8aa7f1-3f39-4b10-a066-dfbde3d94daf"
}
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 Id bot |
{- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "creator_type": "user",
- "show_welcome_msg": true,
- "welcome_msg": "Chào mừng bạn đã tham gia workspace",
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "receive_all_msg": true
}
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 |
name required | string (Name) Tên bot |
avatar required | string (Avatar) Ảnh đại diện bot |
{- "name": "bot",
}
{- "data": {
- "id": 5820985907745992000,
- "name": "Meeting bot",
- "creator_id": 1743371899,
- "creator_type": "user",
- "show_welcome_msg": true,
- "welcome_msg": "Chào mừng bạn đã tham gia workspace",
- "token": "eddb96a19c724b939582c5fe4951c7a1",
- "created_at": 1635136870000,
- "avatar": "",
- "receive_all_msg": true
}
}
bot_id required | integer Example: 5820985907745992000 id của bot |
{- "data": [
- {
- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
]
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 Id bot |
description | string (description) Mô tả cho bot command |
response | string (response) Nội dung sẽ trả về tương ứng với câu lệnh |
command | string (command) Câu lệnh |
object (Attach) |
{- "description": "Ping command",
- "response": "pong",
- "command": "ping",
- "attach": {
- "type": "text",
- "media": [
- "image-1 123123123"
], - "metadata": {
- "image_information": [
- {
- "type": "gif",
- "size": 40000000,
- "source": "aws",
- "quality": "unknown",
- "id": "cf8aa7f1-3f39-4b10-a066-dfbde3d94daf"
}
], - "image_thumb": [
- {
- "width": 2000,
- "height": 2000
}
], - "mentions": [
- {
- "target": "all",
- "offset": 0,
- "length": 10
}
]
}, - "payload": {
- "allow_add_choice": 1,
- "incognito": 0,
- "allow_multiple_choice": 12,
- "title": "Hay chon ai la nguoi dep trai",
- "end_at": 12312312321,
- "votes": [
- {
- "title": "ban biet Quang dep trai chu"
}
]
}
}
}
{- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
bot_id required | integer (Bot Id) Example: 5820985907745992000 Id bot |
cmd required | string (Command) Example: ping command |
description | string (description) Mô tả cho bot command |
response | string (response) Nội dung sẽ trả về tương ứng với câu lệnh |
object (Attach) |
{- "description": "Ping command",
- "response": "pong",
- "attach": {
- "type": "text",
- "media": [
- "image-1 123123123"
], - "metadata": {
- "image_information": [
- {
- "type": "gif",
- "size": 40000000,
- "source": "aws",
- "quality": "unknown",
- "id": "cf8aa7f1-3f39-4b10-a066-dfbde3d94daf"
}
], - "image_thumb": [
- {
- "width": 2000,
- "height": 2000
}
], - "mentions": [
- {
- "target": "all",
- "offset": 0,
- "length": 10
}
]
}, - "payload": {
- "allow_add_choice": 1,
- "incognito": 0,
- "allow_multiple_choice": 12,
- "title": "Hay chon ai la nguoi dep trai",
- "end_at": 12312312321,
- "votes": [
- {
- "title": "ban biet Quang dep trai chu"
}
]
}
}
}
{- "description": "Mô tả câu lệnh",
- "command": "example_command",
- "response": "example_response"
}
Yêu cầu permission: read:list_post hoặc sudo:workspace
Trường hợp sử dụng:
limit | number <= 50 Default: 10 Số lượng bài viết tối đa trong một lần gọi API. Giá trị mặc định là 10, tối đa là 50. |
starting_after | string Cursor để lấy trang tiếp theo, lấy từ trường next trong response trước đó |
ending_before | string Cursor để lấy trang trước đó, lấy từ trường prev trong response trước đó |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API Key |
{- "message": "Succeeded!",
- "data": [
- {
- "id": "string",
- "content": "string",
- "type": 0,
- "privacy": 0,
- "status": 0,
- "publish_at": 0,
- "target": "string",
- "mention": { },
- "content_obj": {
- "text": "string",
- "type": "string",
- "links": [
- { }
], - "phone_numbers": [
- { }
], - "hashtags": [
- { }
], - "emails": [
- { }
]
}, - "workspace_id": "string",
- "user_id": "string",
- "attachments": [
- { }
], - "content_rtf": 0,
- "content_type": "string",
- "counts": {
- "comment_count": 0,
- "comment_count_without_reply": 0,
- "react_count": 0,
- "seen_count": 0,
- "share_count": 0,
- "view_count": 0
}, - "created_at": 0,
- "is_announcement": true,
- "data_source": 0
}
], - "links": {
- "next": "starting_after=WyI2NTc3NTU2OTkwMzcxMjM1ODQiXQ&limit=10",
- "prev": "ending_before=WyI2NTg1NDgwNjc5MDkyMjM0MjQiXQ&limit=10"
}
}
Yêu cầu permission: create:post hoặc sudo:workspace
Trường hợp sử dụng:
user_id required | string Example: user_id=395658491 ID của người dùng muốn tạo bài viết |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API Key |
content-type | string Example: application/json |
content required | string Nội dung bài viết |
target required | string Nơi đăng bài viết:
|
Array of objects (PostMedia) File media đính kèm trong bài viết | |
mention | Array of numbers User id của những người muốn gắn tag trong bài viết |
privacy required | number Enum: 2 3 4 5 Quyền riêng tư của bài viết
|
content_rtf | integer Default: 0 Enum: 0 1 Đánh dấu nội dung bài viết theo định dạng markdown
|
{- "content": "Chào ngày mới",
- "target": "user:1238456209",
- "media": [
- {
- "id": "20cfd676-af68-42f7-9ada-819640f44553",
- "file_type": "jpeg",
- "width": 1080,
- "height": 768,
- "duration": "",
- "size": 74958,
- "name": "",
- "type": "image"
}
], - "mention": [ ],
- "privacy": 5,
- "content_rtf": 0
}
{- "message": "Succeeded!",
- "data": {
- "id": "641443622864199680",
- "content": "Chào ngày mới",
- "content_rtf": 0,
- "target": "user:1238456209",
- "privacy": 5,
- "mention": [ ],
- "created_at": "1667960378",
- "updated_at": "1667960378"
}
}
Yêu cầu permission: create:comment hoặc sudo:workspace
Trường hợp sử dụng:
user_id required | string Example: user_id=395658491 ID của người dùng muốn tạo bình luận |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API Key |
content-type | string Example: application/json |
id | string |
target_id required | string Id của đối tượng được bình luận |
target_type required | string Enum: "post" "media" Loại đối được được bình luận |
parent_id | string Id Parent của bình luận (bình luận A trả lời bình luận B thì B là parent của A) |
required | object Thông tin tác giả bình luận |
text | string Nội dung của bình luận |
Array of objects Danh sách người được nhắc đến trong bình luận | |
Array of objects (CommentMedia) Danh sách tệp đính kèm | |
object (CommentSticker) Sticker trong bình luận | |
object (CommentLink) Đường dẫn đính kèm trong bình luận | |
type | number Enum: 1 2 3 5 Loại bình luận
|
status | number Enum: 1 2 3 Trạng thái của bình luận
|
{- "id": "string",
- "target_id": 132453267,
- "target_type": "post",
- "parent_id": "",
- "comment_as": {
- "author_type": "user",
- "author_id": 123553266
}, - "text": "Xin chào",
- "mentions": [ ],
- "medias": [ ],
- "sticker": {
- "type": "sticker",
- "sticker_id": 1262734,
}, - "link": {
- "type": "link",
- "title": "Tài liệu api",
- "thumb": {
- "type": "image",
- "width": 1080,
- "height": 768
}
}, - "type": 1,
- "status": 2
}
{- "target_id": 132453267,
- "target_type": "post",
- "parent_id": "",
- "comment_as": {
- "author_type": "user",
- "author_id": 123553266
}, - "text": "Xin chào",
- "mentions": [ ],
- "medias": [ ],
- "sticker": {
- "type": "sticker",
- "sticker_id": 1262734,
}, - "link": {
- "type": "link",
- "title": "Tài liệu api",
- "thumb": {
- "type": "image",
- "width": 1080,
- "height": 768
}
}, - "type": 1,
- "status": 2,
- "comments": [ ],
- "reply_count": 0,
- "react_count": {
- "react_type_1": 0,
- "react_type_2": 0,
- "react_type_3": 0,
- "react_type_4": 0,
- "react_type_5": 0
}, - "total_react": 0,
- "user": {
- "user_id": "string",
- "display_name": "string",
- "full_name": "string",
- "cover": "string",
- "avatar": "string",
- "gender": {
- "gender": 0,
- "privacy": 0
}, - "status": 0
}, - "page": {
- "page_id": "string",
- "created_at": 0,
- "last_update": 0,
- "title": "string",
- "alias": "string",
- "description": "string",
- "info": "string",
- "cover": "string",
- "avatar": "string",
- "status_verify": 0,
- "page_status": 0
}
}
Yêu cầu permission: read:list_comment hoặc sudo:workspace
Trường hợp sử dụng:
target_id required | string Example: target_id=657909946202994688 ID của đối tượng cần lấy danh sách bình luận |
target_type required | string Enum: "post" "media" Example: target_type=post Loại đối tượng cần lấy danh sách bình luận |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API Key |
{- "message": "Succeeded!",
- "data": [
- {
- "id": 1185748909529914400,
- "parent_id": 1185747399288708000,
- "creator": 1368101772,
- "content": "Bình luận nè!",
- "mentions": [
- {
- "id": 1861177368,
- "length": 17,
- "offset": 0
}
], - "type": 1,
- "response": [
- { }
], - "created_at": 1671521646
}
]
}
API này cho phép tạo một hoặc nhiều vùng miền mới trong hệ thống.
required | Array of objects |
{- "regions": [
- {
- "name": "string"
}
]
}
{- "message": "Vùng miền đã được tạo thành công",
- "data": [
- {
- "id": "string",
- "name": "string"
}
]
}
API này cho phép cập nhật thông tin của một vùng miền cụ thể trong hệ thống.
region_id required | string ID của vùng miền cần cập nhật |
name required | string Tên mới của vùng miền |
{- "name": "string"
}
{- "message": "Vùng miền đã được cập nhật thành công",
- "data": {
- "id": "string",
- "name": "string"
}
}
API này cho phép xóa một người dùng cụ thể khỏi vùng miền trong hệ thống.
region_id required | string ID của vùng miền |
user_id required | string ID của người dùng cần xóa khỏi vùng miền |
{- "message": "Người dùng đã được xóa khỏi vùng miền thành công"
}
Yêu cầu permission: create:survey hoặc sudo:workspace
Trường hợp sử dụng:
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
title required | string Tiêu đề khảo sát |
des | string Mô tả khảo sát |
to | Array of integers Danh sách ID người dùng cần khảo sát |
to_department_ids | Array of strings Danh sách ID phòng ban cần khảo sát |
to_role_ids | Array of strings Danh sách ID chức vụ cần khảo sát |
to_thread_ids | Array of strings Danh sách ID nhóm chat cần khảo sát |
required | Array of objects non-empty Danh sách câu hỏi khảo sát |
start_date | integer Thời gian bắt đầu khảo sát (timestamp) |
status | integer Enum: 1 -1 Trạng thái khảo sát: 1 - running, -1 - pause |
type required | integer Enum: 1 2 Loại khảo sát: 1 - Công khai, 2 - Riêng tư |
sharing_level | integer Enum: 1 2 Mức độ chia sẻ: 1 - Công khai trong workspace, 2 - Công khai cross workspace |
required | object |
incognito_mode | boolean Chế độ ẩn danh |
question_draft_id | string ID bản nháp câu hỏi |
banner | object Thông tin banner khảo sát |
owner_ids | Array of integers <= 1 items Danh sách ID chủ sở hữu khảo sát |
editor_ids | Array of integers Danh sách ID người có quyền chỉnh sửa khảo sát |
{- "title": "Khảo sát sự hài lòng nhân viên",
- "des": "Khảo sát để hiểu mức độ hài lòng của nhân viên với môi trường làm việc",
- "to": [
- 123,
- 456,
- 789
], - "to_department_ids": [
- "dept1",
- "dept2"
], - "to_role_ids": [
- "role1",
- "role2"
], - "to_thread_ids": [
- "thread1",
- "thread2"
], - "questions": [
- {
- "question": "Câu hỏi không có tiêu đề",
- "type": "select",
- "config": {
- "required": false,
- "answers": [
- {
- "content": "Tùy chọn 1"
}, - {
- "content": "Tùy chọn 2"
}
]
}
}
], - "start_date": 1640995200,
- "status": 1,
- "type": 2,
- "sharing_level": 1,
- "schedule": {
- "type": "Monthly",
- "value": [
- 0
], - "hour": 0,
- "minute": 0,
- "remind_before": [
- -300000
]
}, - "incognito_mode": false,
- "question_draft_id": "string",
- "banner": { },
- "owner_ids": [
- 123
], - "editor_ids": [
- 456,
- 789
]
}
{- "message": "Succeeded!",
- "data": {
- "id": "survey_123456"
}
}
Yêu cầu permission: read:survey hoặc sudo:workspace
Trường hợp sử dụng:
id required | string Example: survey_123456 ID của khảo sát |
event_time | integer Example: event_time=1640995200 Thời gian sự kiện (timestamp) |
question_version | integer Example: question_version=1 Phiên bản câu hỏi |
num_of_attendees | integer Example: num_of_attendees=100 Số lượng người tham gia |
fields | Array of strings Items Enum: "_id" "title" "des" "des_object" "to" "answer_ids" "workspace_ids" "status" "questions" "start_date" "schedule" "creator_id" "created_at" "updated_at" "event_time" "next_time" "creator" "to_users" "count_to" "count_answers" "count_questions" "type" "incognito_mode" "sharing_level" "owner_ids" "editor_ids" "question_version" "to_user_ids" "answer_ids_after_ques_changed" Example: fields=_id&fields=title&fields=questions&fields=count_answers Danh sách các trường cần lấy |
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
{- "message": "ok",
- "data": {
- "_id": "survey_123456",
- "title": "Khảo sát sự hài lòng nhân viên",
- "des": "Khảo sát để hiểu mức độ hài lòng của nhân viên",
- "questions": [
- { }
], - "count_answers": 50,
- "count_questions": 5,
- "status": 1,
- "created_at": "2024-01-01T00:00:00Z"
}
}
Yêu cầu permission: update:survey hoặc sudo:workspace
Trường hợp sử dụng:
id required | string Example: survey_123456 ID của khảo sát cần cập nhật |
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
title | string Tiêu đề khảo sát |
des | string Mô tả khảo sát |
to | Array of integers Danh sách ID người dùng cần khảo sát (thay thế hoàn toàn) |
to_add | Array of integers Danh sách ID người dùng cần thêm vào khảo sát |
to_remove | Array of integers Danh sách ID người dùng cần loại bỏ khỏi khảo sát |
to_department_ids | Array of strings Danh sách ID phòng ban cần khảo sát (thay thế hoàn toàn) |
to_department_ids_remove | Array of strings Danh sách ID phòng ban cần loại bỏ khỏi khảo sát |
to_role_ids | Array of strings Danh sách ID chức vụ cần khảo sát (thay thế hoàn toàn) |
to_role_ids_remove | Array of strings Danh sách ID chức vụ cần loại bỏ khỏi khảo sát |
to_thread_ids | Array of strings Danh sách ID nhóm chat cần khảo sát (thay thế hoàn toàn) |
to_thread_ids_remove | Array of strings Danh sách ID nhóm chat cần loại bỏ khỏi khảo sát |
Array of objects non-empty Danh sách câu hỏi khảo sát | |
start_date | integer Thời gian bắt đầu khảo sát (timestamp) |
status | integer Enum: 1 -1 Trạng thái khảo sát: 1 - running, -1 - pause |
type | integer Enum: 1 2 Loại khảo sát: 1 - Công khai, 2 - Riêng tư |
sharing_level | integer Enum: 1 2 Mức độ chia sẻ: 1 - Công khai trong workspace, 2 - Công khai cross workspace |
object | |
incognito_mode | boolean Chế độ ẩn danh |
banner | object Thông tin banner khảo sát |
owner_ids | Array of integers Danh sách ID chủ sở hữu khảo sát |
editor_ids | Array of integers Danh sách ID người có quyền chỉnh sửa khảo sát |
{- "title": "Khảo sát sự hài lòng nhân viên (Cập nhật)",
- "des": "string",
- "to": [
- 0
], - "to_add": [
- 101,
- 102
], - "to_remove": [
- 103,
- 104
], - "to_department_ids": [
- "string"
], - "to_department_ids_remove": [
- "string"
], - "to_role_ids": [
- "string"
], - "to_role_ids_remove": [
- "string"
], - "to_thread_ids": [
- "string"
], - "to_thread_ids_remove": [
- "string"
], - "questions": [
- {
- "question": "Câu hỏi không có tiêu đề",
- "type": "select",
- "config": {
- "required": false,
- "answers": [
- {
- "content": "Tùy chọn 1"
}, - {
- "content": "Tùy chọn 2"
}
]
}
}
], - "start_date": 0,
- "status": 1,
- "type": 1,
- "sharing_level": 1,
- "schedule": {
- "type": "Monthly",
- "value": [
- 0
], - "hour": 0,
- "minute": 0,
- "remind_before": [
- -3600000
]
}, - "incognito_mode": true,
- "banner": { },
- "owner_ids": [
- 0
], - "editor_ids": [
- 0
]
}
{- "message": "Succeeded!",
- "data": {
- "id": "survey_123456"
}
}
Yêu cầu permission: export:survey_answer hoặc sudo:workspace
Trường hợp sử dụng:
Lưu ý: API này hiện đang trong quá trình phát triển và chỉ trả về message xác nhận.
question_collection_id required | string Example: question_collection_id=survey_123456 ID của khảo sát cần xuất kết quả |
event_time required | integer Example: event_time=1640995200 Thời gian sự kiện khảo sát (timestamp) |
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
{- "message": "ok"
}
Yêu cầu permission: create:survey_template hoặc sudo:workspace
Trường hợp sử dụng:
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
question_collection_id | string ID khảo sát gốc (nếu tạo template từ khảo sát có sẵn) |
question_draft_id | string ID bản nháp câu hỏi |
title | string Tiêu đề mẫu khảo sát |
des | string Mô tả mẫu khảo sát |
Array of objects non-empty Danh sách câu hỏi mẫu | |
is_public | boolean Mẫu công khai hay riêng tư |
creator_id required | integer ID người tạo mẫu |
{- "question_collection_id": "survey_123456",
- "question_draft_id": "draft_123456",
- "title": "Mẫu khảo sát hài lòng",
- "des": "Mẫu khảo sát chuẩn cho đánh giá sự hài lòng",
- "questions": [
- {
- "question": "Bạn có hài lòng với môi trường làm việc hiện tại?",
- "type": "select",
- "config": {
- "required": true,
- "answers": [
- {
- "content": "Rất hài lòng"
}
]
}
}
], - "is_public": false,
- "creator_id": 123
}
{- "message": "ok",
- "data": {
- "_id": "template_123456",
- "title": "Mẫu khảo sát hài lòng",
- "created_at": "2024-01-01T00:00:00Z"
}
}
Yêu cầu permission: read:survey_template hoặc sudo:workspace
Trường hợp sử dụng:
workspace_id required | string Example: workspace_id=workspace_123 ID workspace |
source | integer Enum: 1 2 Example: source=1 Nguồn mẫu: 1 - Workspace, 2 - Public |
is_public | boolean Lọc mẫu công khai |
page | integer >= 1 Default: 1 Example: page=1 Số trang |
limit | integer <= 100 Default: 10 Example: limit=10 Số lượng mẫu trên mỗi trang |
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
{- "message": "ok",
- "data": {
- "templates": [
- {
- "_id": "template_123456",
- "title": "Mẫu khảo sát hài lòng",
- "des": "Mẫu khảo sát chuẩn",
- "is_public": false,
- "created_at": "2024-01-01T00:00:00Z"
}
], - "pagination": {
- "page": 1,
- "limit": 10,
- "total": 50
}
}
}
Yêu cầu permission: read:survey_template hoặc sudo:workspace
Trường hợp sử dụng:
id required | string Example: template_123456 ID của mẫu khảo sát |
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
{- "message": "ok",
- "data": {
- "_id": "template_123456",
- "title": "Mẫu khảo sát hài lòng",
- "des": "Mẫu khảo sát chuẩn",
- "questions": [
- {
- "question": "Bạn có hài lòng với môi trường làm việc?",
- "type": "select",
- "config": { }
}
], - "is_public": false,
- "created_at": "2024-01-01T00:00:00Z"
}
}
Yêu cầu permission: update:survey_template hoặc sudo:workspace
Trường hợp sử dụng:
id required | string Example: template_123456 ID của mẫu khảo sát |
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
title | string Tiêu đề mẫu khảo sát |
des | string Mô tả mẫu khảo sát |
Array of objects non-empty Danh sách câu hỏi mẫu | |
incognito_mode | boolean Chế độ ẩn danh |
creator_id required | integer ID người cập nhật |
{- "title": "Mẫu khảo sát hài lòng cập nhật",
- "des": "Mẫu khảo sát được cập nhật",
- "questions": [
- {
- "question": "Bạn có hài lòng với môi trường làm việc hiện tại?",
- "type": "select",
- "config": {
- "required": true,
- "answers": [
- {
- "content": "Rất hài lòng"
}
]
}
}
], - "incognito_mode": false,
- "creator_id": 123
}
{- "message": "ok",
- "data": {
- "_id": "template_123456",
- "title": "Mẫu khảo sát hài lòng cập nhật",
- "updated_at": "2024-01-01T00:00:00Z"
}
}
Yêu cầu permission: remind:survey hoặc sudo:workspace
Trường hợp sử dụng:
id required | string Example: survey_123456 ID của khảo sát |
x-gapo-openapi-key required | string Example: workspace-xxxxxxxx Workspace Admin API Key |
{- "message": "ok",
- "data": {
- "survey_id": "survey_123456",
- "reminded_count": 25,
- "status": "reminded",
- "reminded_at": "2024-01-01T00:00:00Z"
}
}
Yêu cầu permission: read:ticket hoặc sudo:workspace
limit | integer Số lượng ticket tối đa trong một lần gọi API. Giá trị mặc định là 10, tối đa là 100. |
prev | string Token phân trang để truy xuất trang trước đó. Token này có thể lấy từ trường link.prev trong phản hồi của API |
next | string Token phân trang để truy xuất trang tiếp theo. Token này có thể lấy từ trường link.next trong phản hồi của API. |
from_date | integer Example: from_date=1743663232000 Thời gian bắt đầu. unix timestamp in milliseconds |
to_date | integer Thời gian kết thúc. unix timestamp in milliseconds |
ticket_statuses | integer Enum: {"2":"Đang xử lý"} {"3":"On-Hold"} {"4":"Đã hủy"} {"5":"Đã xử lý"} {"6":"Đã đóng"} {"7":"Đã xoá"} {"8":"Spam"} Trạng thái của ticket |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API Key |
{- "data": [
- {
- "code": "string",
- "created_at": 0,
- "created_by": 0,
- "id": 0,
- "priority": 1,
- "status": 5,
- "title": "string",
- "workflow_id": 0,
- "workspace_id": "string",
- "files": [
- {
- "file_link": "string",
- "file_type": "string",
- "name": "string",
- "size": 0,
- "type": "string"
}
]
}
], - "link": {
- "next": "string",
- "prev": "string"
}
}
Yêu cầu permission: read:ticket hoặc sudo:workspace
Giới hạn: 1 request mỗi 10 giây, tối đa 10 requests/phút
Trường hợp sử dụng:
ticket_id required | string Example: 1234567890 Id của ticket cần download |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API Key |
{- "message": "Limit phải là kiểu số"
}
Yêu cầu permission: read:ticket hoặc sudo:workspace
ticket_id required | string Example: 1234567890 Id của ticket cần download |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API Key |
{- "data": {
- "closed_at": 0,
- "code": "string",
- "created_at": 0,
- "created_by": 0,
- "creator": {
- "avatar": "string",
- "avatar_thumb_pattern": "string",
- "display_name": "string",
- "email": "string",
- "id": "0",
- "phone_number": "string",
- "user_id": 0
}, - "deadline_ts": 0,
- "deleted_at": 0,
- "field_values": [
- {
- "info": {
- "hint": "string",
- "id": 0,
- "parent_id": 0,
- "title": "string",
- "type": 1,
- "version": 0,
- "workflow_id": 0,
- "workspace_id": "string"
}, - "field_id": 0,
- "ticket_id": 0,
- "unit_id": 0,
- "value": null,
- "workspace_id": "string"
}
], - "first_response_at": 0,
- "id": 0,
- "is_private": true,
- "nodes": [
- {
- "actual_first_response_after_sec": 0,
- "actual_processing_duration_sec": 0,
- "additional_request_at": 0,
- "additional_request_in": 0,
- "assignee_id": 0,
- "created_at": 0,
- "deadline_first_response_at": 0,
- "deadline_ts": 0,
- "id": 0,
- "no_first_response_yet": true,
- "node_id": 0,
- "on_hold_request_at": 0,
- "on_hold_request_in": 0,
- "option": {
- "assignee_type": 0,
- "assigning_method_type": 0,
- "description": "string",
- "must_done_all_prev_nodes": true,
- "name": "string",
- "requester_is_approver_action_type": 0,
- "reserve_assignee_type": 0
}, - "processed_at": 0,
- "processed_in": 0,
- "response_at": 0,
- "responsed_in": 0,
- "sla": {
- "first_response": {
- "type": 1,
- "value": 0
}, - "resolve": {
- "type": 1,
- "value": 0
}, - "type": 1
}, - "started_at": 0,
- "status": 1,
- "ticket_id": 0,
- "type": 1,
- "updated_at": 0,
- "updated_by": 0,
- "workspace_id": "string"
}
], - "priority": 1,
- "rating_point": 0,
- "reopened": 0,
- "review": "string",
- "sla": {
- "first_response": {
- "type": 1,
- "value": 0
}, - "resolve": {
- "type": 1,
- "value": 0
}, - "type": 1
}, - "started_at": 0,
- "status": 5,
- "title": "string",
- "updated_at": 0,
- "updated_by": 0,
- "workflow": {
- "description": "string",
- "id": 0,
- "name": "string",
- "prefix_id": 0,
- "workflow_group_id": 0,
- "workspace_id": "string"
}, - "workflow_id": 0,
- "workspace_id": "string"
}
}
Yêu cầu permission: read:list_group_post
Trường hợp sử dụng:
group_id required | string Example: group_id=138316463156868465 Id group mục tiêu |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "message": "Succeeded!",
- "data": [
- {
- "id": "string",
- "creator": 0,
- "created_at": 0,
- "group_id": "string",
- "content": "string",
- "attachments": [
- { }
], - "comments": [
- {
- "id": "string",
- "content": "string",
- "creator": 0,
- "created_at": 0,
- "sticker": { },
- "media": { },
- "attachment": { }
}
]
}
]
}
Yêu cầu perrmission: read:list_post
Trường hợp sử dụng:
hashtag required | string Example: hashtag=News Hashtag cần tìm |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Admin Workpsace api key |
{- "message": "Succeeded!",
- "data": [
- {
- "post_id": 642377465302432800,
- "user_id": 172387344,
- "user_name": "Tổ tin tức",
- "content": "Tin mới trong ngày ....",
- "hashtags": [
- "news",
- "bantin"
], - "created_at": 1671522704,
- "comment_count": 4,
- "react_count": 17,
- "share_count": 4,
- "seen_count": 20
}
]
}
Yêu cầu permission: query:user_info
Trường hợp sử dụng:
phone_number | string Example: phone_number=843762123456 Số điện thoại đăng nhập của người dùng |
identifier_code | string Example: identifier_code=3452345a12b2 Mã định danh đăng nhập của người dùng |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
{- "data": {
- "user_id": 254251234
}
}
Yêu cầu permission: sudo:workspace
Trường hợp sử dụng:
Cách xác định id của nhóm chat:
Truy cập nhóm chat bằng trình duyệt web: Mở trình duyệt web trên máy tính của bạn (ví dụ: Chrome, Firefox, Edge, Safari). Đi đến nhóm chat GapoWork mà bạn muốn tìm ID.
Quan sát thanh địa chỉ (URL): Trên thanh địa chỉ ở phía trên cùng của trình duyệt. Bạn sẽ thấy một đường link (URL) có dạng tương tự như sau:
https://www.gapowork.vn/collab/7002630072340533288/chat
Trong đường link trên, ID của nhóm chat chính là (dãy số nằm ở giữa collab/
và /chat
): 7002630072340533288
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
emails | Array of strings Danh sách email trên GapoWork muốn thêm vào nhóm chat |
id | string id của nhóm chat |
user_ids | Array of integers Danh sách user_id trên GapoWork muốn thêm vào nhóm chat |
action_type | string Enum: "add" "remove" Hành động muốn thực hiện:
|
{- "emails": [
- "string"
], - "id": "0",
- "user_ids": [
- 0
], - "action_type": "add"
}
{- "message": "Succeeded!"
}
Yêu cầu permission: sudo:workspace
Trường hợp sử dụng:
Cách xác định id của group:
Truy cập Group bằng trình duyệt web: Mở trình duyệt web trên máy tính của bạn (ví dụ: Chrome, Firefox, Edge, Safari). Đi đến group GapoWork mà bạn muốn tìm ID.
Quan sát thanh địa chỉ (URL): Trên thanh địa chỉ ở phía trên cùng của trình duyệt. Bạn sẽ thấy một đường link (URL) có dạng tương tự như sau:
https://www.gapowork.vn/group/2386499952504047616
Trong đường link trên, ID của group chính là (dãy số nằm ở cuối cùng): 2386499952504047616
content-type | string Example: application/json |
x-gapo-openapi-key required | string Example: workspace - xxxxxxxx Workspace Admin API key |
emails | Array of strings Danh sách email trên GapoWork muốn thêm vào group |
id | string id gủa group |
user_ids | Array of integers Danh sách user_id trên GapoWork muốn thêm vào group |
action_type | string Enum: "add" "remove" Hành động muốn thực hiện:
|
{- "emails": [
- "string"
], - "id": "0",
- "user_ids": [
- 0
], - "action_type": "add"
}
{- "message": "Succeeded!"
}
Hãy liên hệ đến đội hỗ trợ của GapoWork để chúng tôi có thể giúp đỡ các vấn đề liên quan đến OpenAPI qua các kênh liên lạc sau:
Hotline: 1900 633 388
Email: hotro@gapo.com.vn
Văn phòng Hà Nội: Tầng M, toà B Golden Land, 275 Nguyễn Trãi, Thanh Xuân, Hà Nội.
Văn phòng Hồ Chí Minh: Tầng M, toà nhà IPC, 1489 Nguyễn Văn Linh, Tân Phong, Quận 7, Thành phố Hồ Chí Minh