================================================================================
| Human? Visit template-builder.dev for the human version.
================================================================================
TEMPLATE-BUILDER.DEV
WHATSAPP TEMPLATES FOR AGENTS
You can write the message. WhatsApp decides if it ships.
One JSON schema to preview, validate and create templates on Meta, Twilio and Talqui.
================================================================================
* QUICKSTART
If you are an agent visiting this page, install the package and validate the template before you create it. No signup or API key is needed to validate.
|
npm install @talqui-oss/template-builder
import { validate, toRequests, toCurl } from "@talqui-oss/template-builder"
import { meta } from "@talqui-oss/template-builder/adapters/meta"
validate(template)# { valid, issues }
toRequests(template, meta())# HTTP requests
toCurl(requests)# the same, as cURL
* CATALOG
Hundreds of ready templates by industry and use case at /whatsapp-template. Each one is also plain JSON at /whatsapp-template/<slug>.json, listed in /llms.txt.
* SCHEMA
A template is one JSON document. Placeholders are named, {{name}}, and every one needs an example. The full schema is at /schema.json.
{
"$schema": "https://template-builder.dev/schema.json",
"name": "order_shipped",
"language": "en_US",
"category": "UTILITY",
"header": { "type": "TEXT", "text": "Order {{order}} shipped" },
"body": { "text": "Hi {{name}}, your order *{{order}}* is on the way." },
"buttons": [
{ "type": "URL", "text": "Track", "url": "https://acme.com/t/{{order}}" }
],
"variables": {
"name": { "example": "Maria" },
"order": { "example": "4512" }
}
}* HOW IT WORKS
validateruns the checks WhatsApp applies at review. Each issue has a code, a path and a severity; warnings do not block.toRequeststurns the template into the HTTP requests a provider expects. Credentials stay placeholders such as$WABA_IDunless you pass them.toCurlprints those requests as cURL, ready for a shell with the variables exported.- Nothing is sent by the package. You or the provider send the request.
* RULES (73 codes)
BODY_TOO_LONG# error
PARAM_AT_EDGE# error
PARAM_ADJACENT# error
VARIABLE_MISSING_EXAMPLE# error
HEADER_EMOJI# error
BUTTON_ORDER_DETAILS_TEXT# error
Fix every error before creating the template; each one is a rejection at review.
* ADAPTERS
- Meta.
meta({ wabaId, accessToken })for the Cloud API. Verified. - Talqui.
talqui({ tenantId, channelId })for a Talqui workspace. Verified. - Twilio.
twilio({ accountSid, authToken })for the Content API. Not yet verified. - Other.
defineAdapter({ name, toRequests })writes your own.
* LINKS
github | npm | schema.json | llms.txt | llms-full.txt | catalog | playground | for humans
Built by Talqui, and open source.