Conversations
Search conversations
Phone calls, texts, website chats, and emails, most recent activity first. Matches the customer’s name, phone, or email, or words in the title, summary, or category. Customer API.
GET
/
conversations
Search conversations
curl --request GET \
--url https://answeringagent.com/api/v1/conversations \
--header 'X-API-KEY: <api-key>'import requests
url = "https://answeringagent.com/api/v1/conversations"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://answeringagent.com/api/v1/conversations', 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://answeringagent.com/api/v1/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://answeringagent.com/api/v1/conversations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://answeringagent.com/api/v1/conversations")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_matching": 214,
"page": 1,
"next_page": 2,
"conversations": [
{
"id": 184532,
"url": "https://answeringagent.com/dashboard/conversations/184532",
"channel": "phone",
"channels": [
"phone"
],
"started_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z",
"title": "Cancel monthly membership",
"summary": "<string>",
"category": "cancellation",
"customer": {
"name": "Dana Ruiz",
"phone": "+15125550118",
"email": "dana.ruiz@example.com"
},
"phone_line": {
"id": 2181,
"name": "Westside Wash",
"phone_number": "+15125550142"
},
"duration_seconds": 214,
"has_recording": true
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "This endpoint accepts GET.",
"code": "method_not_allowed"
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}Authorizations
Query Parameters
Words to search for.
Maximum string length:
100Only conversations that happened on this channel. A call the customer replied to by text counts as text too.
Available options:
phone, text, web_chat, email Created within this window. Every window starts at midnight in the team's timezone. Omit for all time.
Available options:
today, yesterday, 7d, 14d, 30d, 90d, 365d, mtd, ytd Results per page.
Required range:
1 <= x <= 50Page number. Use next_page from the previous response.
Required range:
x >= 1⌘I
Search conversations
curl --request GET \
--url https://answeringagent.com/api/v1/conversations \
--header 'X-API-KEY: <api-key>'import requests
url = "https://answeringagent.com/api/v1/conversations"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://answeringagent.com/api/v1/conversations', 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://answeringagent.com/api/v1/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://answeringagent.com/api/v1/conversations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://answeringagent.com/api/v1/conversations")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_matching": 214,
"page": 1,
"next_page": 2,
"conversations": [
{
"id": 184532,
"url": "https://answeringagent.com/dashboard/conversations/184532",
"channel": "phone",
"channels": [
"phone"
],
"started_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z",
"title": "Cancel monthly membership",
"summary": "<string>",
"category": "cancellation",
"customer": {
"name": "Dana Ruiz",
"phone": "+15125550118",
"email": "dana.ruiz@example.com"
},
"phone_line": {
"id": 2181,
"name": "Westside Wash",
"phone_number": "+15125550142"
},
"duration_seconds": 214,
"has_recording": true
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}{
"error": "This endpoint accepts GET.",
"code": "method_not_allowed"
}{
"error": "That conversation is not available.",
"code": "not_found",
"issues": [
{
"path": [
"<unknown>"
],
"message": "<string>"
}
]
}