PUT
/api/v1/opportunities/{id}Update Opportunity
Updates an existing opportunity.
Authentication
Send your API key in the x-api-key header.
x-api-keybearer
Parameters
idrequiredpath · string
Opportunity ID to update.
Request body
requiredPublicApiUpdateOpportunityDto
namestring
Name of the opportunity
amountnumber
Opportunity amount
finalAmountnumber
Final opportunity amount
riskstring
Opportunity risk level
LowMediumHighprioritystring
Opportunity priority level
LowMediumHighdescriptionstring
Opportunity description
featuredNotesstring
Featured notes for the opportunity
nextStepstring
Next step for the opportunity
closeDatestring (date-time)
Actual close date
closeProbabilitynumber
Close probability (0-100)
statusstring
Opportunity status
wonlostopenarchivedbreakExample request
json
{
"name": "Enterprise Software License",
"amount": 50000,
"finalAmount": 45000,
"risk": "Low",
"priority": "High",
"description": "Enterprise software license for 500 users",
"featuredNotes": "Key decision maker is the CTO",
"nextStep": "FollowUp",
"closeDate": "2024-03-10T00:00:00.000Z",
"closeProbability": 75,
"status": "open"
}
Responses
200
PublicApiUpdateOpportunityResponseDto
statusCoderequirednumber
countrequirednumber
errorrequiredstring
datarequiredPublicApiOpportunityDto
Example response
json
{
"statusCode": 200,
"count": 0,
"error": null,
"data": {
"id": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
"name": "Enterprise Software License",
"amount": 50000,
"finalAmount": 45000,
"risk": "Low",
"priority": "High",
"description": "Enterprise software license for 500 users",
"featuredNotes": "Key decision maker is the CTO",
"nextStep": "FollowUp",
"closeDate": "2024-03-10T00:00:00.000Z",
"closeProbability": 75,
"status": "open",
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
}
401Unauthorized - missing or invalid API key or Bearer token