Change status
PATCH
/api/v1/ext/opportunities/{id}/status
Win, lose, abandon or reopen an opportunity.
Auth: Bearer access_token
Scope: opportunities.write
Runs any workflow that triggers on Opportunity status changed. lost_reason is kept only while the status is "lost"; reopening clears it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | number | yes | Opportunity id. |
| status | body | enum | yes | The new status. |
| lost_reason | body | string | no | Up to 255 characters, for "lost". |
Responses
| Status | When |
|---|---|
200 | OK |
400 | Unknown status |
401 | Missing or invalid token |
403 | Missing scope |
404 | Opportunity does not exist or is not owned by the installer |
RequestResponses
curl -X PATCH "https://backend.mysmsgateway.app/api/v1/ext/opportunities/{id}/status" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"status": "lost",
"lost_reason": "Went with another agency"
}'OK
{
"success": true,
"message": "Status changed",
"data": {
"id": 55,
"workspace_id": 7,
"name": "Website redesign",
"value": 1200,
"currency": "USD",
"status": "lost",
"lost_reason": "Went with another agency",
"pipeline_id": 3,
"pipeline": {
"id": 3,
"name": "Sales"
},
"stage_id": 9,
"stage": {
"id": 9,
"name": "Qualified",
"color": "#22c55e",
"position": 1,
"is_won": false,
"is_lost": false
},
"contact_id": 1234,
"contact": {
"id": 1234,
"first_name": "Ann",
"last_name": "Lee",
"email": "ann@example.com",
"phone_number": "+61412345678",
"company_name": "Lee Studio"
},
"owner_id": null,
"source": "website",
"tags": [
"web"
],
"custom_fields": {},
"closed_at": "2026-10-28T11:00:00.000Z",
"stage_changed_at": "2026-10-27T09:00:00.000Z",
"last_activity_at": "2026-10-27T09:00:00.000Z",
"created_at": "2026-10-27T09:00:00.000Z",
"updated_at": "2026-10-27T09:00:00.000Z"
}
}Try It!
This endpoint needs a bearer token. Open Settings (top right) and paste your access_token.
Path parameters
Opportunity id.
Body (JSON)
Request URL
PATCHhttps://backend.mysmsgateway.app/api/v1/ext/opportunities/%7Bid%7D/status
Previous
« Move stage
Next
Delete opportunity »
