List Opportunities
curl --request GET \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities \
--header 'api_access_token: <api-key>'const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"payload": [
{
"id": 123,
"title": "<string>",
"stage": 123,
"expected_value": 123,
"estimated_close_date": "2023-11-07T05:31:56Z",
"win_probability": 123,
"lose_reason": "<string>",
"company_id": 123,
"contact_id": 123,
"owner_id": 123,
"source_conversation_id": 123,
"source_message_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"company": {
"id": 123,
"name": "<string>",
"contacts_count": 123,
"domain": "<string>",
"description": "<string>",
"avatar_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"contacts": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"thumbnail": "<string>"
}
]
},
"contact": {
"payload": [
{
"additional_attributes": {},
"availability_status": "<string>",
"email": "<string>",
"id": 123,
"name": "<string>",
"phone_number": "<string>",
"blocked": true,
"identifier": "<string>",
"thumbnail": "<string>",
"custom_attributes": {
"attribute_key": "attribute_value",
"signed_up_at": "dd/mm/yyyy"
},
"last_activity_at": 123,
"created_at": 123,
"contact_inboxes": [
{
"source_id": "<string>",
"inbox": {
"id": 123,
"avatar_url": "<string>",
"channel_id": 123,
"name": "<string>",
"channel_type": "<string>",
"provider": "<string>"
}
}
]
}
]
},
"owner": {
"id": 123,
"access_token": "<string>",
"account_id": 123,
"available_name": "<string>",
"avatar_url": "<string>",
"confirmed": true,
"display_name": "<string>",
"message_signature": "<string>",
"email": "<string>",
"hmac_identifier": "<string>",
"inviter_id": 123,
"name": "<string>",
"provider": "<string>",
"pubsub_token": "<string>",
"role": "agent",
"ui_settings": {},
"uid": "<string>",
"type": "<string>",
"custom_attributes": {},
"accounts": [
{
"id": 123,
"name": "<string>",
"status": "<string>",
"active_at": "2023-11-07T05:31:56Z",
"role": "administrator",
"permissions": [
"<string>"
],
"availability": "<string>",
"availability_status": "<string>",
"auto_offline": true,
"custom_role_id": 123,
"custom_role": {}
}
]
}
}
],
"meta": {
"page": 123,
"current_page": 123,
"total_count": 123,
"per_page": 123,
"total_pages": 123,
"total_expected_value": 123
}
}Opportunities
List Opportunities
List all opportunities in the account
GET
/
api
/
v1
/
accounts
/
{account_id}
/
opportunities
List Opportunities
curl --request GET \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities \
--header 'api_access_token: <api-key>'const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"payload": [
{
"id": 123,
"title": "<string>",
"stage": 123,
"expected_value": 123,
"estimated_close_date": "2023-11-07T05:31:56Z",
"win_probability": 123,
"lose_reason": "<string>",
"company_id": 123,
"contact_id": 123,
"owner_id": 123,
"source_conversation_id": 123,
"source_message_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"company": {
"id": 123,
"name": "<string>",
"contacts_count": 123,
"domain": "<string>",
"description": "<string>",
"avatar_url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"contacts": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"thumbnail": "<string>"
}
]
},
"contact": {
"payload": [
{
"additional_attributes": {},
"availability_status": "<string>",
"email": "<string>",
"id": 123,
"name": "<string>",
"phone_number": "<string>",
"blocked": true,
"identifier": "<string>",
"thumbnail": "<string>",
"custom_attributes": {
"attribute_key": "attribute_value",
"signed_up_at": "dd/mm/yyyy"
},
"last_activity_at": 123,
"created_at": 123,
"contact_inboxes": [
{
"source_id": "<string>",
"inbox": {
"id": 123,
"avatar_url": "<string>",
"channel_id": 123,
"name": "<string>",
"channel_type": "<string>",
"provider": "<string>"
}
}
]
}
]
},
"owner": {
"id": 123,
"access_token": "<string>",
"account_id": 123,
"available_name": "<string>",
"avatar_url": "<string>",
"confirmed": true,
"display_name": "<string>",
"message_signature": "<string>",
"email": "<string>",
"hmac_identifier": "<string>",
"inviter_id": 123,
"name": "<string>",
"provider": "<string>",
"pubsub_token": "<string>",
"role": "agent",
"ui_settings": {},
"uid": "<string>",
"type": "<string>",
"custom_attributes": {},
"accounts": [
{
"id": 123,
"name": "<string>",
"status": "<string>",
"active_at": "2023-11-07T05:31:56Z",
"role": "administrator",
"permissions": [
"<string>"
],
"availability": "<string>",
"availability_status": "<string>",
"auto_offline": true,
"custom_role_id": 123,
"custom_role": {}
}
]
}
}
],
"meta": {
"page": 123,
"current_page": 123,
"total_count": 123,
"per_page": 123,
"total_pages": 123,
"total_expected_value": 123
}
}Authorizations
Path Parameters
The numeric ID of the account
Query Parameters
Filter by stage
Filter by status
Available options:
active, deleted Filter by owner
Filter by company
Filter by contact
Filter by opportunity column (kanban)
Page number (default 1)
Set to false to fetch all matching rows (no pagination)
Available options:
false