Update Lead
const url = 'https://api.nuntius.chat/public/v1/leads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"stageId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","quality":"example","assignedOperatorId":"example","notes":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.nuntius.chat/public/v1/leads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "stageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "quality": "example", "assignedOperatorId": "example", "notes": "example" }'Partially update stageId/quality/assignedOperatorId/notes – the curated field
set SPEC_API_PUBLICA.md §2.1 names for this endpoint (see PublicLeadUpdateRequest’s own
docstring for why it is narrower than the internal PATCH).
Foreign/unknown leadId or stageId/assignedOperatorId referencing another tenant
-> 404, zero persistence (resolved BEFORE any field is mutated).
Permiso necesario: tenant:leads.manage
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»Request Bodyrequired
Sección titulada «Request Bodyrequired»PATCH /public/v1/leads/{id} body – all fields optional (partial update).
Curated to EXACTLY the four fields SPEC_API_PUBLICA.md §2.1 names for this endpoint
(stageId/quality/assignedOperatorId/notes) – narrower than the internal
PATCH /leads/{id} on purpose: a third party may move a lead through the pipeline and
annotate/reassign it, never rewrite its identity/contact data (customerName/
customerPhone/etc. stay Platform-only, same curation reasoning as excluding
mark-contacted/push-to-crm from this surface entirely).
object
Examplegenerated
{ "stageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "quality": "example", "assignedOperatorId": "example", "notes": "example"}Responses
Sección titulada «Responses»Successful Response
Lead shape returned by the public list/get/create/update endpoints.
Curated subset of the internal LeadOut (schemas/leads.py): drops
originChannelId/originChannelName (MCH-7 internal attribution, meaningless to a third-
party integration) and the legacy stage string mirror (stageId is the single canonical
field on this NEW contract – no legacy bridge to preserve here, unlike the internal shape
which still serves pre-KAN consumers).
object
Examplegenerated
{ "id": "example", "customerId": "example", "conversationId": "example", "customerName": "example", "customerEmail": "example", "customerPhone": "example", "intent": "example", "quality": "example", "stageId": "example", "budget": { "min": 1, "max": 1 }, "zones": [ "example" ], "rooms": 1, "assignedOperatorId": "example", "source": "example", "notes": "example", "createdAt": "example", "updatedAt": "example"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}