Skip to main content
POST
/
api
/
v1
/
meta-templates
/
send
curl -X POST https://api.mindosoftware.com/api/v1/meta-templates/send/ \
  -H "X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number_id": "813497231850626",
    "template_name": "welcome_message",
    "language": "es",
    "recipient_phone": "+5491112345678",
    "variables": {
      "name": "Juan Perez",
      "code": "ABC123"
    },
    "button_variables": {
      "button_0": "ABC-123"
    }
  }'
{
  "success": true,
  "message_id": "wamid.HBgNNTQ5MTEyMzQ1Njc4FQIAERgSQjVBN0YzRjQ2NzFCNDVBNQA=",
  "template_name": "welcome_message",
  "recipient_phone": "+5491112345678",
  "status": "sent",
  "sent_at": "2025-11-16T21:30:00Z"
}

Description

This endpoint allows you to send a WhatsApp template to an individual recipient. It implements a fire-and-forget pattern: when sending the message, it returns a message_id (Meta’s wamid) that you can use to check the message status. The API validates the template, resolves the variables, and sends the message through the Meta API synchronously.

Authentication header

X-API-Key
string
required
Your Mindo API Key. Format: mindo_xxxxxxxxxxxxxxxxxxxxxxxx

Body parameters

phone_number_id
string
required
Meta’s WhatsApp phone number ID from which the message will be sent. You can get it from the Get business accounts endpoint.
template_name
string
required
Name of the approved template to send. Must have APPROVED status in Meta.
language
string
Template language. Default: "es". Examples: "es", "en", "pt_BR".
recipient_phone
string
required
Recipient’s phone number in international format (e.g.: "+5491112345678"). No spaces.
variables
object
Custom variables for the template. Keys must match the variables defined in the template.
button_variables
object
Variables for dynamic template buttons. Keys use the format button_0, button_1, etc., where the number corresponds to the button index (starting at 0). Values are the dynamic suffixes or payloads for each button.Important: URL buttons only support 1 variable.

Response (200 OK)

success
boolean
Whether the message was sent successfully.
message_id
string
Message ID assigned by Meta (wamid). Use to check the message status.
template_name
string
Name of the template sent.
recipient_phone
string
Recipient’s phone number.
status
string
Initial message status. Always "sent" when sent successfully.
sent_at
string (ISO 8601)
Date and time when the message was sent.
curl -X POST https://api.mindosoftware.com/api/v1/meta-templates/send/ \
  -H "X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number_id": "813497231850626",
    "template_name": "welcome_message",
    "language": "es",
    "recipient_phone": "+5491112345678",
    "variables": {
      "name": "Juan Perez",
      "code": "ABC123"
    },
    "button_variables": {
      "button_0": "ABC-123"
    }
  }'
{
  "success": true,
  "message_id": "wamid.HBgNNTQ5MTEyMzQ1Njc4FQIAERgSQjVBN0YzRjQ2NzFCNDVBNQA=",
  "template_name": "welcome_message",
  "recipient_phone": "+5491112345678",
  "status": "sent",
  "sent_at": "2025-11-16T21:30:00Z"
}

Message statuses

The message status field can have the following values:
StatusDescription
sentMessage sent to Meta successfully
deliveredMessage delivered to the recipient’s device
readMessage read by the recipient
failedMessage send failed
The individual status lookup endpoint (GET /api/v1/meta-templates/messages/\{message_id\}/) will be available soon. In the meantime, you can use the returned message_id for internal traceability.

Use cases

Send a personalized welcome message when a new customer registers.
Python
import requests

response = requests.post(
    "https://api.mindosoftware.com/api/v1/meta-templates/send/",
    headers={"X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "phone_number_id": "813497231850626",
        "template_name": "welcome_message",
        "recipient_phone": "+5491112345678",
        "variables": {
            "name": "Juan Perez"
        }
    }
)

data = response.json()
print(f"Welcome sent: {data['message_id']}")
JavaScript
const response = await fetch(
  "https://api.mindosoftware.com/api/v1/meta-templates/send/",
  {
    method: "POST",
    headers: {
      "X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      phone_number_id: "813497231850626",
      template_name: "welcome_message",
      recipient_phone: "+5491112345678",
      variables: { name: "Juan Perez" }
    })
  }
);

const data = await response.json();
console.log("Welcome sent:", data.message_id);
Send a unique verification code to a user.
Python
import requests
import secrets

code = secrets.token_hex(3).upper()

response = requests.post(
    "https://api.mindosoftware.com/api/v1/meta-templates/send/",
    headers={"X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "phone_number_id": "813497231850626",
        "template_name": "verification_code",
        "recipient_phone": "+5491112345678",
        "variables": {
            "name": "Juan",
            "code": code
        }
    }
)

data = response.json()
print(f"Code {code} sent: {data['message_id']}")
JavaScript
const code = Math.random().toString(36).substring(2, 8).toUpperCase();

const response = await fetch(
  "https://api.mindosoftware.com/api/v1/meta-templates/send/",
  {
    method: "POST",
    headers: {
      "X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      phone_number_id: "813497231850626",
      template_name: "verification_code",
      recipient_phone: "+5491112345678",
      variables: { name: "Juan", code }
    })
  }
);

const data = await response.json();
console.log(`Code ${code} sent:`, data.message_id);
Notify a customer when their order status changes.
Python
import requests

response = requests.post(
    "https://api.mindosoftware.com/api/v1/meta-templates/send/",
    headers={"X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "phone_number_id": "813497231850626",
        "template_name": "order_update",
        "recipient_phone": "+5491112345678",
        "variables": {
            "order_id": "ORD-001",
            "status": "In transit"
        }
    }
)

data = response.json()
print(f"Notification sent: {data['message_id']}")
JavaScript
const response = await fetch(
  "https://api.mindosoftware.com/api/v1/meta-templates/send/",
  {
    method: "POST",
    headers: {
      "X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      phone_number_id: "813497231850626",
      template_name: "order_update",
      recipient_phone: "+5491112345678",
      variables: { order_id: "ORD-001", status: "In transit" }
    })
  }
);

const data = await response.json();
console.log("Notification sent:", data.message_id);