Skip to main content

Incoming Message

The incoming message system allows you to configure endpoints where your application will receive real-time message from recipient reply.

Webhook Management Dashboard 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:

  1. Click the Add endpoint button in the top-right corner of the Webhook endpoints section
  2. Enter the endpoint URL where you want to receive webhook data
  3. Ensure your endpoint is accessible via HTTPS and configured to accept POST requests with JSON payloads
  4. Click Save Endpoint to add the webhook

Add Webhook Dialog 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

Webhook Management Options 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

FieldDescription
last_messagesJSON string containing the recent message history (type, content, timestamp, content_type). Actually this is the last 10 messages
conversation_paragraphFormatted string of the recent conversation history. This is also last 10 messages.
phone_numberThe phone number associated with the conversation
user_idUnique identifier for the user
last_message_of_userThe last message sent by your recipient
last_message_of_botThe most recent message sent by the you or your automation system
message_typeThe type of the message (e.g., "text")

Technical Requirements

For your webhook endpoint to properly receive and process notifications:

  1. HTTPS Required: All webhook endpoints must be accessible via HTTP/HTTPS
  2. POST Method: Your endpoint must accept POST requests
  3. JSON Support: Your endpoint must be able to parse JSON payloads
  4. 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.