Skip to main content
Documentation

Leads

leads.update

Change one detail on a lead record
WritesWrite budget

REST

Shipping
POST /api/v1/leads/update

MCP tool

Live
leads.update

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

Operating contract

PERFORMS EXACTLY ONE CHANGE PER CALL, selected by which parameter you provide: first_name, last_name, company_name, phone, email, vehicle_description, source, estimated_value, follow_up_on or clear_follow_up. To make several changes, call this once per change.

Sending two at once is refused rather than guessed at, so a mistyped field never silently overwrites something nobody meant to touch.

follow_up_on and clear_follow_up are separate parameters on purpose — 'chase them on Tuesday' and 'stop chasing them' are different decisions, and a nullable date field makes the second one look like a typo.

STATUS AND OWNER ARE NOT HERE. leads.set_status and leads.assign are their own capabilities because their consequences are different: a status move can fire the shop's automations, and an assignment rings a teammate. That split is the whole reason a mis-set field here cannot text a customer.

Returns the lead as it now stands.

Who may call it

Permission
leads.accessThe caller must hold Leads 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
writeCounted against the write budget, which is tighter than a read.

Input

FieldTypeDescription
lead_idrequiredstringuuid

The lead to change, as returned by leads.list or leads.get.

first_namestringmax 120 chars

A new first name.

last_namestringmax 120 chars

A new last name.

company_namestringmax 200 chars

A new company name.

phonestringmax 40 chars

A new phone number, any format.

emailstringmax 200 chars

A new email address.

vehicle_descriptionstringmax 300 chars

A new description of the car, in the customer's words.

sourcestringmax 60 chars

A corrected source key, as returned by leads.sources.

estimated_valuenumber0–10000000

What the job is worth if it lands, in the shop's currency.

follow_up_onstring

The date to chase them on, YYYY-MM-DD in the shop's own calendar.

clear_follow_upboolean

True removes the follow-up reminder entirely.

Output

FieldTypeDescription
idstring

namestring

emailstring | null

phonestring | null

sourcestring | null

statusstring

assigned_tostring | null

next_followup_atstring | null

created_atstring

company_namestring | null

vehicle_descriptionstring | null

service_intereststring[]

tagsstring[]

estimated_valuenumber | null

lost_reasonstring | null

last_contacted_atstring | null

customer_idstring | null

stagestring | null

scorenumber | null

updated_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/leads/update \
  -H "Authorization: Bearer $SERVICEVIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lead_id":"9b2f1c6e-4a77-4d2b-9f31-0f1c9a8e5d20"}'

TypeScript (fetch)
const res = await fetch("https://www.servicevin.com/api/v1/leads/update", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "lead_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/leads/update",
    headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
    json={
    "lead_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": "leads.update",
    "arguments": {
      "lead_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 leads.access.
403insufficient_scopeThe credential is read-only and this capability writes.
422validation_errorAn argument was wrong. The message names the field.
429rate_limitedToo many write calls. Back off and retry.
500internal_errorSomething failed on our side. Nothing was changed.