tumbuh.ai
tumbuh.ai Public API

Message templates


List message templates

GET
https://<domain-anda>
/api/v1/public/templates

Return the WhatsApp message templates on this workspace with their approval status.

Lists WhatsApp templates with their status, category and variable placeholders. Use it before sending outside the 24-hour messaging window, when only an APPROVED template will deliver. Read-only. Filter with status, category or whatsapp_phone_number_id.

List message templates › query Parameters

status
​string

Approval status, e.g. APPROVED. Only APPROVED templates can be sent.

Approval status, e.g. APPROVED. Only APPROVED templates can be sent.

category
​string

Template category, e.g. MARKETING or UTILITY.

Template category, e.g. MARKETING or UTILITY.

whatsapp_phone_number_id
​string

Restrict to templates on one number, id from channels.phoneNumbers.

Restrict to templates on one number, id from channels.phoneNumbers.

limit
​integer · min: 1 · max: 100

Rows to return, 1-100.

Rows to return, 1-100.

offset
​integer · min: 0 · max: 9007199254740991

Rows to skip before reading.

Rows to skip before reading.

List message templates › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Create a draft template

POST
https://<domain-anda>
/api/v1/public/templates

Save a new template as a local draft, not yet submitted to Meta.

Creates a local draft template record (status PENDING, no Meta id) in this workspace. It is NOT sent to Meta and cannot be used for sending until it is submitted (templates.submit) and approved. Use it to prepare wording. Placeholders must be {{1}}, {{2}} in sequence, and variables must hold one example value per placeholder. Answers 409 when the name and language already exist.

Create a draft template › Request Body

templateName
​string · required

Lowercase letters, digits and underscores only, max 512 characters.

category
​string · required

MARKETING, UTILITY or AUTHENTICATION.

content
​string · required

Body text. Use {{1}}, {{2}} for placeholders.

language
​string

Language code such as id or en_US. Defaults to en_US.

headerType
​string

TEXT, IMAGE, VIDEO or DOCUMENT.

headerContent
​string

Header text (max 60 chars) or a sample media URL/id. Required with headerType.

footerContent
​string

Footer text, at most 60 characters.

​object[]

Up to 3 QUICK_REPLY buttons and up to 2 URL/PHONE_NUMBER buttons.

variables
​string[]

One example value per body placeholder, in order. Required when content has placeholders.

Create a draft template › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Read one message template

GET
https://<domain-anda>
/api/v1/public/templates/{templateId}

Fetch a single WhatsApp template by id, with its body and variables.

Returns one template including its components, the variables it expects and its approval status. Use it after templates.list to learn exactly which parameters messages.send must supply. Read-only. Answers 404 when the id does not belong to this workspace.

Read one message template › path Parameters

templateId
​string · required

Template id from templates.list.

Template id from templates.list.

Read one message template › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Delete a template

DELETE
https://<domain-anda>
/api/v1/public/templates/{templateId}

Delete a template locally and at Meta.

Permanently deletes the template. When it was submitted to Meta it is also deleted there (a failure at Meta is ignored and the local record is still removed), and its variable mappings stop applying. Messages already sent are unaffected, but broadcasts or flows that reference it will fail. A deleted name may be blocked from reuse at Meta. Cannot be undone.

Delete a template › path Parameters

templateId
​string · required

Template id from templates.list.

Template id from templates.list.

Delete a template › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Edit a template that is not approved

PATCH
https://<domain-anda>
/api/v1/public/templates/{templateId}

Change the content of a draft, pending or rejected template.

Edits the body, header, footer or buttons of a template. Approved templates cannot be edited (400): create a new one with a new name instead. The edit is local only: it does not resubmit to Meta and does not change the approval status, so call templates.submit afterwards when the template has been rejected. Passing no headerType clears the header.

Edit a template that is not approved › path Parameters

templateId
​string · required

Template id from templates.list.

Template id from templates.list.

Edit a template that is not approved › Request Body optional

content
​string

New body text.

headerType
​string | null

TEXT, IMAGE, VIDEO or DOCUMENT. Omit or null to remove the header.

headerContent
​string | null

New header text or sample media.

footerContent
​string | null

New footer, at most 60 characters.

​object[]

Replacement button list.

Edit a template that is not approved › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Template delivery analytics

GET
https://<domain-anda>
/api/v1/public/templates/{templateId}/analytics

Delivery, read and failure rates for one template.

Returns the quality rating and the delivery, read and failure counts and rates for one template. Use it to judge whether a template performs before reusing it in a broadcast. Read-only. The counts are computed over the template's 100 most recent messages, not its whole history.

Template delivery analytics › path Parameters

templateId
​string · required

Template id from templates.list.

Template id from templates.list.

Template delivery analytics › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Preview a rendered template

POST
https://<domain-anda>
/api/v1/public/templates/render-preview

Render a template with variable values without sending anything.

Fills a stored template's header, body, footer and buttons with the values you give and returns the final text. Use it to check wording before messages.send or broadcasts.create. Sends nothing and changes nothing. Keys of variableValues are either variable-library ids (templateVariables.list) or the placeholder numbers "1", "2" of the template body.

Preview a rendered template › Request Body

templateName
​string · required

Template name from templates.list (template_name).

languageCode
​string · required

Template language code, e.g. id or en_US.

​object

Map of placeholder number or variable id to its value. Defaults to empty.

Preview a rendered template › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Validate template variable values

POST
https://<domain-anda>
/api/v1/public/templates/validate

Check values against the variable library's type rules before sending.

Validates the values you plan to send against the type rules of the named library variables (URL, currency, date and so on) and returns the errors per variable. Use it before messages.send or broadcasts.create. Sends nothing and changes nothing. Answers 404 when any listed variable id does not exist.

Validate template variable values › Request Body

variableIds
​string[] · minItems: 1 · required

Variable ids from templateVariables.list to validate, at least one.

​object · required

Map of variable id to the value you intend to send.

Validate template variable values › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Sync templates from Meta

POST
https://<domain-anda>
/api/v1/public/templates/sync

Pull the current templates and statuses from every connected WhatsApp account.

Calls Meta for each connected WhatsApp Business account and upserts the local template records: new ones are created, changed statuses updated, and local templates that no longer exist at Meta are removed. Use it when templates.list looks stale after an approval. It sends nothing to customers. Heavy: one Meta call per account.

Sync templates from Meta › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Submit a template to Meta

POST
https://<domain-anda>
/api/v1/public/templates/{templateId}/submit

Send a template to Meta for approval.

Submits the template to Meta for review. Practically irreversible: the template name is registered at Meta, a rejected or deleted name can be blocked from reuse for a period, and approved templates cannot be edited. Use it only when the wording is final (check templates.renderPreview first). Approval arrives later; read the status with templates.get or run templates.sync. Sends nothing to customers.

Submit a template to Meta › path Parameters

templateId
​string · required

Template id from templates.list.

Template id from templates.list.

Submit a template to Meta › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Send a test message of a template

POST
https://<domain-anda>
/api/v1/public/templates/{templateId}/send-test

Send one real WhatsApp message of an approved template to a test number.

Sends a REAL WhatsApp template message, without variable values, to the number you give. It is billed by Meta like any template conversation and cannot be recalled. Use it only to test your own device; to message a customer use messages.send. Only APPROVED templates, and only Indonesian numbers starting with +62, are accepted.

Send a test message of a template › path Parameters

templateId
​string · required

Template id from templates.list.

Template id from templates.list.

Send a test message of a template › Request Body

to
​string · required

Test number in international format starting with +62.

Send a test message of a template › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

List quick replies

GET
https://<domain-anda>
/api/v1/public/quick-replies

Return the workspace’s saved canned replies with their shortcuts.

Returns the quick replies the team has saved, each with its shortcut and text. Use it to answer in the workspace's own wording instead of inventing a phrasing. Read-only — sending the text is messages.send. Unlike WhatsApp templates these are internal text only, so they are not valid outside the 24-hour window. Paginated: follow meta.pagination.nextCursor until hasMore is false.

List quick replies › query Parameters

limit
​integer · min: 1 · max: 100

Rows to return, 1-100. Defaults to 25.

Rows to return, 1-100. Defaults to 25.

cursor
​string

The meta.pagination.nextCursor value from the previous call. Omit it to read the first page.

The meta.pagination.nextCursor value from the previous call. Omit it to read the first page.

categoryId
​string

Only this category, id from quickReplies.categories.

Only this category, id from quickReplies.categories.

search
​string

Text to look for in the title, shortcut or content.

Text to look for in the title, shortcut or content.

List quick replies › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Create a quick reply

POST
https://<domain-anda>
/api/v1/public/quick-replies

Save a new canned reply with a shortcut.

Creates a quick reply that every agent in the workspace can insert in the inbox by typing its shortcut. Writes the reply and sends nothing. Answers 409 when the shortcut is already taken.

Create a quick reply › Request Body

shortcut
​string · required

Unique shortcut, 1-50 characters, typed by agents to insert the reply.

title
​string · required

Label shown in the picker, 1-100 characters.

content
​string · required

The reply text, 1-4096 characters.

categoryId
​string | null

Category id from quickReplies.categories.

fileCenterFileId
​string | null

File to attach, id from quickReplies.attachments.

Create a quick reply › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Search quick replies

GET
https://<domain-anda>
/api/v1/public/quick-replies/search

Find quick replies matching a typed fragment, as the inbox autocomplete does.

Autocomplete-style search over quick-reply shortcuts and titles. Use it when you have a few words and want the matching canned replies. An empty q returns an empty list. Read-only. For a full filtered listing use quickReplies.list.

Search quick replies › query Parameters

q
​string · required

The fragment to search for. Required; empty returns nothing.

The fragment to search for. Required; empty returns nothing.

limit
​integer · min: 1 · max: 100

Rows to return, 1-100. Defaults to 25.

Rows to return, 1-100. Defaults to 25.

cursor
​string

The meta.pagination.nextCursor value from the previous call. Omit it to read the first page.

The meta.pagination.nextCursor value from the previous call. Omit it to read the first page.

Search quick replies › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Read a quick reply by shortcut

GET
https://<domain-anda>
/api/v1/public/quick-replies/shortcut/{shortcut}

Fetch one quick reply by its exact shortcut.

Returns the single quick reply whose shortcut matches exactly. Use it when the team refers to a canned reply by its shortcut. Read-only. Answers 404 when no reply has that shortcut.

Read a quick reply by shortcut › path Parameters

shortcut
​string · required

The exact shortcut from quickReplies.list, without a slash.

The exact shortcut from quickReplies.list, without a slash.

Read a quick reply by shortcut › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

List attachable files for quick replies

GET
https://<domain-anda>
/api/v1/public/quick-replies/attachments

Return the Files Center files that can be attached to a quick reply.

Lists the files a quick reply may carry as an attachment, each with the fileCenterFileId to pass to quickReplies.create or quickReplies.update. Read-only. At most 100 files.

List attachable files for quick replies › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

List quick reply categories

GET
https://<domain-anda>
/api/v1/public/quick-replies/categories

Return the categories quick replies are grouped under.

Returns the quick-reply categories with their ids. Use it to pick a categoryId for quickReplies.list, quickReplies.create or quickReplies.update. Read-only.

List quick reply categories › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Delete a quick reply

DELETE
https://<domain-anda>
/api/v1/public/quick-replies/{id}

Permanently remove a quick reply for the whole workspace.

Deletes the quick reply for every agent; its shortcut stops working at once. Cannot be undone. Use it only when the team asked for the reply to go away. Sends nothing. Answers 404 when the id does not exist.

Delete a quick reply › path Parameters

id
​string · required

Quick reply id from quickReplies.list.

Quick reply id from quickReplies.list.

Delete a quick reply › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Update a quick reply

PATCH
https://<domain-anda>
/api/v1/public/quick-replies/{id}

Change the shortcut, title, text, category or attachment of a quick reply.

Updates only the fields you send. Writes the change and sends nothing; agents see the new text the next time they insert it. Answers 409 when the new shortcut is taken and 404 when the id does not exist.

Update a quick reply › path Parameters

id
​string · required

Quick reply id from quickReplies.list.

Quick reply id from quickReplies.list.

Update a quick reply › Request Body optional

shortcut
​string

New unique shortcut, 1-50 characters.

title
​string

New label, 1-100 characters.

content
​string

New reply text, 1-4096 characters.

categoryId
​string | null

New category id, or null to remove the category.

fileCenterFileId
​string | null

New attachment id from quickReplies.attachments, or null to detach.

Update a quick reply › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

List template variables

GET
https://<domain-anda>
/api/v1/public/template-variables

Return the workspace’s reusable template variable library.

Returns the named variables (customer name, tracking link and so on) that template placeholders can be mapped to, with their type and example value, most used first. Use it to find the variable ids that templates.validate and templates.renderPreview expect. Read-only. Paginated: follow meta.pagination.nextCursor until hasMore is false.

List template variables › query Parameters

limit
​integer · min: 1 · max: 100

Rows to return, 1-100. Defaults to 25.

Rows to return, 1-100. Defaults to 25.

cursor
​string

The meta.pagination.nextCursor value from the previous call. Omit it to read the first page.

The meta.pagination.nextCursor value from the previous call. Omit it to read the first page.

List template variables › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Create a template variable

POST
https://<domain-anda>
/api/v1/public/template-variables

Add a named, typed variable to the library.

Creates a reusable variable that template placeholders can be mapped to (templateVariables.saveMappings). Writes one library row and sends nothing. Answers 409 when a variable with that name already exists.

Create a template variable › Request Body

name
​string · required

Unique display name, 1-100 characters.

type
​string · required

One of TEXT, URL, CURRENCY, DATE, IMAGE, VIDEO or DOCUMENT.

description
​string

What the variable holds, up to 500 characters.

exampleValue
​string

Sample value used when submitting templates to Meta, up to 500 characters.

Create a template variable › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Read a template’s variable mappings

GET
https://<domain-anda>
/api/v1/public/template-variables/mappings/{templateName}

Show which library variable fills each placeholder of one template.

Returns, for one template name, the mapping of each component position (header, body, footer, button) and placeholder index to a library variable, with the variable details. Use it to know which values to supply when sending that template through messages.send or broadcasts.create. Read-only. An unmapped template returns an empty list.

Read a template’s variable mappings › path Parameters

templateName
​string · required

Template name from templates.list (template_name).

Template name from templates.list (template_name).

Read a template’s variable mappings › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Read one template variable

GET
https://<domain-anda>
/api/v1/public/template-variables/{id}

Fetch a single library variable by id.

Returns one variable with its name, type, description, example value and usage count. Read-only. Answers 404 when the id does not belong to this workspace.

Read one template variable › path Parameters

id
​string · required

Variable id from templateVariables.list.

Variable id from templateVariables.list.

Read one template variable › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required

Save a template’s variable mappings

POST
https://<domain-anda>
/api/v1/public/template-variables/mappings

Replace the placeholder-to-variable mapping of one template.

Sets which library variable fills each placeholder of the named template. It REPLACES every existing mapping for that template, so send the complete list, and read the current one first with templateVariables.mappings. Sends nothing; later sends and renders of that template use the new mapping. Each position may appear once.

Save a template’s variable mappings › Request Body

templateName
​string · required

Template name from templates.list (template_name).

​object[] · minItems: 1 · required

The complete list of mappings for this template, at least one.

Save a template’s variable mappings › Responses

The API key is missing, malformed, expired, or its owner is inactive.

success
​required
​object · required