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

Parameters: update_deal_stage
NameTypeDescription
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
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"}'
Python
result = client.call("freshsales", "update_deal_stage", {"deal_id":7000377,"stage":"Lost","lost_reason":"No response"})
Node.js
const result = await cotlet.call('freshsales', 'update_deal_stage', {"deal_id":7000377,"stage":"Lost","lost_reason":"No response"});
CLI
cotlet call freshsales update_deal_stage --data '{"deal_id":7000377,"stage":"Lost","lost_reason":"No response"}'

Example response

JSON

{
  "deal_id": 7000377,
  "name": "Onboarding package",
  "stage": "Lost",
  "previous_stage": "New",
  "lost_reason": "No response"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.