Gửi tin nhắn văn bản
Quyền cần có: Quyền gửi tin và thông báo qua OA
HTTP request
URL: https://zns.api.gobysend.com/api/follower/message/send
Method: POST
Content Type: application/json
Response Type: text/json
Example request
curl
-X POST
-H "Content-Type: application/json" -d '{
"message": {
"text": "string"
},
"recipient": {
"user_id": "string"
}
}' "https://zns.api.gobysend.com/api/follower/message/send"
Tham số header
Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả
Cấu trúc body của request
Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả
recipient
object
yes
Thông tin người nhận
message
object
yes
Nội dung cần gửi
Cấu trúc thuộc tính recipient
Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả
user_id
string
yes
ID của người dùng (nhận được thông qua API lấy thông tin người quan tâm, API lấy danh sách người quan tâm).
Cấu trúc thuộc tính message
Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả
text
string
yes
Nội dung văn bản muốn gửi cho người dùng
Giới hạn tối đa là 2.000 ký tự
Example respond
{
"data": {
"msg_id": "63ecf43f0df7dba892e6"
},
"error": 0,
"message": "Success"
}
Cấu trúc thuộc tính data
Thuộc tính
Kiểu dữ liệu
Mô tả
msg_id
string
ID của thông báo trên hệ thống Goby ZNS
English version:
HTTP request
URL: https://zns.api.gobysend.com/api/follower/message/send
Method: POST
Content Type: application/json
Response Type: text/json
Example request
curl
-X POST
-H "Content-Type: application/json" -d '{
"message": {
"text": "string"
},
"recipient": {
"user_id": "string"
}
}' "https://zns.api.gobysend.com/api/follower/message/send"
Header param
Param
Data type
Compulsory
Description
Request body structure
Param
Data type
Compulsory
Description
recipient
object
yes
Receiver's information
message
object
yes
Content to send
Recipient attribute structure
Param
Data type
Compulsory
Description
user_id
string
yes
User ID (received via API get follower information and follower list).
Message attribute structure
Param
Data type
Compulsory
Description
text
string
yes
Text content send to users Maximum limit is 2,000 characters
Example respond
{
"data": {
"msg_id": "63ecf43f0df7dba892e6"
},
"error": 0,
"message": "Success"
}
Data attribute structure
Atribute
Data type
Description
msg_id
string
Message's ID on GobyZNS system
Last updated