Whatsapp Fetch Conversation

Request

Curl Example

                            
                            curl --location 'https://api.motict.com/v1/wa/unmasking/conversations/{wa_id}/messages/{conversation_wa_id}?start=start_date&end=end_date&type=conversation_type' \
                            --header 'Authorization: api_key' 
                            
                        

Parameters

Name Type Required Description
api_key String Yes API key credential will be provided by Motict team.
wa_id String Yes Your Whatsapp business phone number.
Phone numbers are in E.164 format (e.g., 6285123456790)
conversation_wa_id String Yes Target phone number or group id.
Phone numbers are in E.164 format (e.g., 6285123456790)
start String Yes
end String Yes
type String Yes Type of conversation

Response

The response contains JSON body with message status whether the request is success or error. And also the message id that has been sent to the user.

Body

                            
                                {
                                    "message": "success",
                                    "data": {
                                        "wa_id": "+628123456789",
                                        "conversation_wa_id": "+628987654321",
                                        "conversation_type": "individual",
                                        "start_at": "2024-06-23",
                                        "end_at": "2024-06-23",
                                        "conversations": [
                                            {
                                                "type": "inbound",
                                                "message_type": "image",
                                                "image": {
                                                    "link": "https://motict.com/1719130691.jpeg",
                                                    "caption": "Inbound"
                                                },
                                                "timestamp": "2024-06-23T08:18:11Z"
                                            },
                                            {
                                                "type": "inbound",
                                                "message_type": "text",
                                                "text": {
                                                    "body": "hai"
                                                },
                                                "timestamp": "2024-06-23T08:20:32Z"
                                            }
                                        ]
                                    }
                                }
                            
                        

Parameters

Name Type Description
id String Whatsaap Message ID will be used as call identifier for each request
message String Success or error message. For error response, check Error section for mor details
data.wa_id String The WhatsApp Number
data.conversation_wa_id String Conversation WhatsApp Number
data.conversation_type String The conversation type. (individual/group)
data.start_at String Start date get conversation
data.end_at String End date get conversation
conversations Array
conversation.type String Type of conversation type each message. (inbound/outbound)
conversation.message_type String Type of chat. (text/image)
conversation.text.body String message
conversation.image.link String URL image location
conversation.image.caption String Caption on image
conversation.timestamp String Date time of message