CRM

Convert a lead into a deal

Turns a lead into a real opportunità: the same row, the same id, the same stage history and the same activities, now attached to an anagrafica and committed to a close date. The customer record must already exist — pass party_id, creating it with anagrafiche_create_party first — and expected_close_date is required, because committing to a date is what the conversion means. The lead’s own contact details are left exactly as they are and are never written back to the anagrafica. Most organisations do not use the lead inbox: if it is off here this tool refuses and names the setting that turns it on.

post/api/v1/rest/crm/leads/{id}/convert

Request

  • Base URL: https://api.custodo.ai
  • URL: https://api.custodo.ai/api/v1/rest/crm/leads/{id}/convert
  • Auth: HTTP bearer

Path parameters

idstring uuid required

The lead. crm_list_deals returns kind on every row; a lead is one whose kind is lead.

Headers

X-Tenant-Idstring uuid

The organisation to act in. An API key is bound to exactly one, so this is optional for a key and must match the one it was minted for.

Request body

party_idstring uuid required

The anagrafica the lead becomes attached to. It must already exist — create it with anagrafiche_create_party first, which owns the fiscal checks and the duplicate warning.

contact_idstring uuid

The person at that customer, when one is named.

titlestring

Rename it on the way through. Omit to keep the lead’s own title.

stage_idstring uuid

Move it as part of the conversion. Omit and it stays where it is; a terminal stage is refused, and so is a stage belonging to another pipeline.

amountnumber

The agreed figure, when one is now known.

expected_close_datestring required

When it is expected to close, YYYY-MM-DD. Required: committing to a date IS the commercial meaning of the conversion.

owner_user_idstring uuid

Hand it to a colleague as it converts. Omit to keep the lead’s owner.

Response

Done. data is the tool’s own answer.

oktrue required
dataunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.