Chat đa kênh
Gửi tin nhắn ra các kênh hội thoại (Zalo OA, …).
1 endpoint · base /api/v1/comm
Gửi tin nhắn vào một hội thoại đã có. Không gửi được vào hội thoại đã Resolved hoặc đang do bot xử lý.
Tool MCP:
send_zalo_messageScope: comm.conversations.handleAPI key / ứng dụngTham số
| Tham số | Kiểu | Vị trí | Bắt buộc | Mô tả |
|---|---|---|---|---|
Idempotency-Key Mới | string | header | không | Mã do bạn tự sinh cho MỖI thao tác ghi (vd UUID), tối đa 200 ký tự. Gửi lại cùng mã trong 24 giờ ⇒ nhận lại đúng kết quả lần đầu, không tạo bản ghi thứ hai. Cùng mã mà khác nội dung ⇒ 422. |
id | GUID | path | có | Id hội thoại |
type | string | body | có | Text, Image, File, Audio, Video, Sticker, Location, Product hoặc Contact |
content | string | body | không | Nội dung (với type = Text) |
clientId | string | body | không | Khoá chống gửi trùng (idempotency) |
Ví dụ
curl -X POST https://api.nextx.vn/api/v1/comm/conversations/<id>/messages \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Idempotency-Key: 7f3c2a90-…" \
-H "Content-Type: application/json" \
-d '{
"type": "...",
"content": "...",
"clientId": "..."
}'Ví dụ phản hồi
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"direction": "string",
"senderType": "string",
"senderName": "string",
"messageType": "string",
"content": "string",
"status": "string",
"attachments": [
{
"id": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"fileName": "string",
"fileSizeBytes": 0,
"mimeType": "string",
"storageKey": "string",
"downloadUrl": "string"
}
],
"sentAt": "2026-10-27T09:00:00+07:00",
"failureReason": "string",
"isInternal": false,
"productSnapshot": "string",
"reactions": [
{
"emoji": "string",
"actorType": "string",
"actorId": "string",
"createdAt": "2026-10-27T09:00:00+07:00"
}
],
"visibility": "string",
"facebookCommentId": "string",
"facebookParentCommentId": "string",
"buttons": [
{
"title": "string",
"url": "string"
}
],
"replyToMessageId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"replyToSnippet": "string",
"replyToSenderName": "string",
"senderAvatarUrl": "string",
"mentions": [
{
"uid": "string",
"offset": 0,
"length": 0,
"name": "string"
}
],
"metadata": "string",
"isRecalled": false,
"recalledAt": "2026-10-27T09:00:00+07:00",
"commentClusterId": "0199a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
"senderExternalId": "string",
"senderHandle": "string"
}