Documentation
Leads
leads.create
REST
ShippingPOST /api/v1/leads/createMCP tool
Liveleads.createExposed on: REST API · Shop MCP server · Claude connector · Dash (in-app copilot) · Zapier. Part of the Leads domain.
Operating contract
Runs the same intake pipeline every website form, lead form and public API submission runs, which means it DE-DUPLICATES: when this contact already has an open lead, the enquiry is folded into it and merged comes back true with the existing lead's id, rather than a second lead appearing on the board.
That is the reason to use this rather than assembling a lead yourself. A shop working two half-records for one person is the most common mess in this domain, and it is created one hand-typed lead at a time.
Something to work with is required: a name, a company, a phone number or an email. A lead nobody can contact is not a lead.
source is where this enquiry came from and it should be the truth — call leads.sources for the keys this shop already uses. It flows into every attribution report, so a lead stamped with the wrong channel quietly credits the wrong spend.
message becomes the first note on the lead's timeline, in the customer's own words. Put what they actually said there rather than a summary of it.
The shop's round-robin rotation, its new-lead alerts and its Lead Responder all fire from here exactly as they do for a website submission — so this can result in the shop texting the customer if they have that automation on.
Returns lead_id and merged. lead_id is what every other capability in this domain takes.
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
| Field | Type | Description |
|---|---|---|
| first_name | stringmax 120 chars | Their first name. |
| last_name | stringmax 120 chars | Their last name. |
| company_name | stringmax 200 chars | Their company, for a fleet or trade enquiry. |
| phone | stringmax 40 chars | A phone number in any format. Required unless an email or a name is given. |
| stringmax 200 chars | An email address. | |
| vehicle_description | stringmax 300 chars | The car in their own words — '2022 Model Y', 'my wife's Q5'. |
| services | string[] | What they asked about, as free text. Up to 12. |
| source | stringmax 60 chars | Where the enquiry came from, as a key from leads.sources. Default:"api" |
| message | stringmax 2000 chars | What they actually said. Becomes the first note on the lead's timeline. |
| estimated_value | number0–10000000 | What the job is worth if it lands, in the shop's currency. |
Output
| Field | Type | Description |
|---|---|---|
| lead_id | string | — |
| merged | boolean | — |
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/leads/create \
-H "Authorization: Bearer $SERVICEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"source":"api"}'const res = await fetch("https://www.servicevin.com/api/v1/leads/create", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SERVICEVIN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"source": "api"
}),
});
// 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/leads/create",
headers={"Authorization": f"Bearer {os.environ['SERVICEVIN_API_KEY']}"},
json={
"source": "api"
},
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": "leads.create",
"arguments": {
"source": "api"
}
}
}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 leads.access. |
| 403 | insufficient_scope | The credential is read-only and this capability writes. |
| 422 | validation_error | An argument was wrong. The message names the field. |
| 429 | rate_limited | Too many write calls. Back off and retry. |
| 500 | internal_error | Something failed on our side. Nothing was changed. |