Send WhatsApp Messages Programmatically with Our API
Learn how to trigger Wassist Outbound Messages from your own applications using simple API requests.
Sometimes the messages you want to send are not triggered by a user action. For example, you might want to send a message to a new user who signs up for your service. Or you might want to send a message to a user who hasn't interacted with your bot in a while. In these cases, you can use the Outbound Message API to send messages programmatically.
Prerequisites
Before you can use the Outbound Message API, ensure you have:
- A WhatsApp assistant deployed to your business phone number
- Added a payment method in Facebook Business Manager
- Created and approved message templates (explained below)
Setting Up Message Templates

The Outbound section in your Wassist dashboard
1. Navigate to the Outbound section in your assistant's dashboard
2. You'll see a link to add your payment method in Facebook. This is required for sending template messages.
3. Create message templates with variables for dynamic content. Templates can include:
- Header variables (for titles or introductions)
- Body variables (for main message content)
- Button variables (for interactive buttons)
Making API Requests
Once your template is approved, you'll see an endpoint URL for making requests. Here's how to use it:
POST https://api.wassist.app/chats/outbound/:id:
Headers:
X-wassist-secret: your_secret_key
Request body example:
Variable Formatting
Variables are filled in based on their position in the arrays:
header
: Array of strings for header variablesbody
: Array of strings for body variablesbuttons
: Array of strings for button labels
The order of variables in each array corresponds to the numbered placeholders in your template (e.g., {1}, {2}, etc.).
Security Note
Keep your X-wassist-secret key secure. This key authenticates your requests and should never be exposed in client-side code or public repositories.
💡 Pro Tip:
Test your templates with different variable combinations before using them in production. This ensures your messages format correctly for all scenarios.