Skip to main content

Publish ZBS Template

This API helps you publish a Zalo Business Solution (ZBS) Template that has been created in the system to Zalo so it can be used to send messages to end users.

Usage flow:

  1. Create the template with the Create ZBS Template API — the response returns the template _id.
  2. Use that same _id as the template_id to call this API and publish the template to Zalo.
  3. You can look the template up again via the Get Template List or Get Template Detail APIs.

You need to provide template_id (the _id you received when creating the template) in the params to complete the publishing.


Endpoint

🔗Endpoint Staging
PATCH https://staging-manage.api.miniai.vn/api/external/zns-template/publish/<template_id>
Example
id : 6870b7eec2fd3b17da55be6d
🔗Endpoint Production
PATCH https://manage-api.miniap.vn/api/external/zns-template/publish/<template_id>

Prerequisites

Before registering, the template must satisfy the following conditions, otherwise the request returns a 400 error:

  • The template must be linked to an OA (oaId).
  • If imageType is logo: both the light logo (logoLight) and dark logo (logoDark) are required.
  • If imageType is image: at least one image in images is required.
  • Every parameter in params must have a technical type (techSetting) selected.

After a successful registration, the template moves to the PENDING_REVIEW status (awaiting Zalo approval).

Response

{
"message": "Success",
"data": {
"id": "68c8ede8e4fe66c9d2168054",
"status": "PENDING_REVIEW"
}
}