Get Email Domain Allowlist
URL: https://api.gradual-api.com/public-api/v1/settings/signup/domain-allowlist
HTTP Method: GET
Content type: application/json
Tier: Light
Returns the current list of allowed email domains for sign-up. The community's Sign-Up Preference must be set to "Open to Specific Visitors" for this endpoint to work.
Response Example:
{"domains": ["example.com", "company.com"]}
Response when no allowlist rule exists:
{"domains": []}
Notes:
- Returns
400if the community's Sign-Up Preference is not set to "Open to Specific Visitors".
Update Email Domain Allowlist
URL: https://api.gradual-api.com/public-api/v1/settings/signup/domain-allowlist
HTTP Method: POST
Content type: application/json
Tier: Medium
Adds or replaces domains in the email domain allowlist. Supports two modes: add to append domains to the existing list, or override to replace the entire list.
Request Body Parameters:
mode, string, required, eitheraddoroverride- In
addmode, new domains are appended to the existing list (duplicates are ignored) - In
overridemode, the entire list is replaced with the provided domains
- In
domains, array of strings, required, list of email domains (1-1000 items, e.g."company.com")
Domains are automatically sanitized: trimmed, lowercased, and deduplicated.
Request Body Example (add mode):
{"mode": "add","domains": ["newdomain.com", "partner.org"]}
Response Example (add mode):
{"oldDomains": ["company.com"],"newDomains": ["company.com", "newdomain.com", "partner.org"]}
Request Body Example (override mode):
{"mode": "override","domains": ["company.com", "subsidiary.com"]}
Response Example (override mode):
{"oldDomains": ["company.com", "old-partner.com"],"newDomains": ["company.com", "subsidiary.com"]}
Notes:
- Returns
400if the community's Sign-Up Preference is not set to "Open to Specific Visitors". - Returns
400ifmodeis not"add"or"override". - Returns
400ifdomainsis empty or contains invalid domain formats. - If no allowlist rule exists, one is created automatically with the provided domains.
Remove Domains from Allowlist
URL: https://api.gradual-api.com/public-api/v1/settings/signup/domain-allowlist
HTTP Method: DELETE
Content type: application/json
Tier: Medium
Removes specified domains from the email domain allowlist.
Request Body Parameters:
domains, array of strings, required, list of email domains to remove (1-1000 items)
Request Body Example:
{"domains": ["old-partner.com"]}
Response Example:
{"oldDomains": ["company.com", "old-partner.com"],"newDomains": ["company.com"]}
Notes:
- Returns
400if the community's Sign-Up Preference is not set to "Open to Specific Visitors". - Returns
400ifdomainsis empty or contains invalid domain formats. - Removing a domain that is not in the list is a no-op (returns
200with unchanged list).