Documentation
Comms
comms.search_messages
REST
ShippingPOST /api/v1/comms/search_messagesMCP tool
Livecomms.search_messagesExposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Comms domain.
Operating contract
Full-text-ish search over message bodies, newest first, across the whole shop or inside one thread. This is how 'did we ever tell them the ceramic price' gets answered without reading two hundred threads.
IT SEARCHES WHAT WAS TYPED, NOT WHAT WAS SAID. A call's transcript is not a message row and does not appear here; comms.get_call_transcript reads those, one call at a time. A shop asking 'did we promise them a discount' may need both, and answering from messages alone will confidently miss a phone call.
Narrow with conversation when you already know the thread — it is much cheaper and the results are in context. Narrow with customer_id to search everything one person ever sent, across every thread they have had.
Each result carries its conversation, so comms.list_messages on that id gives you what came before and after. A match on its own is a sentence without a conversation around it.
TRUNCATION: total is how many messages match and omitted how many are not in this response. Search hits are ordered newest-first, so an omitted above zero means there are OLDER matches you have not seen — which is usually where the original promise was made. Call again with offset set to next_offset.
Who may call it
- Permission
inbox.accessThe caller must hold Inbox at the ACT level. A read-only dashboard grant on the same section is refused.- Plan
- Every planNo plan gate. Available on every Service VIN plan.
- Retries
naturalNaturally idempotent — running it twice leaves the same world as running it once. A retrying integration needs no key.- Rate class
readCounted against the read budget — the widest of the four.
Partial answers
omitted is how many matching records are not in the response, and 0 is a real answer meaning you have all of them. Continue with next_offset.
Do not summarise from a truncated response
Input
| Field | Type | Description |
|---|---|---|
| qrequired | stringmax 120 chars, min 2 chars | Text to look for in message bodies. At least two characters. |
| conversation | stringuuid | Only inside this thread, as returned by comms.list_conversations. |
| customer_id | stringuuid | Only this customer's messages, as returned by customers.list. |
| limit | integer1–100 | How many messages to return, 1-100. Defaults to 25. Default:25 |
| offset | integermin 0 | How many to skip. Pass the previous response's next_offset to continue. Default:0 |
Output
| Field | Type | Description |
|---|---|---|
| items | object[] | — |
| items[].id | string | — |
| items[].conversation | string | — |
| items[].customer_id | string | null | — |
| items[].channel | string | — |
| items[].direction | string | — |
| items[].body | string | null | — |
| items[].status | string | — |
| items[].created_at | string | — |
| total | number | — |
| omitted | number | — |
| next_offset | number | null | — |
Examples
Built from this capability's own schema — required fields and the ones carrying a default, and nothing invented. Paste one and it validates.
export SERVICEVIN_API_KEY=svk_live_…
curl -X POST https://www.servicevin.com/api/v1/comms/search_messages \
-H "Authorization: Bearer $SERVICEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q":"hend","limit":25,"offset":0}'const res = await fetch("https://www.servicevin.com/api/v1/comms/search_messages", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"q": "hend",
"limit": 25,
"offset": 0
}),
});
// Success and failure are both envelopes. Switch on error.code, never
// on error.message — the codes are stable, the messages are for people.
const payload = await res.json();
if (!res.ok) throw new Error(payload.error.code);
const data = payload.data;import os, requests
res = requests.post(
"https://www.servicevin.com/api/v1/comms/search_messages",
headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
json={
"q": "hend",
"limit": 25,
"offset": 0
},
timeout=30,
)
payload = res.json()
if not res.ok:
raise RuntimeError(payload["error"]["code"])
data = payload["data"]{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "comms.search_messages",
"arguments": {
"q": "hend",
"limit": 25,
"offset": 0
}
}
}Refusals
The four gates run in this order on every surface, and the order is not arbitrary — see Authentication.
| Status | Code | When |
|---|---|---|
| 404 | not_found | The id is unknown, or the feature is not enabled for this account. Deliberately the same answer for both. |
| 403 | forbidden | This login does not hold inbox.access. |
| 422 | validation_error | An argument was wrong. The message names the field. |
| 429 | rate_limited | Too many read calls. Back off and retry. |
| 500 | internal_error | Something failed on our side. Nothing was changed. |