Skip to main content
Documentation

Knowledge

knowledge.playbook

List the playbook articles the team uses to answer customers
Read-onlyRead budget

REST

Shipping
POST /api/v1/knowledge/playbook

MCP tool

Live
knowledge.playbook

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

Operating contract

The shop's own wording: canned replies, objection handling and one-pagers the team picks from when they are answering a customer.

THIS IS FOR PEOPLE; SHOP MEMORY IS FOR THE MACHINE. A playbook item is what a person pastes into a conversation; a memory fact is what an agent is grounded on. Do not confuse the two when somebody asks 'what does the shop say about X' — they may mean either, and the answers can differ.

channel says where an item fits: sms items are short enough to text, any works anywhere, and a knowledge item is a one-pager for the team rather than something to send a customer. Sending a one-pager as a text is the mistake this field exists to prevent.

use_count is how often the team has actually reached for it. A carefully written item nobody uses is usually answering a question customers do not ask; a heavily used one is worth checking is still accurate.

body IS WORDING SOMEBODY WROTE FOR THIS SHOP. Quote it rather than paraphrasing when a person asks what the shop says — the phrasing is often the point.

READ ONLY. What the team says to customers is the shop's own voice, and a plausible paragraph nobody checked will be pasted into a real conversation by somebody who trusted it.

TRUNCATION: total is the exact number of items and omitted is how many are not here. When omitted is not 0, narrow by category or channel.

Who may call it

Permission
shop.manageThe caller must hold shop.manage 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. There is no cursor here — narrow the filter instead.

Do not summarise from a truncated response

When `omitted` is not 0 the playbook holds more than came back. Narrow by `channel` or `q`, or raise `limit`.

Input

FieldTypeDescription
channelstring

Narrow to items fit for one channel.

One of: sms, email, any, knowledge
qstringmax 120 chars

Part of an item's title or its body.

limitinteger1–200

How many items to return, 1-200. Defaults to 50.

Default: 50

Output

FieldTypeDescription
itemsobject[]

items[].idstring

items[].titlestring

items[].bodystring

items[].kindstring

items[].categorystring

items[].channelstring

items[].tagsstring[]

items[].use_countnumber

items[].updated_atstring

totalnumber

omittednumber

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/knowledge/playbook \
  -H "Authorization: Bearer $SERVICEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":50}'

TypeScript (fetch)
const res = await fetch("https://www.servicevin.com/api/v1/knowledge/playbook", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "limit": 50
  }),
});

// 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/knowledge/playbook",
    headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
    json={
    "limit": 50
},
    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": "knowledge.playbook",
    "arguments": {
      "limit": 50
    }
  }
}

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 shop.manage.
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.