POST
WhatsappTemplates.Edit
Update an existing WhatsApp template. Send id plus only the fields to change. Dynamic variables can be resent as the simple dynamic_variables array.
Permissions
- User must be logged in with a valid bearer token.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
Updates a WhatsApp template row for this organization only.
Push Service
Pushes whatsapptemplates.updated to the current user/owner so connected settings UIs can refresh the template list.
Automation
No automation is run for this function.
Special Instructions
- Send the bearer token on protected calls with Authorization: Bearer YOUR TOKEN.
- Send parameters as POST body fields exactly as documented.
- Send date/time values in UTC Y-m-d H:i:s format when a date or datetime field is used.
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
idpost | int | 12 | Template id from WhatsappTemplates.List. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
template_idpost | int | 12 | Alias of id. |
namepost | string | welcome_customer_v2 | Update the template name. |
languagepost | string | en | Update the template language code. |
messagepost | string | Hello {{1}} | Update the template text. |
dynamic_variablespost | json array | ["name","phone"] | Replace the variable mapping for {{1}}, {{2}}, etc. |
namespacepost | string | project_or_namespace | Update provider namespace/project id. |
bird_template_versionpost | string | v2 | Update Bird template version. |
media_urlpost | url | https://files.biz1.co.il/file.pdf | Update the existing media URL. |
button_url_variablespost | json array | ["document_link"] | Update dynamic variables used in template button URLs. |
approvedpost | int | 1 | Update provider approval status. |
show_statuspost | int | 1 | Show or hide the template. |
templates_for_customerpost | int | 1 | Allow or block use for customer communication. |
use_to_send_documentspost | int | 1 | Allow or block use for document sending. |
documents_orderpost | int | 1 | Allow or block purchase/order documents. |
documents_tax_invoicespost | int | 1 | Allow or block tax invoices. |
documents_recieptpost | int | 1 | Allow or block receipts. |
documents_detail_orderpost | int | 1 | Allow or block detail orders. |
documents_newspaper_orderpost | int | 1 | Allow or block newspaper orders. |
documents_credit_invoicespost | int | 1 | Allow or block credit invoices. |
documents_proforma_invoicespost | int | 1 | Allow or block proforma invoices. |
documents_deliverypost | int | 1 | Allow or block delivery documents. |
documents_receipts_tax_invoicespost | int | 1 | Allow or block receipt tax invoices. |
documents_gr_irpost | int | 1 | Allow or block GR/IR invoices. |
documents_quotepost | int | 1 | Allow or block quotes/proposals. |
documents_donation_receiptpost | int | 1 | Allow or block donation receipts. |
dynamic_contentpost | int | 0 | Enable or disable dynamic content handling. |
providerpost | string | bird | Update WhatsApp provider. Alias of whatsApp_provider. |
Authentication
Send the bearer token returned by Login in the request header.
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/WhatsappTemplates.Edit",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"id": "12",
"message": "Hello {{1}}",
"dynamic_variables": "[\"name\"]"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/WhatsappTemplates.Edit",
"url_domain": "https:\/\/{domain}\/app\/WhatsappTemplates.Edit"
}Endpoint
POST /app/WhatsappTemplates.Edit
POST https://{user}.bull36.com/app/WhatsappTemplates.Edit
POST https://{domain}/app/WhatsappTemplates.EditSample Output
{
"success": 1,
"id": 12,
"message": "Record updated successfully.",
"automation_event": null,
"socket_event": "whatsapptemplates.updated"
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams({ id: '12', message: 'Hello {{1}}', dynamic_variables: JSON.stringify(['name']) });
const res = await fetch('/app/WhatsappTemplates.Edit', { method: 'POST', headers: { Authorization: 'Bearer ' + token }, body });
const data = await res.json();
console.log(data);Error Example
{
"success": "0",
"message": "Missing required parameter: id"
}