Appearance
Retrieve an opportunity
Returns the opportunity record with the contact, stage, tags, and related conversations.
Lookup by id or phone
The {identifier} in the URL accepts either:
- The numeric opportunity id (e.g.
98314) - A contact phone number in the same format your channels store it (digits only, country code prefix, no
+). Example:201062691152.
The server resolves whichever matches first.
Narrow the phone lookup with pipeline_id
The same contact phone can be linked to opportunities in more than one pipeline. When you look up by phone, pass an optional pipeline_id query parameter to make sure you get the opportunity from the pipeline you care about. Ignored when you look up by id.
Contacts with several opportunities
A contact can hold more than one opportunity in the same pipeline (see Create an opportunity). A phone lookup returns only one of them, so use the opportunity id whenever you need a specific opportunity. To get all of them, use List a contact's opportunities.
GET/api/user/opportunities/{identifier}
Required scope:
opportunities:readPath parameters
integer | string
Query parameters
integer
curl -X GET "https://loopx-console.test/api/user/opportunities/98314" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json"Example response
{
"status": true,
"code": 200,
"validation": [],
"message": "Success",
"data": {
"id": 98314,
"status": "active",
"contact_id": 44016,
"stage_id": 189,
"pipeline_id": 17,
"name": null,
"notes": null,
"created_at": "2026-07-06T12:28:57.000000Z",
"updated_at": "2026-07-06T12:28:57.000000Z",
"source": "facebook",
"source_id": "120248819452900116",
"contact_name": "Ali",
"contact_custom_name": null,
"contact_priority": null,
"contact_identifier": "36537370685479@lid",
"contact_email": null,
"contact_custom_email": null,
"contact_phone": "201062691152",
"contact_custom_phone": null,
"stage_nature": "neutral",
"stage_name": "New Lead",
"tags": [],
"conversations": [
{
"id": 89328,
"is_test": false,
"last_message_at": "2026-07-06T13:10:21.000000Z",
"messages_count": 2,
"cost_for_user": 0.014633325,
"status": "active",
"last_message_content": "…last AI reply preview…",
"avg_response_time": 0,
"pivot": {
"opportunity_id": 98314,
"conversation_id": 89328
}
}
]
}
}Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
identifier | integer | string | yes | Opportunity id or contact phone number |
Query parameters
| Name | Type | Description |
|---|---|---|
pipeline_id | integer | Optional. When looking up by phone, restricts the match to a single pipeline. Ignored when the identifier is a numeric id. |
Response fields
| Field | Type | Description |
|---|---|---|
id | integer | Opportunity id |
status | string | active, paused, won, lost |
contact_id | integer | Related contact id |
stage_id, stage_name, stage_nature | integer, string, string | Current stage |
pipeline_id | integer | Pipeline this opportunity belongs to |
name | string | null | Opportunity display name |
notes | string | null | Free-form notes |
source, source_id | string | Channel and channel-specific id (e.g. facebook, Meta thread id) |
contact_* | mixed | Flattened contact fields (name, phone, email, priority, identifier). _custom_* variants are user overrides on top of the raw contact record. |
tags | array | Tags attached to the opportunity |
conversations | array | Conversations linked to this opportunity — one row per conversation with messages_count, last_message_at, cost_for_user, etc. |
Errors
| Code | When |
|---|---|
403 | Token missing opportunities:read scope, or the opportunity belongs to a different workspace |
404 | No opportunity found for that id / phone (+ optional pipeline_id) |