Skip to main content
All CollectionsWhite Label
Using White Label API Routes in Zapier with Webhooks
Using White Label API Routes in Zapier with Webhooks
Dave avatar
Written by Dave
Updated this week

If you wish to automate user management, you can integrate these API routes with Zapier using the Webhooks action. This guide will walk you through setting up a Zap in Zapier that adds or removes users from your white label site.

Prerequisites

Before proceeding, ensure you have:

1. Enabled the API in your White Label settings. You can do this by navigating to White Label Settings.

2. Your API Key ready. You can retrieve or reset your API key from your account settings here.

Setting Up a Zap to Add a User

1. Create a New Zap:

  • Log in to your Zapier account and click "Create Zap."

  • Choose the trigger app and event that will start the Zap (e.g., a new form submission in Google Forms).

2. Set Up the Webhooks Action:

  • For the action step, select "Webhooks by Zapier" as the app.

  • Choose the action event "POST."

3. Configure the Webhooks Action:

  • URL: Enter the API endpoint to add a user:

https://api.marketing.deal.ai/api/2024-01/whitelabel/users
  • Payload Type: Select "json."

  • Data: Fill in the fields with the information from your trigger app. For example:

    • `firstName`: Map this to the field that contains the user's first name.

    • `lastName`: (optional) Map this to the field that contains the user's last name.

    • `email`: Map this to the field that contains the user's email.

    • `password`: (optional) If you want to set a specific password, map it here. If not, leave this blank to generate a random password.

    • `sendInviteEmail`: Set this to `"yes"` if you want an invitation email to be sent, or `"no"` if not.

    • `role`: (optional) Set this to the name of the role in your White Label settings that you want to give to this user

  • Headers: Add the following header:

    • `Deal-AI-API-Key`: Enter your API key.

4. Test Your Zap:

  • Zapier will prompt you to test the action. Ensure that everything is configured correctly and run the test. If successful, the user will be added to your white-labeled site.

5. Turn on Your Zap:

  • Once the test is successful, turn on your Zap to activate it.

Setting Up a Zap to Remove a User

1. Create a New Zap:

  • As before, start by creating a new Zap and selecting the trigger app and event.

2. Set Up the Webhooks Action:

  • Choose "Webhooks by Zapier" as the action app.

  • Select the action event "DELETE."

3. Configure the Webhooks Action:

  • URL: Enter the API endpoint to remove a user:

https://api.marketing.deal.ai/api/2024-01/whitelabel/users
  • Payload Type: Select "json."

  • Data:

    • `email`: Map this to the field that contains the email address of the user to be removed.

  • Headers: Add the following header:

    • `Deal-AI-API-Key`: Enter your API key.

4. Test Your Zap:

  • Run a test to ensure the user is successfully removed from your white-labeled site.

5. Turn on Your Zap:

  • Once the test is successful, activate your Zap.

Setting Up a Zap to Update a User's Role

1. Create a New Zap:

  • As before, start by creating a new Zap and selecting the trigger app and event.

2. Set Up the Webhooks Action:

  • Choose "Webhooks by Zapier" as the action app.

  • Select the action event "PATCH."

3. Configure the Webhooks Action:

  • URL: Enter the API endpoint to remove a user:

https://api.marketing.deal.ai/api/2024-01/whitelabel/users/role
  • Payload Type: Select "json."

  • Data:

    • `email`: Map this to the field that contains the email address of the user to be updated.

    • `role`: Map this to the field that contains the name of the role. You can leave this empty or a blank string to clear out the user's role.

  • Headers: Add the following header:

    • `Deal-AI-API-Key`: Enter your API key.

4. Test Your Zap:

  • Run a test to ensure the user is successfully updated in your white-labeled site.

5. Turn on Your Zap:

  • Once the test is successful, activate your Zap.

Important Notes

  • Always ensure that your API Key is kept secure. Do not share it publicly or include it in unprotected locations.

  • Be careful when configuring your Zap to avoid accidentally removing the wrong users or adding users with incorrect data.

By using Zapier’s Webhooks action, you can easily integrate your white-labeled site’s user management with various apps and services, automating repetitive tasks and streamlining your workflow.

If you need further assistance, feel free to reach out to our support team.

Did this answer your question?