Unlink contact or property from opportunity
curl --request DELETE \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/{opportunity_id}/links \
--header 'api_access_token: <api-key>'const options = {method: 'DELETE', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/{opportunity_id}/links', 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/{opportunity_id}/links"
headers = {"api_access_token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"id": 123,
"title": "<string>",
"stage": 123,
"expected_value": 123,
"estimated_close_date": "2023-11-07T05:31:56Z",
"budget": 123,
"zone": "<string>",
"property_type": "<string>",
"desired_date": "2023-12-25",
"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>",
"legal_name": "<string>",
"tax_id_type": "<string>",
"tax_id": "<string>",
"tax_id_dv": "<string>",
"fiscal_responsibilities": [
"O-13"
],
"address": "<string>",
"city_name": "<string>",
"city_code": "<string>",
"department_code": "<string>",
"country_code": "<string>",
"bank_id": "<string>",
"bank_account_type": "savings",
"bank_account_number": "<string>",
"bank_certificate_on": "2023-12-25",
"rut_url": "<string>",
"rut_filename": "<string>",
"bank_certificate_url": "<string>",
"bank_certificate_filename": "<string>",
"fiscal_packet_complete": true,
"custom_attributes": {},
"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>"
}
],
"billing_email": "<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>"
],
"grants": {},
"availability": "<string>",
"availability_status": "<string>",
"auto_offline": true,
"custom_role_id": 123,
"custom_role": {},
"system_role": "commercial",
"invite_system_roles": [
"commercial"
],
"edit_system_roles": [
"commercial"
],
"delete_system_roles": [
"commercial"
]
}
]
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{
"error": "<string>"
}Opportunities
Unlink contact or property from opportunity
Remove a contact or property link from a deal. Refused with 422 when it is the last contact or the last property of the deal. Returns the deal.
DELETE
/
api
/
v1
/
accounts
/
{account_id}
/
opportunities
/
{opportunity_id}
/
links
Unlink contact or property from opportunity
curl --request DELETE \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/{opportunity_id}/links \
--header 'api_access_token: <api-key>'const options = {method: 'DELETE', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/{opportunity_id}/links', 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/{opportunity_id}/links"
headers = {"api_access_token": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text){
"id": 123,
"title": "<string>",
"stage": 123,
"expected_value": 123,
"estimated_close_date": "2023-11-07T05:31:56Z",
"budget": 123,
"zone": "<string>",
"property_type": "<string>",
"desired_date": "2023-12-25",
"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>",
"legal_name": "<string>",
"tax_id_type": "<string>",
"tax_id": "<string>",
"tax_id_dv": "<string>",
"fiscal_responsibilities": [
"O-13"
],
"address": "<string>",
"city_name": "<string>",
"city_code": "<string>",
"department_code": "<string>",
"country_code": "<string>",
"bank_id": "<string>",
"bank_account_type": "savings",
"bank_account_number": "<string>",
"bank_certificate_on": "2023-12-25",
"rut_url": "<string>",
"rut_filename": "<string>",
"bank_certificate_url": "<string>",
"bank_certificate_filename": "<string>",
"fiscal_packet_complete": true,
"custom_attributes": {},
"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>"
}
],
"billing_email": "<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>"
],
"grants": {},
"availability": "<string>",
"availability_status": "<string>",
"auto_offline": true,
"custom_role_id": 123,
"custom_role": {},
"system_role": "commercial",
"invite_system_roles": [
"commercial"
],
"edit_system_roles": [
"commercial"
],
"delete_system_roles": [
"commercial"
]
}
]
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{
"error": "<string>"
}Path Parameters
Query Parameters
Response
Success