Contents
On this page

Restore Contact - Plugixa CRM

POST /plugixa-crm/v1/contacts/{id}/restore

Bring a contact back from the trash.

Any user with access to Plugixa CRM. With Plugixa CRM Pro roles, the user’s role must also allow deleting this contact.

Request

POST https://your-site.example/wp-json/plugixa-crm/v1/contacts/31/restore

Path parameters

Name Type Description
id integer The contact’s id

Responses

200 OK. The contact is live again.

{
  "success": true,
  "data": {
    "restored": true
  }
}
Field Type Meaning
data.restored boolean Always true

Errors

Status Code When
404 plugixa_crm_not_found No contact with that id, or it is not in the trash.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-site.example/wp-json/plugixa-crm/v1/contacts/31/restore" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-crm/v1/contacts/31/restore');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    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/restore', {
  method: 'POST',
  headers: {
    'Authorization': auth,
  },
});
const { data } = await response.json();

Quick Links

Share