Skip to main content
Documentation

Comms

comms.get_message

Get one message with its delivery status and who sent it
Read-onlyRead budget

REST

Shipping
POST /api/v1/comms/get_message

MCP tool

Live
comms.get_message

Exposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Comms domain.

Operating contract

One message's full record: the body as it actually went out, which way it went, which addresses, when, and what the carrier or mail provider said about it.

status AND error_detail TOGETHER ARE THE DELIVERY ANSWER. A failed message has an error_detail naming what went wrong — an unreachable number, a landline, a carrier rejection — and those have completely different fixes. Reporting 'the message failed' without the reason sends a shop looking in the wrong place.

is_ai_generated says whether Service VIN's own agent wrote it rather than a person. When you are summarising a thread for a shop owner, that distinction is one they care about.

THE BODY IS WHAT WAS SENT, NOT WHAT WAS DRAFTED. While the SMS link guardrail is on, an outbound text has had its URLs removed before this row was written, so what you read here is what the customer read. If a body reads as though it is missing a link, that is the guardrail and not a truncation.

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.

Input

FieldTypeDescription
message_idrequiredstringuuid

The message to read, as returned by comms.list_messages or comms.search_messages.

Output

FieldTypeDescription
idstring

conversationstring

customer_idstring | null

channelstring

directionstring

bodystring | null

fromstring | null

tostring | null

statusstring

error_detailstring | null

is_ai_generatedboolean

delivered_atstring | null

created_atstring

Examples

Built from this capability's own schema — required fields and the ones carrying a default, and nothing invented. Paste one and it validates.

curl
export SERVICEVIN_API_KEY=svk_live_…

curl -X POST https://www.servicevin.com/api/v1/comms/get_message \
  -H "Authorization: Bearer $SERVICEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message_id":"9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"}'

TypeScript (fetch)
const res = await fetch("https://www.servicevin.com/api/v1/comms/get_message", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "message_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
  }),
});

// 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;

Python (requests)
import os, requests

res = requests.post(
    "https://www.servicevin.com/api/v1/comms/get_message",
    headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
    json={
    "message_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"])
data = payload["data"]

MCP tools/call — https://www.servicevin.com/api/mcp
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "comms.get_message",
    "arguments": {
      "message_id": "9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"
    }
  }
}

Refusals

The four gates run in this order on every surface, and the order is not arbitrary — see Authentication.

StatusCodeWhen
404not_foundThe id is unknown, or the feature is not enabled for this account. Deliberately the same answer for both.
403forbiddenThis login does not hold inbox.access.
422validation_errorAn argument was wrong. The message names the field.
429rate_limitedToo many read calls. Back off and retry.
500internal_errorSomething failed on our side. Nothing was changed.