Searches messages inside one conversation in the current organization.
/api/search/messagesSearches messages inside one conversation in the current organization. The conversation must belong to the current organization before messages are searched. Results are ordered by text relevance and then by the newest matching message. Pagination defaults to page 1 with 50 items per page, and the maximum page size is 100.
Bearer API key or X-API-Key header.search:readautomation_api)Query parameter. Search query.
Query parameter. Unique identifier of the related conversation.
Query parameter. One-based page number.
Query parameter. Maximum number of records to return.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
{
"data": [
{
"id": "55555555-5555-4555-8555-555555555555",
"orgId": "11111111-1111-4111-8111-111111111111",
"conversationId": "22222222-2222-4222-8222-222222222222",
"senderType": "visitor",
"senderId": "33333333-3333-4333-8333-333333333333",
"content": "I need help with a refund request.",
"type": "text",
"metadata": "example",
"isRead": "example",
"isEdited": "example",
"editedAt": "2026-08-04T10:00:00.000Z",
"createdAt": "2026-06-23T11:00:00.000Z",
"deletedAt": "2026-08-04T10:00:00.000Z",
"replyToId": "11111111-1111-4111-8111-111111111111",
"mentions": "example"
}
],
"pagination": {
"totalItems": 1,
"page": 1,
"pageSize": 50,
"hasNextPage": false,
"hasPrevPage": false
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"fields": {
"property1": "string",
"property2": "string"
},
"details": {},
"correlationId": "string"
}
}curl --request GET \
'https://api.convor.io/api/search/messages?q=refund+request&conversation_id=22222222-2222-4222-8222-222222222222' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer convor_sk_...'const response = await fetch("https://api.convor.io/api/search/messages?q=refund+request&conversation_id=22222222-2222-4222-8222-222222222222", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer convor_sk_..."
},
});
const contentType = response.headers.get("content-type") ?? "";
const data = response.status === 204
? null
: contentType.includes("json")
? await response.json()
: contentType.startsWith("text/")
? await response.text()
: await response.blob();
if (!response.ok) {
const message = typeof data === "object" && data !== null
&& "error" in data && typeof data.error === "object"
&& data.error !== null && "message" in data.error
? String(data.error.message)
: "Convor API request failed (" + response.status + ")";
throw new Error(message);
}
console.log(data);Was this page helpful?