Incoming Message
The incoming message system allows you to configure endpoints where your application will receive real-time message from recipient reply.
Figure 1: Main webhook management dashboard showing the list of configured webhook endpoints
Overview
Webhooks provide a way for our system to send data to your application in real-time whenever your reipient reply. This enables you to build integrations that react immediately to user interactions.
Managing Webhook Endpoints
Viewing Webhook Endpoints
The Webhook dashboard displays all your configured webhook endpoints with their current status:
- URL: The destination where event data (recipient reply) will be sent
- Status: Indicates if the webhook is active or disabled
Adding a New Webhook Endpoint
To add a new webhook endpoint:
- Click the Add endpoint button in the top-right corner of the Webhook endpoints section
- Enter the endpoint URL where you want to receive webhook data
- Ensure your endpoint is accessible via HTTPS and configured to accept POST requests with JSON payloads
- Click Save Endpoint to add the webhook
Figure 2: Dialog for adding a new webhook endpoint
Managing Existing Webhooks
Each webhook endpoint has a menu with the following options:
- Edit: Modify the webhook URL
- Disable/Enable: Click the webhook's active status
- Delete: Permanently remove the webhook endpoint
Figure 3: Menu options for managing an existing webhook endpoint
Webhook Payload Structure
When an event occurs, our system will send a POST request to your configured endpoint with a JSON payload containing the event data.
Message Notification Example
When a new message is received, your webhook endpoint will receive a payload similar to this:
{
"last_messages": "[{\"type\":\"user\",\"content\":\"How can I use notifier by whatsable api?\",\"timestamp\":\"2025-03-23T21:41:44.477Z\",\"content_type\":\"text\"},{\"type\":\"bot\",\"content\":\"Hello! How can I assist you today?\",\"timestamp\":\"2025-03-23T20:47:45.000Z\",\"content_type\":\"text\"}]",
"conversation_paragraph": "User (9:41:44 PM): How can I use notifier by whatsable api? ; Bot (8:47:45 PM): Hello! How can I assist you today?",
"phone_number": "8801734363287",
"user_id": "6fb11ff2-d9b2-4560-8437-0fe58ec9f4a6",
"last_message_of_user": "How can I use notifier by whatsable api?",
"last_message_of_bot": "Hello! How can I assist you today?",
"message_type": "text"
}
Payload Fields
Field | Description |
---|---|
last_messages | JSON string containing the recent message history (type, content, timestamp, content_type). Actually this is the last 10 messages |
conversation_paragraph | Formatted string of the recent conversation history. This is also last 10 messages. |
phone_number | The phone number associated with the conversation |
user_id | Unique identifier for the user |
last_message_of_user | The last message sent by your recipient |
last_message_of_bot | The most recent message sent by the you or your automation system |
message_type | The type of the message (e.g., "text") |
Technical Requirements
For your webhook endpoint to properly receive and process notifications:
- HTTPS Required: All webhook endpoints must be accessible via HTTP/HTTPS
- POST Method: Your endpoint must accept POST requests
- JSON Support: Your endpoint must be able to parse JSON payloads
- Response Code: Your endpoint should return a 2xx HTTP response code to acknowledge receipt
Note: As shown in Figure 2, your webhook endpoint must be accessible via HTTP/HTTPS and configured to accept POST requests with JSON payloads.