Contents
Purge Account - Plugixa CRM
DELETE /plugixa-crm/v1/accounts/{id}/purge
Delete a account permanently. This cannot be undone.
Any user with access to Plugixa CRM. With Plugixa CRM Pro roles, the user’s role must also allow deleting this account.
Note. Purge works on a live record too: it does not have to be in the trash first. No webhook event fires.
Request
DELETE https://your-site.example/wp-json/plugixa-crm/v1/accounts/12/purge
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The account’s id |
Responses
200 OK. The account is gone.
{
"success": true,
"data": {
"purged": true
}
}
| Field | Type | Meaning |
|---|---|---|
data.purged |
boolean |
Always true |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_crm_not_found |
No account with that id, live or in the trash. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-site.example/wp-json/plugixa-crm/v1/accounts/12/purge" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-crm/v1/accounts/12/purge');
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/accounts/12/purge', {
method: 'DELETE',
headers: {
'Authorization': auth,
},
});
const { data } = await response.json();
Quick Links
Share