Skip to main content
Use this endpoint to register a new WhatsApp message template in your RelayOS project. After submission, Meta reviews the template and updates its status to APPROVED or REJECTED. You can only send messages using templates that have been approved.

Request

POST https://api.relayos.com.br/v1/templates
string
required
Template name in slug format (lowercase letters, numbers, and underscores only). This name is used when referencing the template in POST /v1/messages. Example: order_confirmation.
string
required
BCP-47 language code for the template. Examples: pt_BR, en_US, es_MX. Each language variant is registered as a separate template.
string
required
Template category as defined by Meta. Must be one of UTILITY, MARKETING, or AUTHENTICATION. The category affects delivery rules and pricing.
array
required
Array of component objects that define the template structure. Each component represents a section of the message: HEADER, BODY, or FOOTER. At minimum, a BODY component is required.

Response

A 200 response returns the created template object.
string
Unique template identifier assigned by RelayOS.
string
The slug name you provided.
string
The language code for this template.
string
The template category (UTILITY, MARKETING, or AUTHENTICATION).
string
Approval status from Meta. Initially PENDING. Transitions to APPROVED or REJECTED after Meta review.
array
The components array as submitted.
string
ISO 8601 timestamp of when the template was registered.
Meta typically reviews templates within 24 hours. You can poll GET /v1/templates to check approval status.