Create Template
Create a WhatsApp message template through the ChatSyncs API and submit it to WhatsApp for approval — a normal marketing or utility message, a one-time-passcode (OTP) message, or a carousel. Use when a developer asks how to create a template programmatically, which fields each template type takes, what the #placeholders# mean, or why a template creation call was refused.
Example Request
The body is JSON. The key goes in theAuthorization header, so it stays out of the body and out of logs.
The three kinds of template
One endpoint takes three shapes. Which one you get is set bytemplate_type and category; if you leave template_type
out it is mixed.
body_text, header or
buttons for an AUTHENTICATION template. A carousel built from catalog products (carousel_product) needs a connected
store; create those from Chatbot Manager → Message Templates → Create → Carousel Product Template.Normal messages
{"type":"text","text":"Order update"}) or media (image, video or document, with a public
media_url). Buttons are one of four kinds:
One-time passcodes
verification_code is the placeholder that carries the code each time you send. code_expiration_minutes is from 1 to 90 and
is shown in the footer. add_security_recommendation adds WhatsApp’s line For your security, do not share this code.
Carousels
bubble_body_text is the text above the cards. Each card has an image or video, its own text, and one or two url or
quick_reply buttons. WhatsApp needs at least 2 cards and allows 10, and every card must use the same media_type and the
same buttons in the same order. Carousel templates count against your plan’s carousel allowance.
Placeholders
Anywhere you write text, you can put a placeholder that ChatSyncs fills in when the template is sent:variable_map shows how each placeholder was read, by position: {"body": {"1": "#LEAD_USER_FIRST_NAME#"}}. Read
Template Variables vs Custom Variables
for when to use which.
Limits
The response
id is ChatSyncs’ own short number, which Send Template Message
takes as its template_id. template_id is WhatsApp’s long number, which Template Status
takes. Keep both.Errors
A failure comes back as HTTP200 with "status": "0", so always check status. The message is the reason:
Frequently asked
Why can't I send the template I just created?
Why can't I send the template I just created?
Submitted. Poll Template Status until it
reads APPROVED. One-time-passcode templates are often approved within seconds; marketing templates and carousels can take
longer.Can I edit a template after creating it?
Can I edit a template after creating it?
Should I pick MARKETING or UTILITY?
Should I pick MARKETING or UTILITY?
UTILITY is for a message about something the customer did or asked for: an order update, a booking, a receipt. A promotion, an
offer or an announcement is MARKETING, even if it mentions an order. WhatsApp re-categorises or rejects a template filed in the
wrong one, and a marketing message costs more to send. See
Guidelines for Utility and Marketing Templates.Where do I put the OTP code when I send?
Where do I put the OTP code when I send?
verification_code placeholder you chose when you created the template. Send it as a template variable value through
Send Template Message.Why was my template rejected?
Why was my template rejected?
rejected_reason. See
Why Templates Get Rejected and How to Fix Them.Can I create the template with an AI assistant instead?
Can I create the template with an AI assistant instead?
create_template ability that checks the template against these limits before it
submits it, and a get_template_status ability to follow it afterwards.Body
The WhatsApp account's phone number ID. Where to find it.
"PHONE-NUMBER-ID"
The template's name. Lowercase letters, numbers and underscores only — no spaces or capitals. It must be unique on the WhatsApp account, and it is permanent.
"summer_promo_2026"
MARKETING for promotions, offers and announcements. UTILITY for messages about something the customer did or asked for (an order, a booking, a receipt). AUTHENTICATION for one-time passcodes only. Carousels must be MARKETING. WhatsApp can re-categorise or reject a template filed in the wrong one.
MARKETING, UTILITY, AUTHENTICATION "MARKETING"
Your ChatSyncs API key (not a WhatsApp/Meta access token). Leave it out of the body if you send it as Authorization: Bearer <key> instead — both work. Where to find it.
"API-KEY"
The template's language code. Defaults to en_US. Examples: en_US, en_GB, hi_IN, bn_BD, pt_BR.
"en_US"
Which kind of template this is. mixed (the default) is a normal message, wp is a WordPress template, authentication is a one-time-passcode message, carousel is swipeable image or video cards, and carousel_product is a carousel built from catalog products. The fields below depend on it.
mixed, wp, authentication, carousel, carousel_product Normal messages (mixed, wp) — required. The message text, up to 1,024 characters when WhatsApp reviews it (each #placeholder# counts as one character). Not used by authentication or carousel templates.
"Hi #LEAD_USER_FIRST_NAME#, get #discount#% off using code #coupon#!"
Normal messages — optional. A header shown above the message.
Normal messages — optional. Small grey text under the message, up to 60 characters. Static: it takes no placeholders.
"Valid till Sunday"
Normal messages — optional. Up to 10 buttons, at most one copy_code. quick_reply is a tappable reply, url opens a link, phone_number starts a call, and copy_code copies a coupon code.
Authentication templates — required. The placeholder that carries the one-time code: a template variable such as #!system_otp!#, or a custom field such as #otp_field#.
"#!system_otp!#"
Authentication templates — optional. true adds WhatsApp's line "For your security, do not share this code."
true
Authentication templates — optional. How long the code stays valid, from 1 to 90 minutes. It is shown in the footer.
1 <= x <= 905
Carousels — required. The introduction text shown above the cards, up to 1,024 characters.
"Hey #LEAD_USER_FIRST_NAME#, check out our top trending collection!"
Carousels — required. The cards, 2 to 10 of them. Every card must use the same media_type and the same buttons in the same order.
Response
Standard ChatSyncs response. status is "1" when the template was created and submitted, and "0" on failure. Read the failure reason from message.

