API Documentation v1.0
Detailed references, endpoints, and examples for integrating with the V1 API.
Endpoints
Modules
Authentication
API requests require a Bearer Token. This can be passed in two ways:
1. HTTP Header (Recommended)
Authorization: Bearer YOUR_API_TOKEN
2. Query Parameter
If your system cannot send HTTP headers, you can append the token to the URL:
?token=YOUR_API_TOKEN
Base URL: https://app.wacm.in/api/v1
Profile
/me
Retrieves the authenticated user and company profile.
Response Example
{
"status": "success",
"message": "Profile retrieved successfully",
"data": {
"id": 1,
"name": "John Doe",
"email": "admin@example.com",
"company_id": 1
}
}
Messages
/messages/text
Send a standard text or media message to a phone number. Supports both POST and GET for maximum compatibility with legacy systems.
| Parameter | Type | Description |
|---|---|---|
phone | String Required | Recipient's phone number with country code. |
message | String | Text content of the message. |
media_url | URL | Public URL for sending an image/video/document. |
Response Example
{
"status": "success",
"message": "Message sent successfully",
"data": {
"message_id": 105,
"message_wamid": "wamid.HBgL..."
}
}
/messages/template
Send a pre-approved WhatsApp template message. Supports both POST and GET.
| Parameter | Type | Description |
|---|---|---|
phone | String Required | Recipient's phone number. |
template_name | String Required | The exact name of the template. |
template_language | String | Language code (e.g. en, es). Default is en. (Alias: language) |
components | Array | Array of component parameters for dynamic variables (Standard WhatsApp Cloud API format). |
Legacy / Simple Parameters (Alternative to components) | ||
variables | JSON Array | Array of strings to replace {% raw %}1{% endraw %} variables in the body text. Example: ["John", "Doe"] |
header_variables | JSON Array | Array of strings for header text variables. |
document, image, video, audio | URL | Public URL for sending media in the template header. (Provide only one). |
Request Payload Example (Standard)
{
"phone": "1234567890",
"template_name": "welcome_message",
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "John" }
]
}
]
}
Request Payload Example (Legacy/Simple)
{
"phone": "1234567890",
"template_name": "welcome_message",
"language": "en",
"variables": ["John", "Doe"],
"document": "https://example.com/file.pdf"
}
/messages/list
Send an interactive list message. Supports both POST and GET.
| Parameter | Type | Description |
|---|---|---|
phone | String Required | Recipient's phone number. |
message | String Required | Main body text. |
action | Array Required | List action definition. |
header | String | Header text. |
footer | String | Footer text. |
Contacts
/contacts
Retrieve a paginated list of contacts. Add ?update_from=YYYY-MM-DD HH:MM:SS to filter recently modified contacts.
/contacts
Create or upsert a contact by phone number.
| Parameter | Type | Description |
|---|---|---|
phone | String Required | Contact phone number. |
name | String | Full name. |
email | String | Email address. |
groups | Array/String | Comma-separated string or array of group names. |
custom | Object | Key-value object of custom fields. |
enabled_ai_bot | Boolean | Enable (1) or disable (0) AI Bot. |
Request Payload Example
{
"phone": "1234567890",
"name": "Jane Doe",
"groups": ["VIP", "Leads"],
"custom": {
"Company": "Acme Corp",
"Role": "Manager"
},
"enabled_ai_bot": 1
}
/contacts/{id}
Retrieve details of a specific contact by ID.
/contacts/{id}
Fully update an existing contact by its database ID. Uses the exact same payload structure as the POST route.
/contacts/{id}/groups-and-fields
Retrieve all associated groups and custom fields for a specific contact.
/contacts/{id}/notes
Retrieve all notes associated with a specific contact.
/contacts/check-phone
Verify if a phone number exists on WhatsApp. Limited to 60 checks per minute.
{
"status": "success",
"message": "Phone checked successfully",
"data": {
"phone": "1234567890",
"is_valid": true,
"wa_id": "1234567890"
}
}
Templates
/templates
List all available templates. Use ?name=TEMPLATE_NAME to filter by exact name.
/templates/{id}
Retrieve details of a specific template by ID.
Campaigns
/campaigns
List campaigns. Filter using ?type=bot|api|regular.
/campaigns/send
Dispatch a campaign message to a contact dynamically.
| Parameter | Type | Description |
|---|---|---|
phone | String Required | Contact's phone number. |
campaign_id | Integer Required | ID of the campaign. (Alias: campaing_id) |
data | Object | Dynamic variables mapping to the template. |
Conversations
/conversations
Get a list of active chat conversations. Use ?lastmessagetime=YYYY-MM-DD HH:MM:SS to sync new conversations.
/conversations/{id}/messages
Fetch the message timeline for a specific conversation ID. Supports ?lastmessagetime filter.
Groups
/groups
Retrieve contact groups. Use ?showContacts=yes to eagerly load all assigned contacts.