Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.1to1ai.com/llms.txt

Use this file to discover all available pages before exploring further.

A template is a message pre-approved by Meta. It is the only message type you can send when the 24-hour window is closed — that is, when the contact hasn’t written to you in the last 24 hours. While the window is open you can send free text; once it closes, only a template will reach the customer.
Templates are created and approved in the dashboard. The public API only consumes them to send — it does not create or edit them.

How a template is resolved

1

Identify the template by name

A template is identified by its template_name — the same name you see in the dashboard and report to Meta.
2

Specify the language if needed

If the same name is approved in several languages, add language (Meta lower_UPPER format, e.g. en_US) to pick which one to send. If it exists in only one language, it is optional.
3

Verify it is approved

Only templates with status APPROVED can be sent. One in PENDING or REJECTED is not sendable.

Template components

When sending a template you fill in its dynamic parts:

body_variables

The body placeholders ({{1}}, {{2}}, …). Array of objects { index, value }.

header

The header: text, or media via file_uuid.

button_parameters

Parameters for dynamic buttons (e.g. the suffix of a URL button).

Sending a template

A typical send, with two variables in the body:
curl -X POST "https://app.1to1.ai/api/v1/public/{slug}/conversation/messages/template" \
  -H "Authorization: Bearer sk_1to1_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "conversation": { "phone": "+5215512345678" },
    "template_name": "appointment_confirmation",
    "language": "en_US",
    "body_variables": [
      { "index": 1, "value": "Ana" },
      { "index": 2, "value": "10:00 AM" }
    ]
  }'
To discover which templates you have available and what variables each one expects, query the template catalog endpoints in the API Reference.

Next steps

Send messages

Sending templates, text, media, and quick replies.

Conversations

The 24-hour window and the state of a conversation.