curl --request GET \
--url https://api.example.com/api/conversations/{route_name}/messages/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/api/conversations/{route_name}/messages/search"
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://api.example.com/api/conversations/{route_name}/messages/search', 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.example.com/api/conversations/{route_name}/messages/search",
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://api.example.com/api/conversations/{route_name}/messages/search"
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://api.example.com/api/conversations/{route_name}/messages/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/conversations/{route_name}/messages/search")
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{
"data": {
"items": [
{
"client_address": "<string>",
"created_at": 123,
"door": "api",
"inbound_text": "<string>",
"message_id": "<string>",
"origin": "client",
"route_name": "<string>",
"thread_id": "<string>",
"updated_at": 123,
"answer": "<string>",
"answer_parts": [
{
"data": {
"options": {},
"values": {}
},
"footer": "<string>",
"header": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
},
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"media": [
{
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"message": "",
"options": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"pages": [
{
"fields": [
"<string>"
],
"title": "<string>"
}
],
"schema": {},
"sections": [
{
"rows": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"title": "<string>"
}
],
"template": {
"language": "<string>",
"name": "<string>",
"body_parameters": [
"<string>"
],
"buttons": [
{
"payload": "<string>",
"kind": "quick_reply"
}
],
"header_media": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
}
}
],
"answer_status": "answered",
"attempts": 123,
"callback_url": "<string>",
"caller_principal": "<string>",
"channel": "<string>",
"delivery_status": "pending_delivery",
"error": "<string>",
"inbound_attachments": [
{
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"inbound_event": {},
"inbound_form": {},
"inbound_kind": "message",
"inbound_locale": "<string>",
"inbound_location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"our_identity": "<string>",
"outbound_message_ids": [
"<string>"
],
"provider_message_id": "<string>",
"submitted_by": "<string>"
}
],
"next_page": 123,
"page": 123,
"page_size": 123,
"total": 123,
"truncated": true
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Search a conversation route's messages
Every record on route_name whose inbound text or answer contains q, across ALL
the route’s threads, one page at a time.
The search spans every caller and address on the route, so it is admin-only, and each item
is the WHOLE record (the same shape the transcript serves an admin). q is REQUIRED and
non-blank. There is no per-route record index, so the search is a BOUNDED nested scan of
the route’s threads and their records; a page that spent its scan budget answers
truncated: true LOUDLY, never a silent cut.
Authorization is decided BEFORE the route is looked up, so a non-admin is refused the same
way whether the name routes or not. An unknown route is a loud 404 to an admin; a blank
q, a page/page_size below 1, or a page above the served maximum, is a 400.
Returns {"items", "total", "page", "page_size", "next_page", "truncated"}, where
total is the matches the bounded scan found.
curl --request GET \
--url https://api.example.com/api/conversations/{route_name}/messages/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/api/conversations/{route_name}/messages/search"
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://api.example.com/api/conversations/{route_name}/messages/search', 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.example.com/api/conversations/{route_name}/messages/search",
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://api.example.com/api/conversations/{route_name}/messages/search"
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://api.example.com/api/conversations/{route_name}/messages/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/conversations/{route_name}/messages/search")
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{
"data": {
"items": [
{
"client_address": "<string>",
"created_at": 123,
"door": "api",
"inbound_text": "<string>",
"message_id": "<string>",
"origin": "client",
"route_name": "<string>",
"thread_id": "<string>",
"updated_at": 123,
"answer": "<string>",
"answer_parts": [
{
"data": {
"options": {},
"values": {}
},
"footer": "<string>",
"header": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
},
"location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"media": [
{
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"message": "",
"options": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"pages": [
{
"fields": [
"<string>"
],
"title": "<string>"
}
],
"schema": {},
"sections": [
{
"rows": [
{
"text": "<string>",
"description": "<string>",
"id": "<string>",
"kind": "reply"
}
],
"title": "<string>"
}
],
"template": {
"language": "<string>",
"name": "<string>",
"body_parameters": [
"<string>"
],
"buttons": [
{
"payload": "<string>",
"kind": "quick_reply"
}
],
"header_media": {
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
}
}
],
"answer_status": "answered",
"attempts": 123,
"callback_url": "<string>",
"caller_principal": "<string>",
"channel": "<string>",
"delivery_status": "pending_delivery",
"error": "<string>",
"inbound_attachments": [
{
"kind": "image",
"url": "<string>",
"caption": "<string>",
"filename": "<string>"
}
],
"inbound_event": {},
"inbound_form": {},
"inbound_kind": "message",
"inbound_locale": "<string>",
"inbound_location": {
"latitude": 123,
"longitude": 123,
"address": "<string>",
"name": "<string>"
},
"our_identity": "<string>",
"outbound_message_ids": [
"<string>"
],
"provider_message_id": "<string>",
"submitted_by": "<string>"
}
],
"next_page": 123,
"page": 123,
"page_size": 123,
"total": 123,
"truncated": true
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Path Parameters
Query Parameters
1-based page number, newest activity first.
1 <= x <= 1000000Items per page. A larger value is capped to 200, never refused.
x >= 1The text to search the route's records for.
1\SResponse
Success.
A page of a route's message-search matches (admin-only, so always full records).
Show child attributes
Show child attributes

