SalesOS

Opportunities

Opportunity tracking and pipeline

List

GET
/v1/opportunities

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Query Parameters

stagestring
accountIdstring
isClosedstring
minAmountstring
searchstring
sourcestring
cursorstring
limitstring
pagestring
sortBystring
sortOrderstring
ownerstring
createdAfterstring
idsstring
openstring
customFieldsstring
withCustomFieldsstring
curl -X GET "https://api.salesos.org/v1/opportunities?stage=%3Cstring%3E&accountId=%3Cstring%3E&isClosed=%3Cstring%3E&minAmount=%3Cstring%3E&search=%3Cstring%3E&source=%3Cstring%3E&cursor=%3Cstring%3E&limit=%3Cstring%3E&page=%3Cstring%3E&sortBy=%3Cstring%3E&sortOrder=%3Cstring%3E&owner=%3Cstring%3E&createdAfter=%3Cstring%3E&ids=%3Cstring%3E&open=%3Cstring%3E&customFields=%3Cstring%3E&withCustomFields=%3Cstring%3E" \
  -H "Authorization: Bearer <token>"

OpportunityList

{
  "data": [
    {
      "id": "string",
      "accountId": "string",
      "ownerId": "string",
      "organizationId": "string",
      "campaignId": "string",
      "pipelineId": "string",
      "stageId": "string",
      "salesforceId": "string",
      "name": "string",
      "opportunitySource": "EXISTING_CUSTOMER",
      "type": "NEW_BUSINESS",
      "stage": "PROSPECTING",
      "amount": 0,
      "probability": 0,
      "expectedRevenue": 0,
      "discount": 0,
      "currency": "string",
      "closeDate": "2019-08-24T14:15:22Z",
      "createdDate": "2019-08-24T14:15:22Z",
      "lastActivityDate": "2019-08-24T14:15:22Z",
      "nextActivityDate": "2019-08-24T14:15:22Z",
      "originalCloseDate": "2019-08-24T14:15:22Z",
      "closeDatePushCount": 0,
      "closeDateSlipDays": 0,
      "stageEnteredAt": "2019-08-24T14:15:22Z",
      "forecastCategory": "PIPELINE",
      "forecastCategorySetAt": "2019-08-24T14:15:22Z",
      "needsAnalysis": "string",
      "proposedSolution": "string",
      "competitors": [
        "string"
      ],
      "nextStep": "string",
      "winProbability": 0,
      "riskFactors": [
        "string"
      ],
      "recommendedActions": [
        "string"
      ],
      "tags": [
        "string"
      ],
      "dealVelocity": 0,
      "isClosed": true,
      "isWon": true,
      "lostReason": "string",
      "closedDate": "2019-08-24T14:15:22Z",
      "metadata": null,
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "page": 1,
  "limit": 50,
  "total": 0,
  "totalPages": 0,
  "hasMore": true
}

Create

POST
/v1/opportunities

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired
nameRequiredstring
accountIdRequiredstring
amountnumber
closeDatestring
opportunitySourcestring
typestring
stagestring
Value in: "PROSPECTING" | "QUALIFICATION" | "NEEDS_ANALYSIS" | "VALUE_PROPOSITION" | "DECISION_MAKERS_IDENTIFIED" | "PERCEPTION_ANALYSIS" | "PROPOSAL_PRICE_QUOTE" | "NEGOTIATION_REVIEW" | "CLOSED_WON" | "CLOSED_LOST"
probabilitynumber
needsAnalysisstring
proposedSolutionstring
competitorsarray<string>
nextStepstring
descriptionstring
campaignIdstring
pipelineIdstring
stageIdstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "accountId": "string",
    "amount": 0,
    "closeDate": "string",
    "opportunitySource": "string",
    "type": "string",
    "stage": "PROSPECTING",
    "probability": 0,
    "needsAnalysis": "string",
    "proposedSolution": "string",
    "competitors": [
      "string"
    ],
    "nextStep": "string",
    "description": "string",
    "campaignId": "string",
    "pipelineId": "string",
    "stageId": "string"
  }'

Opportunity

{
  "id": "string",
  "accountId": "string",
  "ownerId": "string",
  "organizationId": "string",
  "campaignId": "string",
  "pipelineId": "string",
  "stageId": "string",
  "salesforceId": "string",
  "name": "string",
  "opportunitySource": "EXISTING_CUSTOMER",
  "type": "NEW_BUSINESS",
  "stage": "PROSPECTING",
  "amount": 0,
  "probability": 0,
  "expectedRevenue": 0,
  "discount": 0,
  "currency": "string",
  "closeDate": "2019-08-24T14:15:22Z",
  "createdDate": "2019-08-24T14:15:22Z",
  "lastActivityDate": "2019-08-24T14:15:22Z",
  "nextActivityDate": "2019-08-24T14:15:22Z",
  "originalCloseDate": "2019-08-24T14:15:22Z",
  "closeDatePushCount": 0,
  "closeDateSlipDays": 0,
  "stageEnteredAt": "2019-08-24T14:15:22Z",
  "forecastCategory": "PIPELINE",
  "forecastCategorySetAt": "2019-08-24T14:15:22Z",
  "needsAnalysis": "string",
  "proposedSolution": "string",
  "competitors": [
    "string"
  ],
  "nextStep": "string",
  "winProbability": 0,
  "riskFactors": [
    "string"
  ],
  "recommendedActions": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "dealVelocity": 0,
  "isClosed": true,
  "isWon": true,
  "lostReason": "string",
  "closedDate": "2019-08-24T14:15:22Z",
  "metadata": null,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Get pipeline stats

GET
/v1/opportunities/pipeline/stats

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

curl -X GET "https://api.salesos.org/v1/opportunities/pipeline/stats" \
  -H "Authorization: Bearer <token>"

Get forecast

GET
/v1/opportunities/forecast

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

curl -X GET "https://api.salesos.org/v1/opportunities/forecast" \
  -H "Authorization: Bearer <token>"

Open deals over their stage SLA (PipelineStage.maxDaysInStage). Visibility-scoped, ≤200 rows.

GET
/v1/opportunities/stage-sla

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Query Parameters

pipelineIdstring
limitstring
curl -X GET "https://api.salesos.org/v1/opportunities/stage-sla?pipelineId=%3Cstring%3E&limit=%3Cstring%3E" \
  -H "Authorization: Bearer <token>"

Deals whose close date slipped, with totals. `period` = 2026-Q3 | 2026-09 | 2026.

GET
/v1/opportunities/slippage

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Query Parameters

periodstring
limitstring
curl -X GET "https://api.salesos.org/v1/opportunities/slippage?period=%3Cstring%3E&limit=%3Cstring%3E" \
  -H "Authorization: Bearer <token>"

List deleted

GET
/v1/opportunities/deleted

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

curl -X GET "https://api.salesos.org/v1/opportunities/deleted" \
  -H "Authorization: Bearer <token>"

OpportunityArray

[
  {
    "id": "string",
    "accountId": "string",
    "ownerId": "string",
    "organizationId": "string",
    "campaignId": "string",
    "pipelineId": "string",
    "stageId": "string",
    "salesforceId": "string",
    "name": "string",
    "opportunitySource": "EXISTING_CUSTOMER",
    "type": "NEW_BUSINESS",
    "stage": "PROSPECTING",
    "amount": 0,
    "probability": 0,
    "expectedRevenue": 0,
    "discount": 0,
    "currency": "string",
    "closeDate": "2019-08-24T14:15:22Z",
    "createdDate": "2019-08-24T14:15:22Z",
    "lastActivityDate": "2019-08-24T14:15:22Z",
    "nextActivityDate": "2019-08-24T14:15:22Z",
    "originalCloseDate": "2019-08-24T14:15:22Z",
    "closeDatePushCount": 0,
    "closeDateSlipDays": 0,
    "stageEnteredAt": "2019-08-24T14:15:22Z",
    "forecastCategory": "PIPELINE",
    "forecastCategorySetAt": "2019-08-24T14:15:22Z",
    "needsAnalysis": "string",
    "proposedSolution": "string",
    "competitors": [
      "string"
    ],
    "nextStep": "string",
    "winProbability": 0,
    "riskFactors": [
      "string"
    ],
    "recommendedActions": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "dealVelocity": 0,
    "isClosed": true,
    "isWon": true,
    "lostReason": "string",
    "closedDate": "2019-08-24T14:15:22Z",
    "metadata": null,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
]

Get contacts

GET
/v1/opportunities/{id}/contacts

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.salesos.org/v1/opportunities/<string>/contacts" \
  -H "Authorization: Bearer <token>"

OpportunityContactRoleArray

[
  {
    "id": "string",
    "opportunityId": "string",
    "contactId": "string",
    "role": "CHAMPION",
    "isPrimary": true,
    "createdAt": "2019-08-24T14:15:22Z"
  }
]

Add contact

POST
/v1/opportunities/{id}/contacts

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/<string>/contacts" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

OpportunityContactRole

{
  "id": "string",
  "opportunityId": "string",
  "contactId": "string",
  "role": "CHAMPION",
  "isPrimary": true,
  "createdAt": "2019-08-24T14:15:22Z"
}

Get stage history

GET
/v1/opportunities/{id}/stage-history

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.salesos.org/v1/opportunities/<string>/stage-history" \
  -H "Authorization: Bearer <token>"

OpportunityStageHistoryArray

[
  {
    "id": "string",
    "opportunityId": "string",
    "organizationId": "string",
    "fromStage": "string",
    "toStage": "string",
    "changedById": "string",
    "enteredAt": "2019-08-24T14:15:22Z",
    "durationDays": 0
  }
]

Find one

GET
/v1/opportunities/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.salesos.org/v1/opportunities/<string>" \
  -H "Authorization: Bearer <token>"

Opportunity

{
  "id": "string",
  "accountId": "string",
  "ownerId": "string",
  "organizationId": "string",
  "campaignId": "string",
  "pipelineId": "string",
  "stageId": "string",
  "salesforceId": "string",
  "name": "string",
  "opportunitySource": "EXISTING_CUSTOMER",
  "type": "NEW_BUSINESS",
  "stage": "PROSPECTING",
  "amount": 0,
  "probability": 0,
  "expectedRevenue": 0,
  "discount": 0,
  "currency": "string",
  "closeDate": "2019-08-24T14:15:22Z",
  "createdDate": "2019-08-24T14:15:22Z",
  "lastActivityDate": "2019-08-24T14:15:22Z",
  "nextActivityDate": "2019-08-24T14:15:22Z",
  "originalCloseDate": "2019-08-24T14:15:22Z",
  "closeDatePushCount": 0,
  "closeDateSlipDays": 0,
  "stageEnteredAt": "2019-08-24T14:15:22Z",
  "forecastCategory": "PIPELINE",
  "forecastCategorySetAt": "2019-08-24T14:15:22Z",
  "needsAnalysis": "string",
  "proposedSolution": "string",
  "competitors": [
    "string"
  ],
  "nextStep": "string",
  "winProbability": 0,
  "riskFactors": [
    "string"
  ],
  "recommendedActions": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "dealVelocity": 0,
  "isClosed": true,
  "isWon": true,
  "lostReason": "string",
  "closedDate": "2019-08-24T14:15:22Z",
  "metadata": null,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Update

PATCH
/v1/opportunities/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired
namestring
stagestring
Value in: "PROSPECTING" | "QUALIFICATION" | "NEEDS_ANALYSIS" | "VALUE_PROPOSITION" | "DECISION_MAKERS_IDENTIFIED" | "PERCEPTION_ANALYSIS" | "PROPOSAL_PRICE_QUOTE" | "NEGOTIATION_REVIEW" | "CLOSED_WON" | "CLOSED_LOST"
amountnumber
probabilitynumber
closeDatestring
descriptionstring
typestring
opportunitySourcestring
accountIdstring
campaignIdstring
pipelineIdstring
stageIdstring
isWonboolean
isClosedboolean
discountnumber
nextStepstring
lossReasonstring
closeDateChangeReasonstring

Why the close date moved; journaled on metadata.closeDateHistory.

Maximum length: 200

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X PATCH "https://api.salesos.org/v1/opportunities/<string>" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "stage": "PROSPECTING",
    "amount": 0,
    "probability": 0,
    "closeDate": "string",
    "description": "string",
    "type": "string",
    "opportunitySource": "string",
    "accountId": "string",
    "campaignId": "string",
    "pipelineId": "string",
    "stageId": "string",
    "isWon": true,
    "isClosed": true,
    "discount": 0,
    "nextStep": "string",
    "lossReason": "string",
    "closeDateChangeReason": "string"
  }'

Opportunity

{
  "id": "string",
  "accountId": "string",
  "ownerId": "string",
  "organizationId": "string",
  "campaignId": "string",
  "pipelineId": "string",
  "stageId": "string",
  "salesforceId": "string",
  "name": "string",
  "opportunitySource": "EXISTING_CUSTOMER",
  "type": "NEW_BUSINESS",
  "stage": "PROSPECTING",
  "amount": 0,
  "probability": 0,
  "expectedRevenue": 0,
  "discount": 0,
  "currency": "string",
  "closeDate": "2019-08-24T14:15:22Z",
  "createdDate": "2019-08-24T14:15:22Z",
  "lastActivityDate": "2019-08-24T14:15:22Z",
  "nextActivityDate": "2019-08-24T14:15:22Z",
  "originalCloseDate": "2019-08-24T14:15:22Z",
  "closeDatePushCount": 0,
  "closeDateSlipDays": 0,
  "stageEnteredAt": "2019-08-24T14:15:22Z",
  "forecastCategory": "PIPELINE",
  "forecastCategorySetAt": "2019-08-24T14:15:22Z",
  "needsAnalysis": "string",
  "proposedSolution": "string",
  "competitors": [
    "string"
  ],
  "nextStep": "string",
  "winProbability": 0,
  "riskFactors": [
    "string"
  ],
  "recommendedActions": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "dealVelocity": 0,
  "isClosed": true,
  "isWon": true,
  "lostReason": "string",
  "closedDate": "2019-08-24T14:15:22Z",
  "metadata": null,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Remove

DELETE
/v1/opportunities/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Query Parameters

forcestring
curl -X DELETE "https://api.salesos.org/v1/opportunities/<string>?force=%3Cstring%3E" \
  -H "Authorization: Bearer <token>"

DeletedWithMessage

{
  "id": "string",
  "message": "string"
}

Restore

POST
/v1/opportunities/{id}/restore

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/<string>/restore" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

Opportunity

{
  "id": "string",
  "accountId": "string",
  "ownerId": "string",
  "organizationId": "string",
  "campaignId": "string",
  "pipelineId": "string",
  "stageId": "string",
  "salesforceId": "string",
  "name": "string",
  "opportunitySource": "EXISTING_CUSTOMER",
  "type": "NEW_BUSINESS",
  "stage": "PROSPECTING",
  "amount": 0,
  "probability": 0,
  "expectedRevenue": 0,
  "discount": 0,
  "currency": "string",
  "closeDate": "2019-08-24T14:15:22Z",
  "createdDate": "2019-08-24T14:15:22Z",
  "lastActivityDate": "2019-08-24T14:15:22Z",
  "nextActivityDate": "2019-08-24T14:15:22Z",
  "originalCloseDate": "2019-08-24T14:15:22Z",
  "closeDatePushCount": 0,
  "closeDateSlipDays": 0,
  "stageEnteredAt": "2019-08-24T14:15:22Z",
  "forecastCategory": "PIPELINE",
  "forecastCategorySetAt": "2019-08-24T14:15:22Z",
  "needsAnalysis": "string",
  "proposedSolution": "string",
  "competitors": [
    "string"
  ],
  "nextStep": "string",
  "winProbability": 0,
  "riskFactors": [
    "string"
  ],
  "recommendedActions": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "dealVelocity": 0,
  "isClosed": true,
  "isWon": true,
  "lostReason": "string",
  "closedDate": "2019-08-24T14:15:22Z",
  "metadata": null,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Advance stage

POST
/v1/opportunities/{id}/advance

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/<string>/advance" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

Opportunity

{
  "id": "string",
  "accountId": "string",
  "ownerId": "string",
  "organizationId": "string",
  "campaignId": "string",
  "pipelineId": "string",
  "stageId": "string",
  "salesforceId": "string",
  "name": "string",
  "opportunitySource": "EXISTING_CUSTOMER",
  "type": "NEW_BUSINESS",
  "stage": "PROSPECTING",
  "amount": 0,
  "probability": 0,
  "expectedRevenue": 0,
  "discount": 0,
  "currency": "string",
  "closeDate": "2019-08-24T14:15:22Z",
  "createdDate": "2019-08-24T14:15:22Z",
  "lastActivityDate": "2019-08-24T14:15:22Z",
  "nextActivityDate": "2019-08-24T14:15:22Z",
  "originalCloseDate": "2019-08-24T14:15:22Z",
  "closeDatePushCount": 0,
  "closeDateSlipDays": 0,
  "stageEnteredAt": "2019-08-24T14:15:22Z",
  "forecastCategory": "PIPELINE",
  "forecastCategorySetAt": "2019-08-24T14:15:22Z",
  "needsAnalysis": "string",
  "proposedSolution": "string",
  "competitors": [
    "string"
  ],
  "nextStep": "string",
  "winProbability": 0,
  "riskFactors": [
    "string"
  ],
  "recommendedActions": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "dealVelocity": 0,
  "isClosed": true,
  "isWon": true,
  "lostReason": "string",
  "closedDate": "2019-08-24T14:15:22Z",
  "metadata": null,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Close won

POST
/v1/opportunities/{id}/close-won

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/<string>/close-won" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

Opportunity

{
  "id": "string",
  "accountId": "string",
  "ownerId": "string",
  "organizationId": "string",
  "campaignId": "string",
  "pipelineId": "string",
  "stageId": "string",
  "salesforceId": "string",
  "name": "string",
  "opportunitySource": "EXISTING_CUSTOMER",
  "type": "NEW_BUSINESS",
  "stage": "PROSPECTING",
  "amount": 0,
  "probability": 0,
  "expectedRevenue": 0,
  "discount": 0,
  "currency": "string",
  "closeDate": "2019-08-24T14:15:22Z",
  "createdDate": "2019-08-24T14:15:22Z",
  "lastActivityDate": "2019-08-24T14:15:22Z",
  "nextActivityDate": "2019-08-24T14:15:22Z",
  "originalCloseDate": "2019-08-24T14:15:22Z",
  "closeDatePushCount": 0,
  "closeDateSlipDays": 0,
  "stageEnteredAt": "2019-08-24T14:15:22Z",
  "forecastCategory": "PIPELINE",
  "forecastCategorySetAt": "2019-08-24T14:15:22Z",
  "needsAnalysis": "string",
  "proposedSolution": "string",
  "competitors": [
    "string"
  ],
  "nextStep": "string",
  "winProbability": 0,
  "riskFactors": [
    "string"
  ],
  "recommendedActions": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "dealVelocity": 0,
  "isClosed": true,
  "isWon": true,
  "lostReason": "string",
  "closedDate": "2019-08-24T14:15:22Z",
  "metadata": null,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Close lost

POST
/v1/opportunities/{id}/close-lost

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/<string>/close-lost" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

Opportunity

{
  "id": "string",
  "accountId": "string",
  "ownerId": "string",
  "organizationId": "string",
  "campaignId": "string",
  "pipelineId": "string",
  "stageId": "string",
  "salesforceId": "string",
  "name": "string",
  "opportunitySource": "EXISTING_CUSTOMER",
  "type": "NEW_BUSINESS",
  "stage": "PROSPECTING",
  "amount": 0,
  "probability": 0,
  "expectedRevenue": 0,
  "discount": 0,
  "currency": "string",
  "closeDate": "2019-08-24T14:15:22Z",
  "createdDate": "2019-08-24T14:15:22Z",
  "lastActivityDate": "2019-08-24T14:15:22Z",
  "nextActivityDate": "2019-08-24T14:15:22Z",
  "originalCloseDate": "2019-08-24T14:15:22Z",
  "closeDatePushCount": 0,
  "closeDateSlipDays": 0,
  "stageEnteredAt": "2019-08-24T14:15:22Z",
  "forecastCategory": "PIPELINE",
  "forecastCategorySetAt": "2019-08-24T14:15:22Z",
  "needsAnalysis": "string",
  "proposedSolution": "string",
  "competitors": [
    "string"
  ],
  "nextStep": "string",
  "winProbability": 0,
  "riskFactors": [
    "string"
  ],
  "recommendedActions": [
    "string"
  ],
  "tags": [
    "string"
  ],
  "dealVelocity": 0,
  "isClosed": true,
  "isWon": true,
  "lostReason": "string",
  "closedDate": "2019-08-24T14:15:22Z",
  "metadata": null,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

The last stored assessment, returned instantly without running a new analysis.

GET
/v1/opportunities/{id}/analysis

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.salesos.org/v1/opportunities/<string>/analysis" \
  -H "Authorization: Bearer <token>"

{}

Analyze

POST
/v1/opportunities/{id}/analyze

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/<string>/analyze" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

{}

Update contact

PATCH
/v1/opportunities/{id}/contacts/{contactId}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired

Path Parameters

idRequiredstring
contactIdRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X PATCH "https://api.salesos.org/v1/opportunities/<string>/contacts/<string>" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

OpportunityContactRole

{
  "id": "string",
  "opportunityId": "string",
  "contactId": "string",
  "role": "CHAMPION",
  "isPrimary": true,
  "createdAt": "2019-08-24T14:15:22Z"
}

Remove contact

DELETE
/v1/opportunities/{id}/contacts/{contactId}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
contactIdRequiredstring
curl -X DELETE "https://api.salesos.org/v1/opportunities/<string>/contacts/<string>" \
  -H "Authorization: Bearer <token>"

No response body.

Set primary contact

POST
/v1/opportunities/{id}/contacts/{contactId}/set-primary

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
contactIdRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/<string>/contacts/<string>/set-primary" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

OpportunityContactRole

{
  "id": "string",
  "opportunityId": "string",
  "contactId": "string",
  "role": "CHAMPION",
  "isPrimary": true,
  "createdAt": "2019-08-24T14:15:22Z"
}

Bulk update

POST
/v1/opportunities/bulk/update

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/bulk/update" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

BulkActionResult

{
  "message": "string",
  "count": 0,
  "unchanged": 0,
  "failed": [
    {
      "id": "string",
      "error": "string"
    }
  ]
}

Bulk delete

POST
/v1/opportunities/bulk/delete

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/bulk/delete" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

BulkActionResult

{
  "message": "string",
  "count": 0,
  "unchanged": 0,
  "failed": [
    {
      "id": "string",
      "error": "string"
    }
  ]
}

Bulk assign

POST
/v1/opportunities/bulk/assign

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/bulk/assign" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

BulkActionResult

{
  "message": "string",
  "count": 0,
  "unchanged": 0,
  "failed": [
    {
      "id": "string",
      "error": "string"
    }
  ]
}

Bulk update stage

POST
/v1/opportunities/bulk/stage

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/opportunities/bulk/stage" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

BulkActionResult

{
  "message": "string",
  "count": 0,
  "unchanged": 0,
  "failed": [
    {
      "id": "string",
      "error": "string"
    }
  ]
}