> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# DeleteContact

# Package: contacts

# Namespace: Contacts

# Method link: https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/delete-contact.md

## Permission Scopes:
Manage Contacts: SCOPE.DC-CONTACTS.MANAGE-CONTACTS
Manage Members: SCOPE.DC-MEMBERS.MANAGE-MEMBERS

## Introduction

Deletes a contact.

Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin.md) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin.md). After 90 days, they're permanently deleted.

Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.

Restrictions:
- A contact with an active billing subscription can't be deleted.
- A site owner or contributor can't be deleted.

To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts.md).

---

## REST API

### Schema

```
 Method: deleteContact
 Description: Deletes a contact.  Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin.md) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin.md). After 90 days, they're permanently deleted.  Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.  Restrictions: - A contact with an active billing subscription can't be deleted. - A site owner or contributor can't be deleted.  To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts.md).
 URL: https://www.wixapis.com/contacts/v5/contacts/{contactId}
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  contactId
 Method parameters: 
   param name: contactId | type:   none | required: true 
   query param name: deleteMember | type: deleteMember | description: Whether to delete the contact even if it's a site member. If `true`, the site member is also deleted.  Default: `false`  
 Return type: DeleteContactResponse
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 403 | Status Code: PERMISSION_DENIED | Application Code: UNAUTHORIZED_DELETE_MEMBER | Description: Deleting a site member's contact isn't allowed.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CANNOT_DELETE_WIX_USERS_MEMBER | Description: Site member can't be deleted because it's the owner or a contributor.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION | Description: Contact has an active billing subscription and can't be deleted.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CANNOT_DELETE_MEMBER | Description: Contact is a site member and can't be deleted. The site member must be deleted first.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION | Description: Site member was deleted, but the contact wasn't.


```

### Examples

### Delete a contact
Soft deletes a contact by ID (moves it to the trash bin for possible recovery).

```curl
curl -X DELETE \
'https://www.wixapis.com/contacts/v5/contacts/4b4f4016-7bf1-4334-86eb-b0bebdc3f7df' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.crm.contactsV5.deleteContact(contactId, options)
 Description: Deletes a contact.  Deleted contacts are moved to the trash bin and can be restored within 90 days by calling [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin.md) or [Bulk Restore Contacts From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin.md). After 90 days, they're permanently deleted.  Member contacts: To delete a contact that is also a site member, set `deleteMember` to `true`. This deletes both the contact and the member.  Restrictions: - A contact with an active billing subscription can't be deleted. - A site owner or contributor can't be deleted.  To delete multiple contacts in a single request, call [Bulk Delete Contacts](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-delete-contacts.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  contactId
 Method parameters: 
   param name: contactId | type: string | description: GUID of the contact to delete. | required: true | validation: format GUID
   param name: options | type: DeleteContactOptions  none  
        - name: deleteMember | type: boolean | description: Whether to delete the contact even if it's a site member. If `true`, the site member is also deleted.  Default: `false`  
 Return type: PROMISE<DeleteContactResponse>
  EMPTY-OBJECT {}

 Possible Errors:
   HTTP Code: 403 | Status Code: PERMISSION_DENIED | Application Code: UNAUTHORIZED_DELETE_MEMBER | Description: Deleting a site member's contact isn't allowed.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CANNOT_DELETE_WIX_USERS_MEMBER | Description: Site member can't be deleted because it's the owner or a contributor.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CANNOT_DELETE_CONTACT_WITH_BILLING_SUBSCRIPTION | Description: Contact has an active billing subscription and can't be deleted.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CANNOT_DELETE_MEMBER | Description: Contact is a site member and can't be deleted. The site member must be deleted first.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: FAILED_DELETE_CONTACT_AFTER_MEMBER_DELETION | Description: Site member was deleted, but the contact wasn't.


```

### Examples

### Delete a contact
```javascript
import { contactsV5 } from "@wix/crm";

const contactId = "c97ff9b0-345e-44b9-a93f-2a1442a11f3f";

async function deleteContact() {
  const response = await contactsV5.deleteContact(contactId);
}

```

### deleteContact (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { contactsV5 } from '@wix/crm';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { contactsV5 },
  // Include the auth strategy and host as relevant
});


async function deleteContact(contactId,options) {
  const response = await myWixClient.contactsV5.deleteContact(contactId,options);
};
```

---