API Documentation v1.0

Detailed references, endpoints, and examples for integrating with the V1 API.

Download as .md

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

GET

/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

POST GET

/messages/text

Send a standard text or media message to a phone number. Supports both POST and GET for maximum compatibility with legacy systems.

ParameterTypeDescription
phoneString RequiredRecipient's phone number with country code.
messageStringText content of the message.
media_urlURLPublic URL for sending an image/video/document.
Response Example
{
  "status": "success",
  "message": "Message sent successfully",
  "data": {
    "message_id": 105,
    "message_wamid": "wamid.HBgL..."
  }
}

POST GET

/messages/template

Send a pre-approved WhatsApp template message. Supports both POST and GET.

ParameterTypeDescription
phoneString RequiredRecipient's phone number.
template_nameString RequiredThe exact name of the template.
template_languageStringLanguage code (e.g. en, es). Default is en. (Alias: language)
componentsArrayArray of component parameters for dynamic variables (Standard WhatsApp Cloud API format).
Legacy / Simple Parameters (Alternative to components)
variablesJSON ArrayArray of strings to replace {% raw %}1{% endraw %} variables in the body text. Example: ["John", "Doe"]
header_variablesJSON ArrayArray of strings for header text variables.
document, image, video, audioURLPublic 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"
}

POST GET

/messages/list

Send an interactive list message. Supports both POST and GET.

ParameterTypeDescription
phoneString RequiredRecipient's phone number.
messageString RequiredMain body text.
actionArray RequiredList action definition.
headerStringHeader text.
footerStringFooter text.

Contacts

GET

/contacts

Retrieve a paginated list of contacts. Add ?update_from=YYYY-MM-DD HH:MM:SS to filter recently modified contacts.


POST

/contacts

Create or upsert a contact by phone number.

ParameterTypeDescription
phoneString RequiredContact phone number.
nameStringFull name.
emailStringEmail address.
groupsArray/StringComma-separated string or array of group names.
customObjectKey-value object of custom fields.
enabled_ai_botBooleanEnable (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
}

GET

/contacts/{id}

Retrieve details of a specific contact by ID.


PUT

/contacts/{id}

Fully update an existing contact by its database ID. Uses the exact same payload structure as the POST route.


GET

/contacts/{id}/groups-and-fields

Retrieve all associated groups and custom fields for a specific contact.


GET

/contacts/{id}/notes

Retrieve all notes associated with a specific contact.


POST

/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

GET

/templates

List all available templates. Use ?name=TEMPLATE_NAME to filter by exact name.


GET

/templates/{id}

Retrieve details of a specific template by ID.

Campaigns

GET

/campaigns

List campaigns. Filter using ?type=bot|api|regular.


POST

/campaigns/send

Dispatch a campaign message to a contact dynamically.

ParameterTypeDescription
phoneString RequiredContact's phone number.
campaign_idInteger RequiredID of the campaign. (Alias: campaing_id)
dataObjectDynamic variables mapping to the template.

Conversations

GET

/conversations

Get a list of active chat conversations. Use ?lastmessagetime=YYYY-MM-DD HH:MM:SS to sync new conversations.


GET

/conversations/{id}/messages

Fetch the message timeline for a specific conversation ID. Supports ?lastmessagetime filter.

Groups

GET

/groups

Retrieve contact groups. Use ?showContacts=yes to eagerly load all assigned contacts.