WhatsApp
  1. Send Messages
  • Contact Management
    • Create a New Contact
      POST
    • List Contacts
      GET
    • Get Contact Details
      GET
    • Update Contact Information
      PUT
    • Delete Contact
      DELETE
  • Status Management
    • Create Status
      POST
    • List Statuses
      GET
    • Get Status Details
      GET
    • Update Status
      PUT
    • Delete Status
      DELETE
  • Source Management
    • Create Source
      POST
    • List Sources
      GET
    • Get Source Details
      GET
    • Update Source
      PUT
    • Delete Source
      DELETE
  • Group Management
    • List Groups
      GET
    • Create Group
      POST
    • Get Groups Details
      GET
    • Update Groups
      PUT
    • Delete Group
      DELETE
  • Template Management
    • List Templates
      GET
    • Get Templates Details
      GET
  • Template Bot Management
    • List TemplateBot
    • Get TemplateBot Details
  • Message Bot Management
    • List Messagebots
    • Get Messagebots Details
  • Send Messages
    • Send Simple Message
      POST
    • Send Template Message
      POST
    • Send Media Message to Contact
      POST
WhatsApp
  1. Send Messages

Send Simple Message

POST
/api/v1/{subdomain}/messages/send
Send a simple text message to a specific phone number via WhatsApp.
Contact Behavior:
If contact exists by phone number → Message sent to existing contact
If contact doesn't exist AND contact object provided → New contact created with provided data, then message sent
If contact doesn't exist AND no contact object → New contact created with phone number as name, then message sent
Contact Creation Requirements:
If contact object is provided, the specified data will be used
If no contact object is provided, a basic contact will be created automatically using the phone number as the firstname
firstname defaults to phone number if not provided in contact data
lastname defaults to empty string if not provided
Contact will be created as type "lead" with WhatsApp Auto Lead settings applied
If WhatsApp Auto Lead is enabled, default status, source, and assignee will be applied automatically
Available Reference Endpoints for IDs:
To find exact IDs for contact assignment fields:
Sources: GET /api/v1/{subdomain}/sources - List all sources with their IDs
Statuses: GET /api/v1/{subdomain}/statuses - List all statuses with their IDs
Groups: GET /api/v1/{subdomain}/groups - List all groups with their IDs
Important - 24-Hour Customer Service Window: Simple text messages are subject to Meta's customer service window policy.
You can only send free-form text messages within 24 hours of the customer's last message to your business.
This window starts or refreshes whenever the customer messages or calls you. After this 24-hour window expires,
the message will not be delivered. Use approved template messages for communication beyond the 24-hour window.

Request

Authorization
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
success
Body

🟠403
🟠422
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://whatsapp.qtap.chat/api/v1//messages/send' \
--header 'Content-Type: application/json' \
--data-raw '{
    "phone_number": "+919909919284",
    "message_body": "Hello! This is a sample message to demonstrate the API.",
    "contact": {
        "firstname": "John",
        "lastname": "Doe",
        "email": "john.doe@example.com",
        "country": "India",
        "groups": "VIP Customers,Newsletter Subscribers"
    }
}'
Response Response Example
200 - Example 1
{
    "status": "success",
    "message": "Message sent successfully",
    "data": {
        "message_id": "wamid.HBgMOTE5ODEwNjAwMDAwFQIAERgSNUU1RjE4MUM0QjY5MjFFNzYzAA==",
        "contact_id": 15,
        "phone": "+919909919284",
        "message": "Hello! This is a sample message to demonstrate the API.",
        "status": "sent",
        "sent_at": "2024-02-08 14:30:25",
        "chat_id": 8,
        "contact_created": true
    }
}
Previous
Get Messagebots Details
Next
Send Template Message
Built with