---
title: How to delete / remove user accounts through API integrations
description: Learn how to use Centercode's External Listeners to automate user account deletion via API integrations while ensuring GDPR compliance and user privacy.
---

[Skip to content](https://learn2.centercode.com/en/how-to-delete-user-accounts-through-api-integrations#main-content)

English

Show submenu for translations

[Report an Issue](https://learn2.centercode.com/en/kb-tickets/new?hsLang=en) [Customer portal](https://help.centercode.com/admin-portal?hsLang=en)

![New\_Centercode\_Logo.png\]](https://learn2.centercode.com/hs-fs/hubfs/New_Centercode_Logo.png?height=35&name=New_Centercode_Logo.png)

- [Centercode Blog](https://www.centercode.com/blog)

Open main navigation

Close main navigation

- [Centercode Blog](https://www.centercode.com/blog)
- English
  
  Show submenu for translations
- [Report an Issue](https://learn2.centercode.com/en/kb-tickets/new)
- [Customer portal](https://help.centercode.com/admin-portal)
- Starter & Delta Edition Help

 Starter & Delta Edition Help

 How can we help?

- There are no suggestions because the search field is empty.

1. [Legacy Help Center](https://learn2.centercode.com/en?hsLang=en)
2. [Enhanced Integrations & APIs](https://learn2.centercode.com/en/enhanced-integrations-apis?hsLang=en)
3. [Centercode Guides to Endpoint Specific Systems](https://learn2.centercode.com/en/enhanced-integrations-apis?hsLang=en#centercode-guides-to-endpoint-specific-systems)

# How to delete / remove user accounts through API integrations

## Adhere to company user privacy guidelines, GDPR compliance, offboarding employees, etc.

This article applies to **Team** and **Legacy** editions.

Centercode offers [External Listeners](https://help.centercode.com/centercode-guide-to-simple-external-listeners?hsLang=en) to allow your API-capable third-party system to programmatically trigger automation within Centercode. In this example, we’ll cover how your third-party system can send an HTTP POST [webhook](https://help.centercode.com/centercode-guide-to-simple-webhooks?hsLang=en) to trigger a Centercode [Macro](https://help.centercode.com/en/macros-faq?hsLang=en) to delete specific user accounts within your Centercode implementation in order to adhere to user account deletion requests, as well as strict privacy or GDPR compliance. 

In this guide, you will:

1. Create (or identify) an API Key in ***Centercode***
2. Create a User Macro in ***Centercode***
3. Create a User External Listener in ***Centercode***
4. Create a Webhook to trigger from ***your third-party system***

*In order to configure both sides of this integration, you will need:*

- *Access to an existing API Key or Community Manager access to create a new one*

- *An administrator account or assistance from your third-party system*

#### **1.   Creating an API Key**

From the Centercode side, the first step in any API integration is to ensure that you have an API Key available within your Centercode Community. API Keys are used to track and control how API endpoints are accessed and can be leveraged by multiple simultaneous API integrations. If one is already created and available for use, you may continue past this step.

If necessary, create a Community API Key by following steps [outlined here](http://help.newsite.centercode.com/knowledge/creating-your-community-level-api-key?hsLang=en).

\-

#### **2.   Creating a User macro to delete user accounts**

[User Macros](https://help.centercode.com/what-can-user-macros-automate-for-me?hsLang=en) allow you to create a single instruction that includes a set of actions to complete a desired task. In this example, we’ll select user accounts that will be deleted from your Centercode implementation.

**From your Community Home:**

1. Click your company logo located at the top-left of your Community home
2. Hover over **Community administration** and click **Users**
3. Click the **User resources** button
4. Click the **Create a macro** button
5. Create a descriptive (internally facing) name for your Macro
6. Under Macro Options, select **Remove user completely** and follow the prompt 
     - “Include Removed User on Dashboard” is optional and refers to adding removed user metrics to your [Opt-Out Dashboard](https://help.centercode.com/using-the-centercode-opt-out-dashboard?hsLang=en)
     - “Show in User Management Actions” refers to the option to use this Macro manually in User Management’s Actions menu
     - “Only Run Once Per User” refers to the Macro only executing once ever on the user. In this example, if a user is removed using this macro and rejoins your Community, this Macro will not execute on them again.
     - “Suppress Confirmation” refers to skipping the confirmation message when running Macros manually
7. Click **Submit**

You’ve just created your User Macro that deletes user accounts. Your next step is to create the External Listener that will listen for your third-party’s POST webhooks to tell Centercode to trigger this macro on specific users.

\-

#### **3.   Creating an External Listener**

Now that you’ve created the Macro telling Centercode what to *do*, you’ll need to set up how it’s triggered. An External Listener is effectively an API endpoint created by Centercode that your third-party system reaches out to. This provides a path for that system to interact with your Centercode site for a predetermined purpose - in this case, to trigger the above User Macro and delete users.

**After creating the Macro above (from User Resources):**

1. Click **User automation**
2. Click **Create an external listener**
3. Create an (internally-facing) name
4. Add a simple key to help identify this External Listener (ex: “deleteuser”)
5. **(Optional, but important) Add a Filter** 
     - This refers to limiting users in which the User Macro executes; the External Listener will only trigger if the user is within the filter results 
           - For example, you can filter for the Customers team if you want only that team to have users deleted from your Centercode implementation. **This protects other teams (like your administrative team) from being deleted by mistake** if your third-party system sends an administrator email address to be deleted.
6. Under Listener Type dropdown, select Macro Execution
7. Select the User Macro you’ve just created
8. Copy / Save the provided API Endpoint URL (needed in Section 4 below)
9. Click **Submit**

You’ve just created your External Listener!

\-

**4.   Configure a Webhook in your Third-Party System:**

You’ll now need to add a Webhook in your third-party system to connect to the External Listener’s API endpoint to perform its associated macro to delete targeted users. In order to do that, you’ll need to verify Webhooks are capable and enabled within that system. 

Here’s an example of how to enable Webhooks in Atlassian Jira ([Atlassian Support Documentation](https://confluence.atlassian.com/adminjiracloud/managing-webhooks-776636231.html?_ga=2.191825002.1582611961.1531434798-1484110208.1477591480)). *Please note: enabling Webhooks requires global administrator access in Jira.*

**From your Jira instance:**

1. Click on **Settings** ([screenshot](https://centercode.gyazo.com/edd70c40595e2d831ab7c1ccfbab0bb5))
2. Click on **System** ([screenshot](https://centercode.gyazo.com/dcc5612bf261547fed9d2472c1373527))
3. Scroll down to Advanced and click **Webhooks** ([screenshot](https://centercode.gyazo.com/cbeea87f3aaa7c6396b940dbb32b68fb))
4. Click **Create a webhook** ([screenshot](https://centercode.gyazo.com/23b64fa869913e78c0252914f3eb97f8))
5. Add your API Endpoint URL from your Centercode External Listener
6. Replace the placeholder of **VALUE** with the email address of the user you would like to delete from your Centercode implementation

Example:

https://example.centercode.com/api/v1/userMacroListeners/demo?find=**jim@centercode.com**&apiKey=example807d5ea237a4e0bbd7fe216893adef2

\-

### **Notes**

- The values included in the API Endpoint URL in Section 4.6 are critical to the success of your integration and correspond to the following:
- **listener\_key** - the value that targets your External Listener in order to trigger the desired action within Centercode (“deleteuser” in Section 3)
- **find=** - targets the user account *within Centercode*. Your third-party system that is sending webhooks to your Centercode External Listener will need to dynamically insert the appropriate email address.
- **prefix-community\_API\_key** - refers to the Community API Key from Section 1 above
- **Filters** in **External** **Listeners** refer to limiting users in which the User Macro executes on. In other words, the External Listener will only trigger if the user **is within the filter results**.  
    - For example, you can filter for the Customer team if you want only that team to have users deleted from your Centercode implementation. This protects other teams (like your administrative team) from being deleted by mistake if your third-party system sends an administrator email address to be deleted.

 

- [Customer Training & Centercode Basics](https://learn2.centercode.com/en/customer-training-centercode-basics?hsLang=en#main-content)

    - [Customer Video Training](https://learn2.centercode.com/en/customer-training-centercode-basics?hsLang=en#customer-video-training)
    - [Centercode FAQs](https://learn2.centercode.com/en/customer-training-centercode-basics?hsLang=en#centercode-faqs)
    - [Centercode Basics](https://learn2.centercode.com/en/customer-training-centercode-basics?hsLang=en#centercode-basics)
- [Community Administration](https://learn2.centercode.com/en/community-administration?hsLang=en#main-content)

    - [Initial Configuration](https://learn2.centercode.com/en/community-administration?hsLang=en#initial-configuration)
    - [Community Administration](https://learn2.centercode.com/en/community-administration?hsLang=en#community-administration)
- [Project Setup & Administration](https://learn2.centercode.com/en/project-setup-administration?hsLang=en#main-content)

    - [Project Creation](https://learn2.centercode.com/en/project-setup-administration?hsLang=en#project-creation)
    - [Recruiting](https://learn2.centercode.com/en/project-setup-administration?hsLang=en#recruiting)
    - [Project Administration](https://learn2.centercode.com/en/project-setup-administration?hsLang=en#project-administration)
    - [Macros and Automation](https://learn2.centercode.com/en/project-setup-administration?hsLang=en#macros-and-automation)
- [User Management](https://learn2.centercode.com/en/user-management?hsLang=en#main-content)

    - [Surveys](https://learn2.centercode.com/en/user-management?hsLang=en#surveys)
    - [Content & Resources](https://learn2.centercode.com/en/user-management?hsLang=en#content-resources)
    - [Tester & User Management](https://learn2.centercode.com/en/user-management?hsLang=en#tester-user-management)
- [Feedback Management](https://learn2.centercode.com/en/feedback-management?hsLang=en#main-content)

    - [Feedback Collection](https://learn2.centercode.com/en/feedback-management?hsLang=en#feedback-collection)
    - [Feedback Triage & Moderation](https://learn2.centercode.com/en/feedback-management?hsLang=en#feedback-triage-moderation)
- [Reporting](https://learn2.centercode.com/en/reporting?hsLang=en#main-content)

    - [Delta Dashboards](https://learn2.centercode.com/en/reporting?hsLang=en#delta-dashboards)
    - [Custom Reports](https://learn2.centercode.com/en/reporting?hsLang=en#custom-reports)
- [Enhanced Integrations & APIs](https://learn2.centercode.com/en/enhanced-integrations-apis?hsLang=en#main-content)

    - [Integration Center Endpoints](https://learn2.centercode.com/en/enhanced-integrations-apis?hsLang=en#integration-center-endpoints)
    - [Single Sign-On Integrations](https://learn2.centercode.com/en/enhanced-integrations-apis?hsLang=en#single-sign-on-integrations)
    - [Centercode Guides to Simple API Integrations](https://learn2.centercode.com/en/enhanced-integrations-apis?hsLang=en#centercode-guides-to-simple-api-integrations)
    - [Centercode Guides to Endpoint Specific Systems](https://learn2.centercode.com/en/enhanced-integrations-apis?hsLang=en#centercode-guides-to-endpoint-specific-systems)
    - [Enhanced Integrations Troubleshooting](https://learn2.centercode.com/en/enhanced-integrations-apis?hsLang=en#enhanced-integrations-troubleshooting)
- [Troubleshooting & Miscellaneous](https://learn2.centercode.com/en/troubleshooting-miscellaneous?hsLang=en)
- [Announcements and Releases](https://learn2.centercode.com/en/announcements-and-releases?hsLang=en#main-content)

    - [C17 - The Delta Release](https://learn2.centercode.com/en/announcements-and-releases?hsLang=en#c17-the-delta-release)
    - [Centercode's GoEarly Program](https://learn2.centercode.com/en/announcements-and-releases?hsLang=en#centercodes-goearly-program)
    - [Update Archive](https://learn2.centercode.com/en/announcements-and-releases?hsLang=en#update-archive)

- [Centercode Blog](https://www.centercode.com/blog)

[![Chill listening crop-3](https://learn2.centercode.com/hs-fs/hubfs/Centercode_Logo_Icon_M.png?width=48&height=48&name=Centercode_Logo_Icon_M.png "Chill listening crop-3")](https://help.centercode.com?hsLang=en)

Centercode Help Center

Copyright © 2026, Centercode