Skip to main content
Send messages using the WhatsApp API through Visito AI. WhatsApp templates are ideal for transactional notifications (order confirmations, check-in reminders, delivery updates) and promotional campaigns (offers, follow-ups), while staying compliant with WhatsApp’s template rules.
1

Set up your WhatsApp channel

Before you can create or send templates, you must connect a WhatsApp number to Visito AI.Follow the channel setup guide: Add a channel.
2

Get the channelId for your WhatsApp number

In Visito AI, every connected WhatsApp number is stored as a channel.
The channelId is the unique identifier for that channel, and it tells Visito which WhatsApp number to use when creating, listing, or sending templates.
Use the GET /channels?type=whatsapp endpoint to list all available WhatsApp channels:
{
  "data": [
    {
      "id": "65e1548d667ec3f751a1e20e",
      "name": "+1 134 4567890",
      "type": "whatsapp"
    }
  ]
}
In this example, id is the channelId → 65e1548d667ec3f751a1e20e You’ll use this channelId in endpoints like:
  • POST /whatsapp-templates/channelId (create a template)
  • GET /whatsapp-templates/channelId (list templates)
  • POST /whatsapp-templates/channelId/send (send a template from that WhatsApp number) sd
3

Create a WhatsApp message template

Use the POST /whatsapp-templates/{channelId} endpoint to create a new template.
{
  "template": {
    "name": "reservation_confirmed",
    "language": "en_US",
    "category": "MARKETING",
    "components": [
      {
        "type": "BODY",
        "text": "Hi {{1}}, your reservation is confirmed.",
        "example": {
          "body_text": [["John"]]
        }
      }
    ]
  }
}
Templates can be created with parameters (like {{1}}) or without parameters.For advanced components (HEADER, FOOTER, BUTTONS, etc.), refer to the official Meta documentation: WhatsApp Message Templates
Templates require approval by WhatsApp/Meta. Approval can take up to 24 hours, and templates may be rejected. Templates that are in review or rejected cannot be sent.
4

Send a template message

Use the POST /whatsapp-templates/{channelId}/send endpoint to send a template to a specific phone number.
{
  "to": "123456789", // Destination phone number in international/E.164 format, digits only (no "+" or spaces)
  "template": {
    "name": "reservation_confirmed",
    "language": {
      "code": "en_US"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          {
            "type": "text",
            "text": "Sofia"
          }
        ]
      }
    ]
  }
}
If the request succeeds, you’ll receive a 200 response like this:
{
  "data": {
    "whatsapp": {
      "messaging_product": "whatsapp",
      "contacts": [
        {
          "input": "123456789",
          "wa_id": "123456789"
        }
      ],
      "messages": [
        {
          "id": "wamid.HBgNNTIxNTU4NTY1NTQ3OBUCABEYEjRDRDcwQ0RDNzQ5Mjg4RjhGOAA=",
          "message_status": "accepted"
        }
      ]
    },
    "conversation": "65da7ced90ef936e6d0b0798"
  }
}
The response includes:
  • The destination phone number under contacts
  • The WhatsApp message id and message_status
  • The Visito AI conversation ID for tracking and history
This message also appers in the inbox of visito’s plaform