Opportunities APIs
Change opportunity stage
Move an opportunity to a Kanban stage, including sale and loss transitions.
PATCH
cURL examples
The request panel includes complete commands for regular, sale, and loss stage transitions. ReplaceYOUR_API_ACCESS_TOKEN, account ID 10, inbox ID 25, opportunity ID 123, and stage IDs with values from your account. Stage IDs identify Kanban columns.
The cURL commands use Bash syntax. --include prints the HTTP status and response headers along with the JSON body.
Authentication
Send a user or AgentBot API access token in the request header:Path parameters
Common fields
Move to a regular stage
Move to a sale stage
For stages categorized assales or sales_BR, provide:
won, records the sale details, and clears previous loss details.
Move to a loss stage
For stages categorized assales_lost, provide:
Accepted reasons:
price, no_response, credit_denied, competitor, unavailable, gave_up, invalid_contact, duplicate, and other.
lost and records the reason, notes, and loss time.
Validation and access rules
- The opportunity must be active (not archived) and belong to the specified inbox.
- The destination stage must be active, accessible, and belong to the same inbox. It can belong to another board within that inbox.
- An agent must be assigned to the opportunity to move it.
- Moving an opportunity that is already won or currently in a sale stage requires administrator privileges.
- Reopening a won or lost opportunity requires administrator privileges.
- Entering a stage with an enabled GIA campaign entry action requires administrator privileges and a linked contact.
- If the opportunity is already in the requested stage, the request leaves it unchanged and returns
transitioned: false. Additional sale or loss details are not required for that no-op request.
Response models
200 OK
Returns 200 OK:status is the resulting CriaChat opportunity status: open, won, or lost. transitioned indicates whether a stage change occurred.
401 Unauthorized
The API access token is missing or invalid. Account access failures and suspended accounts can also return401, with a different error message.
404 Not Found
The opportunity, inbox, or destination stage is invalid or inaccessible. Archived opportunities are excluded from the lookup.Errors
Example resource error: