Contents
On this page
Unlink Contact from Account - Plugixa CRM
DELETE /plugixa-crm/v1/contacts/{id}/accounts/{link_id}
Remove one of a contact’s account links. The account itself is not touched.
Any user with access to Plugixa CRM. With Plugixa CRM Pro roles, the user’s role must also allow editing this contact.
Note. Removing the primary link promotes the next remaining link to primary and makes it the contact’s
account_id. When no link is left,account_idbecomesnull.
Request
DELETE https://your-site.example/wp-json/plugixa-crm/v1/contacts/31/accounts/9
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The contact’s id |
link_id |
integer |
The link’s id, from List Contact Accounts |
Responses
200 OK. data is the contact’s remaining account links.
{
"success": true,
"data": [
{
"id": 7,
"account_id": 12,
"contact_id": 31,
"role": "Buyer",
"is_primary": 1,
"is_inactive": 0,
"created_at": "2026-11-12 09:30:00",
"account_name": "Northwind Traders",
"account_type": "customer"
}
]
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
integer |
The link’s id, used to update or remove it |
data[].account_id |
integer |
The account |
data[].role |
string|null |
The contact’s role at that account |
data[].is_primary |
integer |
1 for the primary account. A contact has at most one |
data[].is_inactive |
integer |
1 when the link is marked inactive |
data[].account_name |
string |
The account’s name |
data[].account_type |
string |
The account’s type |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_crm_not_found |
No such link on this contact. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/plugixa-crm/v1/contacts/31/accounts/9" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-crm/v1/contacts/31/accounts/9');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`);
const response = await fetch('https://your-site.example/wp-json/plugixa-crm/v1/contacts/31/accounts/9', {
method: 'DELETE',
headers: {
'Authorization': auth,
},
});
const { data } = await response.json();
Quick Links
Share