Get chat messages for a customer of WABA number
Retrieve WhatsApp chat messages for a specific customer using the DoubleTick API, enabling seamless record-keeping and interaction analysis. ๐
API Endpoint
Use the following endpoint to fetch chat messages:
GET https://public.doubletick.io/chat-messages
Request Headers
{
"Authorization": "YOUR_API_KEY",
"Content-Type": "application/json"
}
Query Parameters
| Parameter | Type | Description |
|---|---|---|
wabaNumber | string | The WhatsApp Business Account Number in international format |
customerNumber | string | The Customer's Phone Number in international format |
startDate | string | The start date for the chat messages in DD-MM-YYYY format. |
endDate | string | The end date for the chat messages in DD-MM-YYYY format |
Responses
Success Response (201)
{
"messages": [
{
"message": {
"text": "text_message",
"messageType": "text"
},
"messageOriginType": "CUSTOMER",
"id": "message_id",
"sentCount": 0,
"readCount": 0,
"deliveryCount": 0,
"erroredCount": 0,
"senderId": "customer_id",
"templateId": null,
"repliesCount": 0,
"unreadCount": 0,
"noResponseCount": 0,
"isFromAd": false,
"messageMetadata": {
"status": null
},
"linkAnalytics": null,
"senderUser": {
"id": null,
"name": null,
"imageUrl": "",
"phoneNumber": null
},
"integrationId": "integration_id",
"integrationDisplayName": "DoubleTick Demo",
"messageTime": 1737612046032,
"quickActionButtonStats": [],
"cardButtonStats": [],
"totalCount": 1,
"integrationWabaNumber": "integrated_waba_number"
}
]
}
-
messages(array of objects): Contains the details of the sent or received message.-
message(object):text(string): The actual text message content.messageType(string): Type of message, e.g.,"text".
-
messageOriginType(string):- Indicates the source of the message.
- Possible values:
"CUSTOMER","USER","SYSTEM", etc.
-
id(string): Unique identifier for the message. -
sentCount(integer): Number of times the message was sent. -
readCount(integer): Number of times the message was read. -
deliveryCount(integer): Number of times the message was successfully delivered. -
erroredCount(integer): Number of times the message failed to send. -
senderId(string): Unique identifier of the customer sending the message. -
templateId(string): ID of the template used (null if not a template message). -
repliesCount(integer): Number of replies received for this message. -
unreadCount(integer): Count of unread messages from the customer. -
noResponseCount(integer): Number of times the customer didnโt respond. -
isFromAd(boolean): Indicates if the message originated from an ad. -
messageMetadata(object): Contains additional metadata.status(string)
-
linkAnalytics(object): Data related to link tracking. -
senderUser(object):id(string): User ID of the sender.name(string): Name of the sender.imageUrl(string): URL of the senderโs profile picture.phoneNumber(string): Senderโs phone number.
-
integrationId(string): ID of the integration used to send the message. -
integrationDisplayName(string): Display name of the integration. -
integrationWabaNumber(string): The registered WhatsApp Business Account (WABA) number used. -
messageTime(integer): Timestamp of when the message was sent (in milliseconds). -
quickActionButtonStats(array): Statistics for quick reply buttons. -
cardButtonStats(array): Statistics for card-based buttons. -
totalCount(integer): Total number of messages returned in this response.
-
Bad Request (400)
{
"message": "error_message",
"error": "Bad Request",
"statusCode": 400
}
Unauthorized (401)
{
"message": "Invalid public api key",
"error": "Unauthorized",
"statusCode": 401
}
Not Found (404)
{
"message": "error_message",
"statusCode": 404
}
Best Practices
- Store retrieved messages securely for compliance and customer service tracking.
- Ensure date filters are optimized for efficient query performance.
Updated 8 months ago
Explore more message types and enhance your WhatsApp communication with DoubleTick API
