List opportunities
/api/v1/ext/opportunities
Opportunities in a workspace, filtered and paginated.
Filters combine with AND. search matches the opportunity name or the linked contact's name or email.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workspace_id | query | number | yes | The workspace. |
| pipeline_id | query | number | no | Only this pipeline. |
| stage_id | query | number | no | Only this stage. |
| status | query | enum | no | Only this status. |
| contact_id | query | number | no | Only this contact's opportunities. |
| owner_id | query | number | no | Only this owner. |
| source | query | string | no | Source contains this text. |
| search | query | string | no | Name, or contact name / email. |
| sort | query | enum | no | Default created_at. |
| order | query | enum | no | Default desc. |
| page | query | number | no | Default 1. |
| limit | query | number | no | 1–100, default 20. Anything else is a 400. |
Responses
| Status | When |
|---|---|
200 | OK |
400 | workspace_id missing |
401 | Missing or invalid token |
403 | Missing scope |
404 | workspace_id does not exist or is not owned by the installer (same response for both) |
Response schema
opportunityobjectEach item in `data`
idnumberOpportunity id.
55workspace_idnumberThe workspace it belongs to.
7namestringOpportunity name.
Website redesignvaluenumberDeal value.
1200currencystringISO currency code.
USDstatusstring"open", "won", "lost" or "abandoned".
openlost_reasonstringSet while status is "lost".
pipelineobjectid and name of its pipeline.
stageobjectid, name, color, position, is_won, is_lost of its stage.
contactobjectThe linked contact: id, first_name, last_name, email, phone_number, company_name.
owner_idnumberThe assigned user, when set.
sourcestringFree text: where the deal came from.
tagsarray<string>Opportunity tags.
custom_fieldsobjectOpportunity custom field values by key.
closed_atstring (ISO 8601)When it was won / lost / abandoned; null while open.
stage_changed_atstring (ISO 8601)When it entered its current stage.
last_activity_atstring (ISO 8601)Last change of any kind.
curl -X GET "https://backend.mysmsgateway.app/api/v1/ext/opportunities" \
-H "Authorization: Bearer <ACCESS_TOKEN>"{
"success": true,
"data": [
{
"id": 55,
"workspace_id": 7,
"name": "Website redesign",
"value": 1200,
"currency": "USD",
"status": "open",
"lost_reason": null,
"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": null,
"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"
}
],
"pagination": {
"page": 1,
"limit": 20,
"max_limit": 100,
"total": 1,
"total_pages": 1,
"sort": "created_at",
"order": "desc"
}
}The workspace.
Only this pipeline.
Only this stage.
Only this status.
Only this contact's opportunities.
Only this owner.
Source contains this text.
Name, or contact name / email.
Default created_at.
Default desc.
Default 1.
1–100, default 20. Anything else is a 400.
« List pipelines
Get opportunity »
