Skip to main content

Send ZBS Message by UID

This API lets you send a ZBS message to a user by their Zalo UID (instead of a phone number), using a ZBS template that has already been published and approved by Zalo.

info

shopId is resolved automatically from your API key — you do not need to pass it manually.


Endpoint

🔗Endpoint Staging
POST https://staging-manage.api.miniai.vn/api/external/zalo/zbs-uid/send-message
🔗Endpoint Production
POST https://manage-api.miniap.vn/api/external/zalo/zbs-uid/send-message

Prerequisites

  • templateId is the _id of the ZBS template in the system, and the template must already be published to Zalo.
  • The template must be linked to an OA and have a UID sending price (priceUID).
  • The shop wallet must have enough balance to cover the sending fee, otherwise the request returns a 400 error.

Request Body

FieldTypeRequiredDescription
userUIDstringYesThe recipient's Zalo UID.
templateIdstringYesThe _id of the published ZBS template in the system.
templateDataobjectYeskey-value (string) pairs matching the template parameters.
{
"userUID": "3812763771849273645",
"templateId": "68c8ee675f8f83fc813e7830",
"templateData": {
"customer_fullname": "Lê Quốc An",
"order_code": "M0WHXJVU9L",
"order_status": "Delivered"
}
}

Response

{
"error": 0,
"message": "Success",
"data": {
"message_id": "cfcd208495d565ef66e7dff9f98764da"
}
}