If you manage a large user base on your white-labeled Deal.ai site, doing everything manually through the dashboard can slow you down.
The Deal.ai White Label API gives you the ability to add users, remove users, and update their roles programmatically, making it easy to automate and scale your agency.
Here is the complete documentation for managing users via the API.
1. Deal.ai API Prerequisites
Before making any API calls to the Deal.ai servers, you must complete these two setup steps:
Enable the API: Go to your Deal.ai White Label Settings and toggle the API option to "Enabled." This must be done before any API routes will work.
Obtain Your API Key: Navigate to your Deal.ai Account Settings and scroll to the bottom of the page to retrieve your private API key. (You can also reset your key from this page if needed).
Every API request you make must include your key in the request header, formatted exactly like this to authenticate with Deal.ai:
JSON
{ "Deal-AI-API-Key": "<api key goes here>" }2. Adding a User via the Deal.ai API
Use this route to add a new user to your white-labeled Deal.ai site.
Endpoint:
POST https://api.marketing.deal.ai/api/2024-01/whitelabel/usersRequest Body Parameters:
firstName(required): The user's first name.lastName(optional): The user's last name.email(required): The user's email address.password(optional): The user's password. If not provided, the Deal.ai system will generate a random password automatically.sendInviteEmail(optional, defaults to "no"): Set to "yes" to send a welcome invitation email to the user upon creation.role(optional): A pre-defined role from your Deal.ai White Label settings, such as Basic, Advanced, or Premium.
Example Request:
JSON
{ "firstName": "John", "lastName": "Doe", "email": "[email protected]", "password": "securePassword123", "sendInviteEmail": "yes", "role": "Premium Plan" }Responses:
200 OK — User successfully added to Deal.ai.
400 or higher — An error occurred. Check the response body for details.
3. Removing a User via the Deal.ai API
Use this route to remove an existing user from your white-labeled Deal.ai site.
Endpoint:
DELETE https://api.marketing.deal.ai/api/2024-01/whitelabel/usersRequest Body Parameters:
email(required): The email address of the Deal.ai user you want to remove.
Example Request:
JSON
{ "email": "[email protected]" }Responses:
200 OK — User successfully removed from Deal.ai.
400 or higher — An error occurred. Check the response body for details.
4. Updating a User's Role via the Deal.ai API
Use this route to assign a new role to a user or to remove their current role entirely within Deal.ai.
Endpoint:
PATCH https://api.marketing.deal.ai/api/2024-01/whitelabel/users/roleRequest Body Parameters:
email(required): The email address of the Deal.ai user you want to update.role(optional): The new role to assign, exactly as configured in your White Label settings. If left empty or undefined, the user's current role is removed, and they revert to the Default Role in Deal.ai.
Example Request:
JSON
{ "email": "[email protected]", "role": "Basic Plan" }Responses:
200 OK — User role successfully updated in Deal.ai.
400 or higher — An error occurred. Check the response body for details.
5. Important Notes for the Deal.ai API
To ensure your custom integrations run smoothly, keep these core rules in mind:
Always enable the API in your Deal.ai White Label settings before making requests.
Always include your Deal.ai API key in the request header.
All required fields must be populated before submitting a request.
If no password is provided when adding a user, Deal.ai will generate a random one securely.
Use the
sendInviteEmailparameter to control whether a welcome email is sent to new users.
6. Using Zapier with the Deal.ai API
If you prefer a no-code approach to automating your user management, you can connect the Deal.ai API to Zapier! Check out our dedicated Zapier setup article for step-by-step instructions on how to trigger these exact user updates without writing any code.
