CRM

Move a deal to another stage, or close it

Either moves a deal to another stage of its own pipeline (stage_id) or closes it (outcome), never both. Call crm_get_deal first: it lists the stages this deal can move to. Closing is a decision with consequences — it takes the deal out of the forecast and into the win-rate — so show the user what they are closing and get an explicit yes. Closing as lost normally requires a reason from the organisation’s own list; if one is needed this tool refuses and returns the list.

post/api/v1/rest/crm/deals/{id}/advance

Request

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

Path parameters

idstring uuid required

The deal id, from crm_list_deals or crm_get_deal.

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

stage_idstring uuid

Move here. Must belong to the deal’s own pipeline; from crm_get_deal.

outcome'won' | 'lost'

Close the deal. The pipeline’s own terminal stage is used.

lost_reason_idstring uuid

Why it was lost. This tool returns the organisation’s list when it needs one.

lost_notestring

Anything worth recording beyond the reason.

amountnumber

The final figure, when it differs from the one carried in the pipeline.

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.