When users send messages to your WhatsApp Business number, Chirp delivers them to your application via webhooks.Documentation Index
Fetch the complete documentation index at: https://docs.buildwithchirp.com/llms.txt
Use this file to discover all available pages before exploring further.
Message Types
You can receive various types of incoming messages:| Type | Description |
|---|---|
text | Plain text messages |
image | Images with optional captions |
video | Video files |
audio | Voice messages and audio files |
document | PDF, Word, and other document files |
sticker | WhatsApp stickers |
location | Shared location pins |
contacts | Shared contact cards (vCard format) |
reaction | Emoji reactions to your messages |
interactive | Button/list selection responses |
order | Product orders (WhatsApp Commerce) |
system | System events (number changes, identity updates) |
Webhook Payload Structure
When you receive a message webhook, the payload follows this structure:Webhook Payload
Message Fields Reference
| Field | Type | Description |
|---|---|---|
id | string | Unique Chirp message identifier |
from | string | Sender phone number (E.164 format) |
to | string | Recipient phone number (E.164 format) |
type | string | Message type (see Message Types) |
direction | string | inbound or outbound |
text | string | Message text content (for text messages) |
receivedAt | string | ISO 8601 timestamp when received |
occurredAt | string | Canonical timestamp when the message event occurred |
source | string | Message source: cloud_api, business_app, or history_import |
isHistoricalImport | boolean | Whether this is a historical import from coexistence mode |
conversationWindow | object | 24-hour messaging window context |
The
source field indicates how the message was created:cloud_api- Real-time message via WhatsApp Cloud APIbusiness_app- Message sent via WhatsApp Business App (coexistence mode)history_import- Historical message imported during coexistence onboarding (up to 6 months)
Message Type Payloads
Text Messages
Text Message
Media Messages (Image, Video, Audio, Document)
Image Message
Audio Messages
Audio messages have additional voice note detection:Voice Note
Sticker Messages
Sticker Message
Location Messages
Location Message
Contact Messages
Contacts are shared in vCard format with full structured data:Contacts Message
Reaction Messages
Reaction Message
An empty
emoji string indicates the user removed their reaction.Interactive Responses
When users click buttons or select list items:Button Reply
List Reply
Order Messages (WhatsApp Commerce)
Order Message
System Messages
System messages notify you of account-level events:Number Change Event
Reply Context
When a user replies to a specific message:Reply with Context
Message Handler Example
Message Handler
Replying to Messages
To reply to an incoming message, use the sender’s number as theto field and optionally include replyTo with the message ID:
Reply to Message
24-Hour Messaging Window
When a user messages you, you have a 24-hour window to respond with any message type. After this window closes, you must use Template Messages to re-initiate contact.
conversationWindow object in the webhook payload tells you:
expiresAt- When the window closesoriginType- How the conversation started (user_initiated,business_initiated,referral_conversion)
Testing Incoming Messages
You have two options for testing incoming WhatsApp messages without sending a real one:- Browser-based Playground — open the Playground in your dashboard, pick a “User Phone Number”, and send. Your webhook fires in real-time.
- API-based simulation —
POST /v1/playground/whatsapp/inboundwith a test API key. Useful for end-to-end tests, CI, and local development. Today this supports text messages only. See Simulating Inbound Messages.
Best Practices
- Respond quickly - Users expect fast responses on WhatsApp
- Acknowledge receipt - Send a quick reply or reaction to let users know you received their message
- Handle all types - Gracefully handle message types you don’t expect
- Download media promptly - Media URLs may expire; download files you need to keep
- Track conversations - Store conversation history for context
- Use reactions - React to messages with emoji for quick acknowledgment