curl --request PATCH \
--url https://www.presolve.com/api/v1/leads/{leadId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"caseType": "<string>",
"description": "<string>",
"surveyDetails": {},
"lemonLaw": {
"make": "<string>",
"model": "<string>",
"year": 2000,
"vin": "<string>",
"purchaseDate": "<string>",
"acquisitionMonth": "<string>",
"dealerName": "<string>",
"lienholderName": "<string>",
"repairAttempts": 1073741823,
"issues": "<string>",
"firstRepairDate": "<string>",
"firstRepairMileage": 1073741823,
"daysOutOfService": 1073741823,
"currentMileage": 1073741823,
"purchaseMileage": 1073741823,
"soldOrTradedNotes": "<string>"
}
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
caseType: '<string>',
description: '<string>',
surveyDetails: {},
lemonLaw: {
make: '<string>',
model: '<string>',
year: 2000,
vin: '<string>',
purchaseDate: '<string>',
acquisitionMonth: '<string>',
dealerName: '<string>',
lienholderName: '<string>',
repairAttempts: 1073741823,
issues: '<string>',
firstRepairDate: '<string>',
firstRepairMileage: 1073741823,
daysOutOfService: 1073741823,
currentMileage: 1073741823,
purchaseMileage: 1073741823,
soldOrTradedNotes: '<string>'
}
})
};
fetch('https://www.presolve.com/api/v1/leads/{leadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.presolve.com/api/v1/leads/{leadId}"
payload = {
"caseType": "<string>",
"description": "<string>",
"surveyDetails": {},
"lemonLaw": {
"make": "<string>",
"model": "<string>",
"year": 2000,
"vin": "<string>",
"purchaseDate": "<string>",
"acquisitionMonth": "<string>",
"dealerName": "<string>",
"lienholderName": "<string>",
"repairAttempts": 1073741823,
"issues": "<string>",
"firstRepairDate": "<string>",
"firstRepairMileage": 1073741823,
"daysOutOfService": 1073741823,
"currentMileage": 1073741823,
"purchaseMileage": 1073741823,
"soldOrTradedNotes": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}Update a lead
Updates lead and linked case fields. Status changes route through the guarded transition machinery — use POST /leads//transitions for status moves.
Supports one selected organization via organizationId. Omit it to use the key’s organization. HQ descendant access requires an active acting attorney with hq:view_child_orgs, cases:view, cases:view_all, hq:view_all_cases, hq:manage_child_orgs, cases:edit, cases:assign, cases:change_status, intake:edit. Existing key scopes still apply. The selector requires an integration API key; legacy partner/OIDC routing is unchanged. Repeat the selector on every cursor page, related mutation, upload completion, and detail/download request. Mutation key scopes, idempotency, revisions, and resource-specific eligibility still apply. See HQ authorization.
Requires the leads:write scope. Legacy partner API keys and OIDC bearer tokens are also accepted on this endpoint (shipped behavior, unchanged); integration keys are scope-enforced. Rate tier: write.
curl --request PATCH \
--url https://www.presolve.com/api/v1/leads/{leadId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"caseType": "<string>",
"description": "<string>",
"surveyDetails": {},
"lemonLaw": {
"make": "<string>",
"model": "<string>",
"year": 2000,
"vin": "<string>",
"purchaseDate": "<string>",
"acquisitionMonth": "<string>",
"dealerName": "<string>",
"lienholderName": "<string>",
"repairAttempts": 1073741823,
"issues": "<string>",
"firstRepairDate": "<string>",
"firstRepairMileage": 1073741823,
"daysOutOfService": 1073741823,
"currentMileage": 1073741823,
"purchaseMileage": 1073741823,
"soldOrTradedNotes": "<string>"
}
}
'const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
caseType: '<string>',
description: '<string>',
surveyDetails: {},
lemonLaw: {
make: '<string>',
model: '<string>',
year: 2000,
vin: '<string>',
purchaseDate: '<string>',
acquisitionMonth: '<string>',
dealerName: '<string>',
lienholderName: '<string>',
repairAttempts: 1073741823,
issues: '<string>',
firstRepairDate: '<string>',
firstRepairMileage: 1073741823,
daysOutOfService: 1073741823,
currentMileage: 1073741823,
purchaseMileage: 1073741823,
soldOrTradedNotes: '<string>'
}
})
};
fetch('https://www.presolve.com/api/v1/leads/{leadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.presolve.com/api/v1/leads/{leadId}"
payload = {
"caseType": "<string>",
"description": "<string>",
"surveyDetails": {},
"lemonLaw": {
"make": "<string>",
"model": "<string>",
"year": 2000,
"vin": "<string>",
"purchaseDate": "<string>",
"acquisitionMonth": "<string>",
"dealerName": "<string>",
"lienholderName": "<string>",
"repairAttempts": 1073741823,
"issues": "<string>",
"firstRepairDate": "<string>",
"firstRepairMileage": 1073741823,
"daysOutOfService": 1073741823,
"currentMileage": 1073741823,
"purchaseMileage": 1073741823,
"soldOrTradedNotes": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>"
}Authorizations
Org-issued integration API key (service account credential). The plaintext secret is shown once at creation.
Path Parameters
Lead id
Query Parameters
Select one organization for this request. Defaults to the key organization. An HQ key may select an active descendant when its active acting attorney has the required HQ and resource permissions. Repeat the same organizationId on related mutations, upload completion, detail requests, and every cursor page. See /authorization.
Body
PATCH rejects leadStatus combined with any lemonLaw object or, for effective caseType "Lemon Law", a canonical Lemon Law intake field written through surveyDetails (such as vehicleMake) with HTTP 400 before changes are made: save those intake fields first, then request the status transition separately. Null-valued survey entries are skipped. Unrelated survey fields and empty surveyDetails: {} may accompany leadStatus; other case types retain their existing surveyDetails behavior. Other legacy lead properties retain their existing imperative validation; see docs/api/v1-public-api.md and docs/partner-lemon-law-intake.md for the canonical keys.
Intake answers keyed by accessor (max 200 keys). Null-valued entries are skipped. Do not duplicate an accessor supplied through lemonLaw, even with the same value.
Show child attributes
Show child attributes
Optional structured Lemon Law intake. Requires effective caseType "Lemon Law"; PATCH may inherit the stored case type. Supplied fields overwrite canonical survey answers and take precedence over client-derived values. Omitted fields are preserved. Nulls, blanks, unknown fields, and overlapping surveyDetails accessors return HTTP 400. Use surveyDetails for intentional blanks.
Show child attributes
Show child attributes