QueryCommunicationsAPI is the JSON-body form of the shared communications
curl --request POST \
--url https://api.erdo.ai/v1/communications/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": "<string>",
"channel": "<string>",
"context": {},
"conversation": "<string>",
"counterpart": [
"<string>"
],
"cursor": "<string>",
"direction": "<string>",
"include": "<string>",
"limit": 123,
"recipient": "<string>",
"sender": "<string>",
"since": "<string>",
"subject": "<string>",
"until": "<string>",
"widget": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/communications/query"
payload = {
"agent": "<string>",
"channel": "<string>",
"context": {},
"conversation": "<string>",
"counterpart": ["<string>"],
"cursor": "<string>",
"direction": "<string>",
"include": "<string>",
"limit": 123,
"recipient": "<string>",
"sender": "<string>",
"since": "<string>",
"subject": "<string>",
"until": "<string>",
"widget": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent: '<string>',
channel: '<string>',
context: {},
conversation: '<string>',
counterpart: ['<string>'],
cursor: '<string>',
direction: '<string>',
include: '<string>',
limit: 123,
recipient: '<string>',
sender: '<string>',
since: '<string>',
subject: '<string>',
until: '<string>',
widget: '<string>'
})
};
fetch('https://api.erdo.ai/v1/communications/query', 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://api.erdo.ai/v1/communications/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent' => '<string>',
'channel' => '<string>',
'context' => [
],
'conversation' => '<string>',
'counterpart' => [
'<string>'
],
'cursor' => '<string>',
'direction' => '<string>',
'include' => '<string>',
'limit' => 123,
'recipient' => '<string>',
'sender' => '<string>',
'since' => '<string>',
'subject' => '<string>',
'until' => '<string>',
'widget' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.erdo.ai/v1/communications/query"
payload := strings.NewReader("{\n \"agent\": \"<string>\",\n \"channel\": \"<string>\",\n \"context\": {},\n \"conversation\": \"<string>\",\n \"counterpart\": [\n \"<string>\"\n ],\n \"cursor\": \"<string>\",\n \"direction\": \"<string>\",\n \"include\": \"<string>\",\n \"limit\": 123,\n \"recipient\": \"<string>\",\n \"sender\": \"<string>\",\n \"since\": \"<string>\",\n \"subject\": \"<string>\",\n \"until\": \"<string>\",\n \"widget\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.erdo.ai/v1/communications/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent\": \"<string>\",\n \"channel\": \"<string>\",\n \"context\": {},\n \"conversation\": \"<string>\",\n \"counterpart\": [\n \"<string>\"\n ],\n \"cursor\": \"<string>\",\n \"direction\": \"<string>\",\n \"include\": \"<string>\",\n \"limit\": 123,\n \"recipient\": \"<string>\",\n \"sender\": \"<string>\",\n \"since\": \"<string>\",\n \"subject\": \"<string>\",\n \"until\": \"<string>\",\n \"widget\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/communications/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent\": \"<string>\",\n \"channel\": \"<string>\",\n \"context\": {},\n \"conversation\": \"<string>\",\n \"counterpart\": [\n \"<string>\"\n ],\n \"cursor\": \"<string>\",\n \"direction\": \"<string>\",\n \"include\": \"<string>\",\n \"limit\": 123,\n \"recipient\": \"<string>\",\n \"sender\": \"<string>\",\n \"since\": \"<string>\",\n \"subject\": \"<string>\",\n \"until\": \"<string>\",\n \"widget\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"as_of": "2023-11-07T05:31:56Z",
"coverage": {},
"items": [
{
"call": {
"actor": "<string>",
"agent": "<string>",
"booked_at": "2023-11-07T05:31:56Z",
"booked_start": "2023-11-07T05:31:56Z",
"counterpart_spoken_turn_count": 123,
"dial_outcome": "<string>",
"duration_seconds": -1,
"has_transcript": true,
"status": "<string>",
"summary": "<string>"
},
"channel": "<string>",
"content_complete": true,
"continuation": "<string>",
"conversation": "<string>",
"direction": "<string>",
"email": {
"auto_submitted": true,
"bounce_classification": "<string>",
"cc": [
"<string>"
],
"context": "<unknown>",
"delivered_at": "2023-11-07T05:31:56Z",
"in_reply_to": "<string>",
"inbound_id": "<string>",
"message_id": "<string>",
"reason": "<string>",
"references": [
"<string>"
],
"relayed_email_id": "<string>",
"status": "<string>",
"subject": "<string>"
},
"ended_at": "2023-11-07T05:31:56Z",
"from": "<string>",
"id": "<string>",
"kind": "<string>",
"messages": [
{
"at": "2023-11-07T05:31:56Z",
"html": "<string>",
"role": "<string>",
"text": "<string>"
}
],
"messaging": {
"attachment_file_ids": [
"<string>"
],
"compliance": true,
"context": "<unknown>",
"delivered_at": "2023-11-07T05:31:56Z",
"failure_class": "<string>",
"location": "<unknown>",
"media": "<unknown>",
"media_count": -1,
"read_at": "2023-11-07T05:31:56Z",
"referral": "<unknown>",
"status": "<string>",
"suppressed": true
},
"occurred_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"to": [
"<string>"
],
"widget": {
"booked_at": "2023-11-07T05:31:56Z",
"booked_start": "2023-11-07T05:31:56Z",
"has_transcript": true,
"modality": "<string>",
"summary": "<string>",
"visitor_identity": "<unknown>",
"widget": "<string>"
}
}
],
"next_cursor": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}API Reference
QueryCommunicationsAPI is the JSON-body form of the shared communications
read, for filters such as context that are naturally structured JSON.
POST
/
v1
/
communications
/
query
QueryCommunicationsAPI is the JSON-body form of the shared communications
curl --request POST \
--url https://api.erdo.ai/v1/communications/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent": "<string>",
"channel": "<string>",
"context": {},
"conversation": "<string>",
"counterpart": [
"<string>"
],
"cursor": "<string>",
"direction": "<string>",
"include": "<string>",
"limit": 123,
"recipient": "<string>",
"sender": "<string>",
"since": "<string>",
"subject": "<string>",
"until": "<string>",
"widget": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/communications/query"
payload = {
"agent": "<string>",
"channel": "<string>",
"context": {},
"conversation": "<string>",
"counterpart": ["<string>"],
"cursor": "<string>",
"direction": "<string>",
"include": "<string>",
"limit": 123,
"recipient": "<string>",
"sender": "<string>",
"since": "<string>",
"subject": "<string>",
"until": "<string>",
"widget": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent: '<string>',
channel: '<string>',
context: {},
conversation: '<string>',
counterpart: ['<string>'],
cursor: '<string>',
direction: '<string>',
include: '<string>',
limit: 123,
recipient: '<string>',
sender: '<string>',
since: '<string>',
subject: '<string>',
until: '<string>',
widget: '<string>'
})
};
fetch('https://api.erdo.ai/v1/communications/query', 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://api.erdo.ai/v1/communications/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent' => '<string>',
'channel' => '<string>',
'context' => [
],
'conversation' => '<string>',
'counterpart' => [
'<string>'
],
'cursor' => '<string>',
'direction' => '<string>',
'include' => '<string>',
'limit' => 123,
'recipient' => '<string>',
'sender' => '<string>',
'since' => '<string>',
'subject' => '<string>',
'until' => '<string>',
'widget' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.erdo.ai/v1/communications/query"
payload := strings.NewReader("{\n \"agent\": \"<string>\",\n \"channel\": \"<string>\",\n \"context\": {},\n \"conversation\": \"<string>\",\n \"counterpart\": [\n \"<string>\"\n ],\n \"cursor\": \"<string>\",\n \"direction\": \"<string>\",\n \"include\": \"<string>\",\n \"limit\": 123,\n \"recipient\": \"<string>\",\n \"sender\": \"<string>\",\n \"since\": \"<string>\",\n \"subject\": \"<string>\",\n \"until\": \"<string>\",\n \"widget\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.erdo.ai/v1/communications/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent\": \"<string>\",\n \"channel\": \"<string>\",\n \"context\": {},\n \"conversation\": \"<string>\",\n \"counterpart\": [\n \"<string>\"\n ],\n \"cursor\": \"<string>\",\n \"direction\": \"<string>\",\n \"include\": \"<string>\",\n \"limit\": 123,\n \"recipient\": \"<string>\",\n \"sender\": \"<string>\",\n \"since\": \"<string>\",\n \"subject\": \"<string>\",\n \"until\": \"<string>\",\n \"widget\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/communications/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent\": \"<string>\",\n \"channel\": \"<string>\",\n \"context\": {},\n \"conversation\": \"<string>\",\n \"counterpart\": [\n \"<string>\"\n ],\n \"cursor\": \"<string>\",\n \"direction\": \"<string>\",\n \"include\": \"<string>\",\n \"limit\": 123,\n \"recipient\": \"<string>\",\n \"sender\": \"<string>\",\n \"since\": \"<string>\",\n \"subject\": \"<string>\",\n \"until\": \"<string>\",\n \"widget\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"as_of": "2023-11-07T05:31:56Z",
"coverage": {},
"items": [
{
"call": {
"actor": "<string>",
"agent": "<string>",
"booked_at": "2023-11-07T05:31:56Z",
"booked_start": "2023-11-07T05:31:56Z",
"counterpart_spoken_turn_count": 123,
"dial_outcome": "<string>",
"duration_seconds": -1,
"has_transcript": true,
"status": "<string>",
"summary": "<string>"
},
"channel": "<string>",
"content_complete": true,
"continuation": "<string>",
"conversation": "<string>",
"direction": "<string>",
"email": {
"auto_submitted": true,
"bounce_classification": "<string>",
"cc": [
"<string>"
],
"context": "<unknown>",
"delivered_at": "2023-11-07T05:31:56Z",
"in_reply_to": "<string>",
"inbound_id": "<string>",
"message_id": "<string>",
"reason": "<string>",
"references": [
"<string>"
],
"relayed_email_id": "<string>",
"status": "<string>",
"subject": "<string>"
},
"ended_at": "2023-11-07T05:31:56Z",
"from": "<string>",
"id": "<string>",
"kind": "<string>",
"messages": [
{
"at": "2023-11-07T05:31:56Z",
"html": "<string>",
"role": "<string>",
"text": "<string>"
}
],
"messaging": {
"attachment_file_ids": [
"<string>"
],
"compliance": true,
"context": "<unknown>",
"delivered_at": "2023-11-07T05:31:56Z",
"failure_class": "<string>",
"location": "<unknown>",
"media": "<unknown>",
"media_count": -1,
"read_at": "2023-11-07T05:31:56Z",
"referral": "<unknown>",
"status": "<string>",
"suppressed": true
},
"occurred_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"to": [
"<string>"
],
"widget": {
"booked_at": "2023-11-07T05:31:56Z",
"booked_start": "2023-11-07T05:31:56Z",
"has_transcript": true,
"modality": "<string>",
"summary": "<string>",
"visitor_identity": "<unknown>",
"widget": "<string>"
}
}
],
"next_cursor": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
Body
application/json

