Skip to main content

Waplify API

An API (Application Programming Interface) lets your website, app, or software talk to Waplify automatically — without anyone logging into the dashboard. For example, your online store can send WhatsApp order confirmations the moment a customer places an order.

The Waplify API lets you send WhatsApp messages, manage contacts and groups, and receive real-time notifications — all from your own code or tools.

Use with AI tools

You can share this documentation (or the Complete API Reference page) with AI tools like ChatGPT, Claude, or Cursor to help you write integration code automatically.

Base URL

https://server.waplify.io

All API endpoints are prefixed with /api/v1/. For example, to send a message, the full URL is:

https://server.waplify.io/api/v1/messages/send

What you can do

FeatureDescription
Send MessagesSend template messages and free-form messages via WhatsApp
Manage ContactsCreate, list, get, and delete contacts
Manage GroupsCreate and manage contact groups
List TemplatesRetrieve your approved WhatsApp message templates
WebhooksReceive real-time notifications for message events

Quick start

1. Get your API key

Go to Developers > API in your Waplify dashboard and create an API key. Copy it immediately — it is only shown once.

2. Send your first message

The examples below use curl (a command-line tool that comes with most computers). You can also use tools like Postman, or any programming language — JavaScript, Python, PHP, etc.

Using curl:

curl -X POST https://server.waplify.io/api/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_name": "hello_world",
"contact_phone": "911234567890",
"contact_name": "John Doe",
"body_data": {}
}'

Using JavaScript (fetch):

const response = await fetch("https://server.waplify.io/api/v1/messages/send", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
template_name: "hello_world",
contact_phone: "911234567890",
contact_name: "John Doe",
body_data: {},
}),
});

const data = await response.json();
console.log(data);

Using Python:

import requests

response = requests.post(
"https://server.waplify.io/api/v1/messages/send",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"template_name": "hello_world",
"contact_phone": "911234567890",
"contact_name": "John Doe",
"body_data": {},
},
)

print(response.json())

3. Check the response

{
"status": "success",
"message": "Message sent successfully",
"message_id": "wamid.HBgNOTE4MDMxMjM0NTY3OA==",
"contact_id": "507f1f77bcf86cd799439012",
"template_name": "hello_world",
"timestamp": "2024-06-15T10:00:00Z"
}
Important — "success" means accepted, not delivered

When you get "status": "success", it means WhatsApp has accepted your message. It does not mean the message has been delivered to the contact's phone yet.

To know when a message is actually delivered or read, set up webhooks. You will receive events like message.delivered and message.read as the message progresses.

Phone number format

All phone numbers must include the country code without the + sign:

CountryFormatExample
India91 + number911234567890
US1 + number12025550123
UK44 + number447700900123

Response format

All responses return JSON. Every response includes these headers:

HeaderDescription
X-Request-IDUnique ID for this request (for debugging)
API-Versionv1

Success response:

{
"status": "success",
"message": "Description of what happened",
...
}

Error response:

{
"error": "bad_request",
"message": "Human-readable error description",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2024-06-15T10:00:00Z"
}

Error codes

HTTP CodeError CodeWhat it means
400bad_requestSomething is wrong with your request — missing fields, invalid format, etc.
401unauthorizedYour API key is missing, invalid, or expired
403forbiddenAction not allowed — e.g., trying to send a free-form message outside the 24-hour window
404not_foundThe contact, group, or template you're looking for doesn't exist
429rate_limit_exceededYou're sending too many requests too fast — wait and retry
500internal_server_errorSomething went wrong on our end — try again or contact support

Need help?