Skip to content

Automate client deletion

This guide demonstrates how to delete client data using our API. In line with compliance obligations, you can automatically identify clients scheduled for deletion either by polling the API using the deletion_date filter or by subscribing to the client.deletion_reminder_due webhook. Once identified, you can delete the client data—including all PII, files, and associated records—using the API endpoints provided.

Prerequisites

  • Amiqus API credentials: Ensure you have valid credentials to authenticate your requests.
  • Compliance setup: Confirm that your deletion policies are in place and that the deletion_date is set correctly for each client.
  • Webhook subscription (optional): To use the webhook-based approach, you must be subscribed to the client.deletion_reminder_due event in your webhook settings.

Overview of the flows

There are two supported automation flows: polling and webhooks.

Option 1: Polling for clients

Option 2: Using the client.deletion_reminder_due webhook

Step-by-step guide

Option 1: Polling via the API

1. List all clients with a deletion_date set to today

Call the list all clients endpoint. Use the deletion_date filter with the value today to retrieve clients scheduled for deletion.

2. Delete each client

Iterate through the results and call the delete a client endpoint for each client.

Option 2: Handling the webhook

1. Subscribe to the client.deletion_reminder_due event

Ensure your webhook endpoint is configured to receive events, and that you're subscribed to the client.deletion_reminder_due event.

2. Receive the webhook

When a client’s deletion date is due, you will receive a webhook payload containing the client ID.

3. Delete the client

Use the client ID from the payload to call the delete a client endpoint.

What happens next?

After deleting the client data:

  • Log the deletion: Ensure that all deletion actions are logged for audit purposes.
  • Review API limits: Monitor your API rate limits to avoid any throttling, particularly if you are processing a large number of clients.
  • Verify deletion: Consider implementing additional checks or notifications to confirm that deletions have been successfully executed.

By following either of these approaches—or combining both for redundancy—you can efficiently manage the deletion of client data, ensuring that your practices remain compliant with data protection regulations.