Opportunities

Deals moving through a pipeline.

#List opportunities

GET/api/v1/opportunities

Operation list_opportunities · needs scope opportunities:read

ParameterInTypeNotes
limitqueryintegerPage size, at most 100.
cursorquerystringpagination.nextCursor from the previous page.
sortquery-updated_at | updated_at | -created_at | created_atSort order. A leading minus sorts descending.
updated_sincequerydatetimeOnly records updated at or after this instant.
qquerystringFree-text search over the object's main columns.
ownerquerystringOnly records whose owner equals this.
pipelinequerystringOnly records whose pipeline id equals this.
stagequerystringOnly records whose stage id equals this.
stage_kindquerystringOnly records whose stage_kind equals this.
currencyquerystringOnly records whose currency equals this.
sourcequerystringOnly records whose source equals this.
personquerystringOnly records linked to this person (public id).
companyquerystringOnly records linked to this company (public id).
bash
curl https://synconone.com/api/v1/opportunities \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
json
{
  "data": [
    {
      "id": "pr_1a2b3c4d5e6f7a8b",
      "object": "string",
      "name": "Emily Carter",
      "company": "string",
      "person": "string",
      "pipeline": "string",
      "stage": "string",
      "stage_kind": "open",
      "amount": 1,
      "currency": "string"
    }
  ],
  "pagination": {
    "nextCursor": null,
    "hasMore": false
  }
}

Errors: 401: Missing, invalid, revoked or expired API key. · 403: The key lacks the scope, or its role cannot do this. · 422: Validation failed. · 429: Rate limited. Honour Retry-After.. See errors.

#Create an opportunity

POST/api/v1/opportunities

Operation create_deal · needs scope opportunities:write

Built-in and custom fields by key. Relations take public ids. Changing stage moves the opportunity through the pipeline's rules; when an approval policy applies the response is 409 approval_required and the opportunity does not move. lost_reason / win_reason in the same body travel with the move.

Body fieldTypeNotes
namestringName
companystringCompany
personstringPrimary contact
stagestringStage
amountnumberAmount
currencystringCurrency
probabilitynumberProbability
close_datestringExpected close
ownerstringOwner
next_stepstringNext step
next_step_due_atstringNext step due
competitorstringCompetitor
sourcestringSource
descriptionstringNotes
win_reasonstringWhy we won
lost_reasonstringWhy we lost
bash
curl -X POST https://synconone.com/api/v1/opportunities \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Emily Carter","company":"string","person":"string","stage":"string","amount":1}'
json
{
  "data": {
    "id": "pr_1a2b3c4d5e6f7a8b",
    "object": "string",
    "name": "Emily Carter",
    "company": "string",
    "person": "string",
    "pipeline": "string",
    "stage": "string",
    "stage_kind": "open",
    "amount": 1,
    "currency": "string"
  }
}

Errors: 401: Missing, invalid, revoked or expired API key. · 403: The key lacks the scope, or its role cannot do this. · 409: Conflict, approval required, or idempotent request in progress. · 422: Validation failed. · 429: Rate limited. Honour Retry-After.. See errors.

#Get an opportunity

GET/api/v1/opportunities/{id}

Operation get_deal · needs scope opportunities:read

ParameterInTypeNotes
id requiredpathstringPublic id of the opportunity.
bash
curl https://synconone.com/api/v1/opportunities/pr_1a2b3c4d5e6f7a8b \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
json
{
  "data": {
    "id": "pr_1a2b3c4d5e6f7a8b",
    "object": "string",
    "name": "Emily Carter",
    "company": "string",
    "person": "string",
    "pipeline": "string",
    "stage": "string",
    "stage_kind": "open",
    "amount": 1,
    "currency": "string"
  }
}

Errors: 401: Missing, invalid, revoked or expired API key. · 403: The key lacks the scope, or its role cannot do this. · 404: Not found, or not visible to this key. · 422: Validation failed. · 429: Rate limited. Honour Retry-After.. See errors.

#Update an opportunity

PATCH/api/v1/opportunities/{id}

Operation update_deal · needs scope opportunities:write

Only the keys sent are changed. Fields are applied in order; the first refusal stops the request and details.applied lists what was already changed. Changing stage moves the opportunity through the pipeline's rules; when an approval policy applies the response is 409 approval_required and the opportunity does not move. lost_reason / win_reason in the same body travel with the move.

ParameterInTypeNotes
id requiredpathstringPublic id of the opportunity.
Body fieldTypeNotes
namestringName
companystringCompany
stagestringStage
amountnumberAmount
currencystringCurrency
probabilitynumberProbability
close_datestringExpected close
ownerstringOwner
next_stepstringNext step
next_step_due_atstringNext step due
competitorstringCompetitor
sourcestringSource
descriptionstringNotes
win_reasonstringWhy we won
lost_reasonstringWhy we lost
bash
curl -X PATCH https://synconone.com/api/v1/opportunities/pr_1a2b3c4d5e6f7a8b \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Emily Carter","company":"string","stage":"string","amount":1,"currency":"string"}'
json
{
  "data": {
    "id": "pr_1a2b3c4d5e6f7a8b",
    "object": "string",
    "name": "Emily Carter",
    "company": "string",
    "person": "string",
    "pipeline": "string",
    "stage": "string",
    "stage_kind": "open",
    "amount": 1,
    "currency": "string"
  }
}

Errors: 401: Missing, invalid, revoked or expired API key. · 403: The key lacks the scope, or its role cannot do this. · 404: Not found, or not visible to this key. · 409: Conflict, approval required, or idempotent request in progress. · 422: Validation failed. · 429: Rate limited. Honour Retry-After.. See errors.

#Archive an opportunity

DELETE/api/v1/opportunities/{id}

Operation archive_deal · needs scope opportunities:write

Archives the record (it can be restored in the app). Nothing is destroyed.

ParameterInTypeNotes
id requiredpathstringPublic id of the opportunity.
bash
curl -X DELETE https://synconone.com/api/v1/opportunities/pr_1a2b3c4d5e6f7a8b \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
json
{
  "data": {
    "id": "pr_1a2b3c4d5e6f7a8b",
    "object": "string",
    "archived": true
  }
}

Errors: 401: Missing, invalid, revoked or expired API key. · 403: The key lacks the scope, or its role cannot do this. · 404: Not found, or not visible to this key. · 422: Validation failed. · 429: Rate limited. Honour Retry-After.. See errors.