| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Overview
Use this method to add a single domain to the list of domains allowed to host the WebSDK for your account, as an API alternative to the Domains to host WebSDK editor in the Dashboard.
See WebSDK settings for background on this allowlist and what it is used for.
Required permissions
To use this method, your app token must have the Manage client's settings permission.
Use case
Use this method to add a new domain to your WebSDK allowlist as part of an automated deployment — for example, when spinning up a new client subdomain — without needing to open the Dashboard.
Notes
- This method is available to Enterprise clients only. Self-service (SS) clients receive a
403upon this call.- Adding a domain that is already on the list (after normalization) is a no-op: the call returns
200with the list unchanged.domaincan be an exact domain or a third-level-and-deeper wildcard (for example,*.shop.acme.com).- The list is capped at 100 domains; adding a genuinely new domain beyond the cap is rejected with
400.- Changes made through this API are recorded in the client's audit log, the same as manual edits made in the Dashboard.
Request example
curl -X POST
'https://api.sumsub.com/resources/api/websdkDomains' \
-H 'X-App-Token: <your-app-token>' \
-H 'X-App-Access-Sig: <your-signature>' \
-H 'X-App-Access-Ts: <unix-timestamp>' \
-H 'Content-Type: application/json' \
-d '{
"domain": "app.example.com"
}'Response explained
The response is a JSON object with the full, updated list of domains allowed to host the WebSDK.
| Field | Type | Description |
|---|---|---|
domains | Array of strings | Full, updated list of domains allowed to host the WebSDK, including the one just added (or unchanged, if it was already present). |
Response examples
If the request is successfully sent and processed, you will get a response like the one below.
{
"domains": [
"example.com",
"app.example.com"
]
}If the request fails, you will receive an HTTP response containing an error code along with a
message explaining the error. For example, when called by a self-service client:
{
"description": "This method is not available for self-service clients",
"code": 403,
"correlationId": "b628a7fbdf4fa487b26406e79e76f3f7"
}Response codes
| Status | Description |
|---|---|
200 | Domain added; returns the updated domains list — see Response examples. |
400 | domain is invalid, or the list is already at the 100-domain cap. |
403 | Caller is a self-service client, or the app token lacks the Manage client's settings permission. |
200