Documentation
Automations
automations.activity
REST
ShippingPOST /api/v1/automations/activityMCP tool
Liveautomations.activityExposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Automations domain.
Operating contract
The run log: every time a rule fired, what it fired on, and whether it worked.
THIS IS THE ONLY PLACE A SHOP CAN SEE WHAT ITS AUTOMATIONS ARE DOING TO ITS CUSTOMERS. A rule's run_count is a number; this is the list of people it happened to.
status separates a run that did something from one that was evaluated and skipped — a cooldown still in force, a customer who opted out, a condition that did not match. A large skip count is not a fault; it is usually the cooldown doing its job.
subject_customer_id and subject_lead_id are who it happened to, and they are what customers.get and leads.get take. A customer appearing repeatedly in a short window is worth checking against the rule's cooldown.
APPEND-ONLY. A run is a record of something that happened and nothing in this registry edits or removes one.
TRUNCATION: total is the exact number of matching runs and omitted is how many are not here. When omitted is not 0, narrow the window — an automation audit built on a partial log is one that missed the sends somebody is asking about.
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
Input
| Field | Type | Description |
|---|---|---|
| automation_id | stringuuid | One rule's id, as returned by automations.list. |
| status | stringmax 40 chars | One run status, exactly as it appears on another row. |
| days | integer1–180 | How many days back to read, 1-180. Defaults to 14. Default:14 |
| limit | integer1–200 | How many runs to return, 1-200. Defaults to 50. Default:50 |
Output
| Field | Type | Description |
|---|---|---|
| items | object[] | — |
| items[].id | string | — |
| items[].automation_id | string | — |
| items[].trigger_type | string | — |
| items[].status | string | — |
| items[].customer_id | string | null | — |
| items[].lead_id | string | null | — |
| items[].created_at | string | — |
| total | number | — |
| omitted | number | — |
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/automations/activity \
-H "Authorization: Bearer $SERVICEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"days":14,"limit":50}'const res = await fetch("https://www.servicevin.com/api/v1/automations/activity", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"days": 14,
"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;import os, requests
res = requests.post(
"https://www.servicevin.com/api/v1/automations/activity",
headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
json={
"days": 14,
"limit": 50
},
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": "automations.activity",
"arguments": {
"days": 14,
"limit": 50
}
}
}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 shop.manage. |
| 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. |