Contact Conversations
Get Messages for Contact
GET
/
get_contact_conversation_messages
Get Messages for Contact
curl --request GET \
--url https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"data": {
"contact": {
"contact_id": "<string>",
"user_email_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_interacted_at": "2023-11-07T05:31:56Z",
"contact_queries": 123,
"is_blacklisted": true,
"is_frozen": true,
"frozen_until": "2023-11-07T05:31:56Z"
},
"conversations": [
{
"conversation_id": "<string>",
"conversation_status": "<string>",
"conversation_type": "<string>",
"assigned_to": "<string>",
"chatbot_id": "<string>",
"messages": [
{
"message_id": "<string>",
"content": "<string>",
"role": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"message_order": 123,
"wa_messages": [
{
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"data": {}
}
],
"instagram_messages": [
"<unknown>"
],
"messenger_messages": [
"<unknown>"
]
}
]
}
]
}
}
}Returns all conversations and messages for a given
contact_id.Authorizations
Use the idToken retrieved from /get_id_token as the Bearer token.
Query Parameters
The unique ID of the contact to fetch messages for.
Example:
"096662f6-5acc-4699-923c-f7326936b39f"
Filter messages by communication channel.
Available options:
whatsapp, instagram, messenger, website Example:
"whatsapp"
Maximum number of messages to return.
Required range:
1 <= x <= 100Example:
50
Number of messages to skip before starting to collect the result set.
Required range:
x >= 0Example:
0
Whether to group messages by conversation, when set to false, the response will contain a flat list of messages.
Example:
true
Response
200 - application/json
Contact with all conversations and messages.
Show child attributes
Show child attributes
⌘I
Get Messages for Contact
curl --request GET \
--url https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"data": {
"contact": {
"contact_id": "<string>",
"user_email_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_interacted_at": "2023-11-07T05:31:56Z",
"contact_queries": 123,
"is_blacklisted": true,
"is_frozen": true,
"frozen_until": "2023-11-07T05:31:56Z"
},
"conversations": [
{
"conversation_id": "<string>",
"conversation_status": "<string>",
"conversation_type": "<string>",
"assigned_to": "<string>",
"chatbot_id": "<string>",
"messages": [
{
"message_id": "<string>",
"content": "<string>",
"role": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"message_order": 123,
"wa_messages": [
{
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"data": {}
}
],
"instagram_messages": [
"<unknown>"
],
"messenger_messages": [
"<unknown>"
]
}
]
}
]
}
}
}