Partner API
Prefill
Send whatever you already know about a business from your server. Every field is optional; Kinro asks the customer only for what is still missing.
Prefill tells Kinro what your platform already knows about a business, so your customer doesn't type it again. Call upsert_lead from your server on https://api.kinro.com/mcp with a partner token.
Send what you have
Each call below is valid. Start with whatever your platform has and add fields later. Each extra fact is usually one less question for your customer.
Level 1
Just an ID
Valid on its own. Kinro opens the lead and your customer answers every question.
Skips: Nothing yet
arguments { "external_id": "acct_12345", "mint_customer_token": true }Level 2
The basics
Start hereA good place to start if you have only a few fields.
Skips: Business name, what it does, location, contact
arguments { "external_id": "acct_12345", "mint_customer_token": true, "data": { "business": { "name": "Oak Hill Lawn Care", "trade": "Lawn care" }, "address": { "zip": "78745" }, "contact": { "email": "priya@oakhill.example" } } }Level 3
Everything you have
Fewest questions for your customer. Fields Kinro has no name for, like crm_segment here, reach the advisor as context.
Skips: The basics, plus employees, revenue and coverages
arguments { "external_id": "acct_12345", "mint_customer_token": true, "data": { "business": { "name": "Oak Hill Lawn Care", "trade": "Lawn care" }, "address": { "zip": "78745", "state": "TX" }, "contact": { "first_name": "Priya", "email": "priya@oakhill.example" }, "workforce": { "full_time_employees": 3 }, "financials": { "annual_revenue": 220000 }, "insurance": { "desired_coverages": [ "general_liability" ] }, "context": "Mowing and irrigation. No tree work.", "crm_segment": "landscaping_pro" } }
A few rules of thumb:
- Not sure a value is right? Leave it out, or put it in
contextas a note instead of a field. - Different field names are fine. Kinro also reads common flat names such as
business_name,zip_code,emailandphone. Put the details the advisor needs most first incontext. Long notes may be shortened. - Learned something new? Call again with the same
external_id. See Update as you learn more.
Make the call
Send these headers on every POST https://api.kinro.com/mcp request:
Authorization: Bearer <your_partner_token>Content-Type: application/jsonAccept: application/json, text/event-stream
curl -X POST https://api.kinro.com/mcp \
-H "Authorization: Bearer $KINRO_PARTNER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": "req_1",
"method": "tools/call",
"params": {
"name": "upsert_lead",
"arguments": {
"external_id": "acct_12345",
"mint_customer_token": true,
"data": {
"business": { "name": "Oak Hill Lawn Care", "trade": "Lawn care" },
"address": { "zip": "78745" },
"contact": { "email": "priya@oakhill.example" }
}
}
}
}'const response = await fetch("https://api.kinro.com/mcp", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KINRO_PARTNER_TOKEN}`,
"Content-Type": "application/json",
Accept: "application/json, text/event-stream",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: "req_1",
method: "tools/call",
params: {
name: "upsert_lead",
arguments: {
external_id: account.id,
mint_customer_token: true,
// Send only what you have. Every key is optional.
data: {
business: { name: account.businessName, trade: account.industry },
address: { zip: account.zip },
contact: { email: account.ownerEmail },
},
},
},
}),
});
const { result } = await response.json();
const { lead_id, customer_token } = result.structuredContent;import os
import requests
response = requests.post(
"https://api.kinro.com/mcp",
headers={
"Authorization": f"Bearer {os.environ['KINRO_PARTNER_TOKEN']}",
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream",
},
json={
"jsonrpc": "2.0",
"id": "req_1",
"method": "tools/call",
"params": {
"name": "upsert_lead",
"arguments": {
"external_id": "acct_12345",
"mint_customer_token": True,
"data": {"business": {"name": "Oak Hill Lawn Care"}, "address": {"zip": "78745"}},
},
},
},
)
result = response.json()["result"]["structuredContent"]Keep partner tokens on your server. Never put a kinro_pk_* token in browser JavaScript or a mobile app. Test and live tokens are separate: test tokens reach only sandbox leads. See Sandbox & go-live. To rotate a token without downtime, ask Kinro for a second active token, switch over, then revoke the old one.
What comes back
result.structuredContent:
{
"lead_id": "b9011f24-6a12-4c72-9b88-100000060331",
"external_id": "acct_12345",
"session_id": "54d0c240-9012-43ab-88c1-200000060331",
"session_ref": "ref_01abc23def45",
"customer_token": "kct_...",
"ui_blocks": [],
"created": true
}What to do next depends on your path:
- Embedded partners: pass
customer_tokentoembed.jsin memory. The widget opens with your answers already filled in. - Brokers: keep
lead_idand work the quote with Kinro over the API.
Fields Kinro recognizes
These optional fields have a defined meaning. Other fields can provide context for the advisor.
| Field | Example | What it does |
|---|---|---|
data.business.name | "Oak Hill Lawn Care" | Skips the business name question |
data.business.trade | "Residential lawn care" | What the business does, in plain words. Skips the operations question |
data.address.zip | "78745" | Skips the location question |
data.contact.email, phone, first_name, last_name | "priya@oakhill.example" | The customer's contact details. Any common phone format works |
data.insurance.desired_coverages | ["general_liability"] | Skips coverage selection. Values: general_liability, bop, workers_comp, commercial_auto, professional_liability, cyber, commercial_property, bonds |
data.workforce.full_time_employees | 3 | Skips the employee count question |
data.financials.annual_revenue | 220000 | Whole U.S. dollars. Can fill in the revenue question. An answer already confirmed by the customer takes precedence. A { "min", "max" } range is kept as context |
data.address.street, city, state | "TX" | The business address. state is the 2-letter code |
data.workforce.part_time_employees, data.financials.annual_payroll | 85000 | Kept as context for the advisor |
data.context | "No tree work over 15 ft." | Plain-language notes from your product, passed to the advisor |
| any other key | "crm_segment": "pro" | Kept and passed to the advisor as partner context |
Dates are YYYY-MM-DD. Kinro treats everything you send as information from your platform, never as instructions.
Call options
| Argument | Type | What it does |
|---|---|---|
external_id | string | Your stable ID for this customer: 1–100 letters, digits, _ or -. Recommended: later calls with the same ID update the same lead. Kinro generates one if you omit it. |
lead_id | UUID | Address an existing Kinro lead instead of using external_id. |
data | object | What you know about the business. See the fields above. |
mint_customer_token | boolean | true returns a short-lived customer_token (kct_*) for embed.js. |
files | array | Prior policies, declarations pages, certificates or loss runs. See Documents. |
idempotency_key | string | 4–160 characters. Replaying a completed key returns the same lead and session; reusing it with different arguments returns a tool error. |
contact_consent | object or null | Partner-declared contact consent, if your agreement includes it. See Contact consent. |
Update as you learn more
Call upsert_lead again with the same external_id whenever your platform learns something new:
- Objects such as
addressorworkforcemerge field by field. - Values and arrays such as
desired_coveragesreplace the previous value. - Omitted fields stay as they were.
nullclears a field you sent before.
Documents
Attach prior policies, declarations pages, certificates of insurance or loss runs in files, on the first call or any later one. A current declarations page often answers many questions at once.
{
"external_id": "acct_12345",
"idempotency_key": "doc_acct_12345_loss_runs",
"files": [
{
"file_name": "loss-runs-2025.pdf",
"mime_type": "application/pdf",
"data": "JVBERi0xLjQK..."
}
]
}Send PDF, PNG or JPEG files, base64-encoded. Send one upload at a time. If an upload times out, retry with the same external_id, idempotency_key and files.
Contact consent
By default, Kinro contacts your customers outside the widget only if they opt in themselves, using the unticked consent checkbox in the widget.
If your partner agreement includes partner-declared consent and Kinro has enabled it for your account, you can declare consent per customer:
{
"external_id": "acct_12345",
"contact_consent": { "channels": ["email", "sms", "voice"] }
}- Channels are
"email","sms"and"voice". - Sending
contact_consentbefore it is enabled for your account returns an error. It is never silently ignored. - Send
"contact_consent": nullto withdraw. A customer's own opt-out, such as replying STOP or unsubscribing, always wins.