Skip to content

Opportunity stages

Opportunity stages are the business’s own pipeline: the ordered list of stages, shown as the columns of the pipeline board, that an opportunity moves through, such as Lead, Proposal and Negotiation. Each opportunity is in at most one stage.

Every endpoint acts as the person whose personal access token is used, with the permissions their role gives them in the app. Reading stages needs the permission to view leads. Creating, renaming, reordering and deleting stages needs access to the CRM module, as on the app’s pipeline board. These permissions cover the whole business, for members, managers and administrators alike; administrators hold every permission. A person without the permission an endpoint needs gets 403. Moving an opportunity from one stage to another is done on the opportunity, with Update an opportunity.

One stage of the business’s opportunity pipeline.

Field Type Description
id string The stage’s id. Read only.
name string The stage’s name, 1–191 characters, unique in the business.
position integer Where the stage sits in the pipeline, counting from 1 at the left of the board.
isDefault boolean Whether new opportunities created without a stage go into this stage. When no stage is the default, they go into the first stage. Read only.
opportunityCount integer How many opportunities are in the stage. Read only.
forecastedRevenue decimal The sum of the amounts of the stage’s opportunities, each converted to the business’s currency at OneSuite’s current exchange rate (“Forecasted Revenue” on the board). Read only.
currency string Currency of forecastedRevenue: the business’s currency. Read only.
createdAt datetime When the stage was added. Read only.
updatedAt datetime When the stage last changed. Read only.

Returns the business’s pipeline stages in board order, left to right, each with how many opportunities it holds and their forecasted revenue.

GET /v1/opportunity-stages

Parameters

Parameter In Type Required Description
page query integer No Page number, from 1. Default 1.
limit query integer No Rows per page. Default 20, at most 1000.
search query string No Text in the stage’s name.
updatedSince query datetime No Only stages changed at or after this moment. Stages deleted since then are not reported.

Rules

  • 403 when the person may not view leads.

Example request

Terminal window
curl "https://api.onesuite.io/v1/opportunity-stages?limit=3" \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

{
"data": [
{
"id": "cm4st0a1b0001k908p2l3m4na",
"name": "Lead",
"position": 1,
"isDefault": false,
"opportunityCount": 12,
"forecastedRevenue": 64250,
"currency": "USD",
"createdAt": "2026-03-04T12:00:05.120Z",
"updatedAt": "2026-10-02T08:15:44.301Z"
},
{
"id": "cm4st0a1b0005k908r6s7t8ub",
"name": "Proposal",
"position": 2,
"isDefault": false,
"opportunityCount": 6,
"forecastedRevenue": 98400.5,
"currency": "USD",
"createdAt": "2026-03-04T12:00:05.120Z",
"updatedAt": "2026-10-02T08:15:44.301Z"
},
{
"id": "cm4st0a1b0009k908v1w2x3yc",
"name": "Negotiation",
"position": 3,
"isDefault": false,
"opportunityCount": 3,
"forecastedRevenue": 51800,
"currency": "USD",
"createdAt": "2026-03-04T12:00:05.120Z",
"updatedAt": "2026-10-02T08:15:44.301Z"
}
],
"totalCount": 6,
"page": 1,
"limit": 3
}

Returns one stage.

GET /v1/opportunity-stages/:id

Parameters

Parameter In Type Required Description
id path string Yes The stage’s id.

Rules

  • 403 when the person may not view leads.
  • 404 when the stage does not exist in the business.

Example request

Terminal window
curl "https://api.onesuite.io/v1/opportunity-stages/cm4st0a1b0005k908r6s7t8ub" \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

{
"data": {
"id": "cm4st0a1b0005k908r6s7t8ub",
"name": "Proposal",
"position": 2,
"isDefault": false,
"opportunityCount": 6,
"forecastedRevenue": 98400.5,
"currency": "USD",
"createdAt": "2026-03-04T12:00:05.120Z",
"updatedAt": "2026-10-02T08:15:44.301Z"
}
}

Adds a stage to the pipeline: at the end (right of the board) unless position is sent, in which case the stages from that position on move one place right.

POST /v1/opportunity-stages

Parameters

Parameter In Type Required Description
name body string Yes Name, 1–191 characters, unique in the business.
position body integer No Place in the pipeline, from 1. Default: last.

Rules

  • 403 when the person may not use the CRM.
  • 400 when the name is missing or longer than 191 characters, or position is not a whole number of 1 or more.
  • 409 when another stage already has that name.
  • A position beyond the last puts the stage last.
  • Answers 201 with the new stage.

Example request

Terminal window
curl "https://api.onesuite.io/v1/opportunity-stages" \
-X POST \
-H "X-API-Key: $ONESUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Contract sent","position":4}'

Example response — status 201

{
"data": {
"id": "cm4st7e6f0021k908d4e5f6gh",
"name": "Contract sent",
"position": 4,
"isDefault": false,
"opportunityCount": 0,
"forecastedRevenue": 0,
"currency": "USD",
"createdAt": "2026-11-21T12:01:09.551Z",
"updatedAt": "2026-11-21T12:01:09.551Z"
}
}

Renames the stage, moves it to another place in the pipeline, or both. Moving it shifts the stages in between by one place. Its opportunities stay in it.

PATCH /v1/opportunity-stages/:id

Parameters

Parameter In Type Required Description
id path string Yes The stage’s id.
name body string No New name, 1–191 characters, unique in the business.
position body integer No New place in the pipeline, from 1. A number beyond the last puts it last.

Rules

  • 403 when the person may not use the CRM.
  • 404 when the stage does not exist in the business.
  • 400 when the body is empty, the name is empty or too long, or position is not a whole number of 1 or more.
  • 409 when another stage already has that name.

Example request

Terminal window
curl "https://api.onesuite.io/v1/opportunity-stages/cm4st0a1b0009k908v1w2x3yc" \
-X PATCH \
-H "X-API-Key: $ONESUITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Negotiating","position":4}'

Example response — status 200

{
"data": {
"id": "cm4st0a1b0009k908v1w2x3yc",
"name": "Negotiating",
"position": 4,
"isDefault": false,
"opportunityCount": 3,
"forecastedRevenue": 51800,
"currency": "USD",
"createdAt": "2026-03-04T12:00:05.120Z",
"updatedAt": "2026-11-21T12:04:30.118Z"
}
}

Deletes a stage. A stage that still holds opportunities is only deleted when moveOpportunitiesTo names another stage: its opportunities move there first, each with a stage change in its activity timeline. Opportunities are never deleted with a stage.

DELETE /v1/opportunity-stages/:id

Parameters

Parameter In Type Required Description
id path string Yes The stage’s id.
moveOpportunitiesTo query string No Id of another stage of the business to move this stage’s opportunities to. Required when the stage holds opportunities.

Rules

  • 403 when the person may not use the CRM.
  • 404 when the stage, or the moveOpportunitiesTo stage, does not exist in the business.
  • 409 when the stage holds opportunities and moveOpportunitiesTo is not sent. Nothing is deleted.
  • 400 when moveOpportunitiesTo is the stage being deleted.
  • The stages after it move one place left.

Example request

Terminal window
curl "https://api.onesuite.io/v1/opportunity-stages/cm4st0a1b0009k908v1w2x3yc?moveOpportunitiesTo=cm4st0a1b0005k908r6s7t8ub" \
-X DELETE \
-H "X-API-Key: $ONESUITE_TOKEN"

Example response — status 200

{
"message": "Stage deleted; 3 opportunities moved to Proposal"
}