solarOS Organization API

Organization API

Update one Lead

Updates standard Lead fields, customFields, and the Originator using a typed partial object. originatorId credits a different Team Member, logged as an Originator change with its own lead.updated event. No-op updates return changed=false and do not write audit rows, domain events, or timestamp churn. Required scope: leads:write.

/api/v1/leads/{id}

Updates standard Lead fields, customFields, and the Originator using a typed partial object. originatorId credits a different Team Member, logged as an Originator change with its own lead.updated event. No-op updates return changed=false and do not write audit rows, domain events, or timestamp churn. Required scope: leads:write.

Update one Lead. Use an organization API key with leads:write. Check the response envelope and meta.requestId before triggering dependent workflow steps.

Required scopes

leads:write

Parameters

NameInTypeDescription
idrequiredpathstringLead identifier returned by the Organization API.

Request body

objectrequired
FieldTypeDescription
firstNamestringOptional unless marked required.
lastNamestringOptional unless marked required.
emailstring | nullOptional unless marked required.
phonestring | nullOptional unless marked required.
addressstring | nullOptional unless marked required.
citystring | nullOptional unless marked required.
statestring | nullOptional unless marked required.
zipCodestring | nullOptional unless marked required.
sourceIdstring | nullOptional unless marked required.
campaignIdstring | nullOptional unless marked required.
salesTypeIds[]array<string>Optional unless marked required.
notesstring | nullOptional unless marked required.
statusNEW | CONTACTED | QUALIFIED | UNQUALIFIEDOptional unless marked required.
originatorIdstringCredits a different active or draft same-organization Team Member, and writes its own activity entry and updated event. An Originator cannot be cleared. Naming a deactivated Team Member is refused unless they are already the Originator.
customFieldsobjectField Values keyed by savedIdentity from GET /api/v1/schema.
updateleadRequest
{
  "status": "QUALIFIED",
  "customFields": {
    "roofType": "metal"
  }
}

Responses

200

Updated Lead envelope with changed metadata

#/components/schemas/OrgApiResourceEnvelope

400

Validation or custom Field error

#/components/schemas/OrgApiError

401

Missing or invalid organization API key

#/components/schemas/OrgApiError

402

Organization billing access or an endpoint-specific business quota denied the request

#/components/schemas/OrgApiError

403

Missing required scope: leads:write

#/components/schemas/OrgApiError

404

Lead not found

#/components/schemas/OrgApiError

429

Rate limit exceeded

#/components/schemas/OrgApiError

Errors

400 Validation or custom Field error401 Missing or invalid organization API key402 Organization billing access or an endpoint-specific business quota denied the request403 Missing required scope: leads:write404 Lead not found429 Rate limit exceeded

Static examples

curl -X PATCH "$SOLAROS_BASE_URL/api/v1/leads/$SOLAROS_LEAD" \
  -H "Authorization: Bearer $SOLAROS_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"status":"QUALIFIED","customFields":{"roofType":"metal"}}'