solarOSsolarOS Docs

Update one Lead

Updates standard Lead fields and customFields using a typed partial object. No-op updates return changed=false and do not write audit rows, domain events, or timestamp churn. Required scope: leads:write.

PATCH
/leads/{id}

Updates standard Lead fields and customFields using a typed partial object. No-op updates return changed=false and do not write audit rows, domain events, or timestamp churn. Required scope: leads:write.

Authorization

Authorization<token>

Organization API key. Format: Bearer sk_live_...

In: header

Path Parameters

id*string

Lead identifier returned by the Organization API.

Request Body

application/json

JSON request payload for updateLead.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/leads/string" \  -H "Content-Type: application/json" \  -d '{    "status": "QUALIFIED",    "customFields": {      "roofType": "metal"    }  }'
{  "data": {},  "meta": {    "requestId": "string",    "version": "v1",    "timestamp": "2019-08-24T14:15:22Z",    "rateLimit": {      "limit": 0,      "remaining": 0,      "reset": 0    }  }}