Move a deal to another stage
Move a deal to another stage, including Won or Lost.
PATCH https://cotlet.dev/api/v1/freshsales/deals/{deal_id}/stage
write Confirm
Changes the stage as a drag in the Pipeline view does. Moving to Won sets the closed date, and moving to Lost takes a Lost reason. Your Workflows can start on the change and email contacts or the owner. Move it back with a second call. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| deal_id integer required | integer | Deal id from list_deals. |
| stage string required | string | Stage name from list_pipelines, in the deal's own pipeline. |
| lost_reason string | string | A Lost reason from list_pipelines. Needed for Lost when your admin made the field required. |
Request
curl -X PATCH https://cotlet.dev/api/v1/freshsales/deals/7000377/stage \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"stage":"Lost","lost_reason":"No response"}' result = client.call("freshsales", "update_deal_stage", {"deal_id":7000377,"stage":"Lost","lost_reason":"No response"}) const result = await cotlet.call('freshsales', 'update_deal_stage', {"deal_id":7000377,"stage":"Lost","lost_reason":"No response"}); cotlet call freshsales update_deal_stage --data '{"deal_id":7000377,"stage":"Lost","lost_reason":"No response"}' Example response
{
"deal_id": 7000377,
"name": "Onboarding package",
"stage": "Lost",
"previous_stage": "New",
"lost_reason": "No response"
}