Documentation
Marketing
marketing.share_link_activity
REST
ShippingPOST /api/v1/marketing/share_link_activityMCP tool
Livemarketing.share_link_activityExposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Marketing domain.
Operating contract
Every private link the shop has sent a customer — a quote, an invoice, a document to sign — with how many times it was sent, whether it has been opened, and when.
view_count: 0 ON A SENT LINK IS THE FINDING. It means the customer never opened it, which is very different from a customer who read the quote and did not reply. One of those needs a resend on another channel; the other needs a conversation.
send_count above one means it has already been chased. Read it before suggesting another send.
last_send_error set is a delivery that failed — a wrong number, a bounced address, a carrier rejection. Nothing else in the product surfaces those, and they look identical to silence from the customer.
revoked_at set means somebody deliberately killed the link; expires_at in the past means it aged out on its own. Both make the link dead, and the customer clicking it now sees nothing.
READ ONLY. Minting or re-sending a link puts something in front of a customer, and that belongs to the capability that owns the thing being sent — quotes.send or invoices.send.
TRUNCATION: total is the exact number matching the filters and omitted is how many are not here. When omitted is not 0, call again with offset set to next_offset.
Who may call it
- Permission
marketing.accessThe caller must hold Reviews & market 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 |
|---|---|---|
| target | string | Narrow to one kind of thing the link opens — quote, invoice, document, receipt, customer (their portal) or job. One of:quote, invoice, document, receipt, customer, job |
| unopened_only | boolean | True returns only links that were sent and never opened. |
| days | integer1–365 | How many days back to look, 1-365. Defaults to 30. Default:30 |
| limit | integer1–200 | How many links to return, 1-200. Defaults to 50. Default:50 |
| 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[].target_type | string | — |
| items[].target_id | string | — |
| items[].recipient_name | string | null | — |
| items[].send_count | number | — |
| items[].view_count | number | — |
| items[].last_sent_at | string | null | — |
| items[].last_sent_channel | string | null | — |
| items[].last_send_error | string | null | — |
| items[].last_viewed_at | string | null | — |
| items[].expires_at | string | — |
| items[].revoked_at | string | null | — |
| 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/marketing/share_link_activity \
-H "Authorization: Bearer $SERVICEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"days":30,"limit":50,"offset":0}'const res = await fetch("https://www.servicevin.com/api/v1/marketing/share_link_activity", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"days": 30,
"limit": 50,
"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/marketing/share_link_activity",
headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
json={
"days": 30,
"limit": 50,
"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": "marketing.share_link_activity",
"arguments": {
"days": 30,
"limit": 50,
"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 marketing.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. |