saveDnsSettings
StringWrapper saveDnsSettings(DnsSettingsRequestDto)
PUT /api/2.0/settings/dns
Save the DNS settings
Maps a custom domain name onto the current tenant, or clears the mapping, so the portal becomes reachable under the caller's own DNS name instead of only its default alias. Available only on a Standalone (self-hosted) installation; on SaaS the call is always refused. Requires Owner or DocSpaceAdmin (the EditPortalSettings permission). Disable the mapping by passing enable=false, in which case the domain name in the request is ignored. A domain that collides with the portal's reserved base domain, or otherwise fails validation, is rejected without changing the current mapping. This is a mutating, idempotent call. On success the previous domain also stops answering, and any CSP configuration referencing it is updated to the new one.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| DnsSettingsRequestDto | body | DnsSettingsRequestDto | [optional] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Confirmation that the DNS mapping was updated | StringWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 403 | The caller has no portal-settings right | - | - |
| 415 | The portal is not a Standalone installation, so a custom domain cannot be mapped | - | - |
| 500 | The installation hides the DNS settings section, or the domain name is not a valid host name, lies under the portal's base domain, has a length outside the allowed range, is reserved, or is already the alias or mapped domain of a portal, this one included | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 400 | Bad Request. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: application/json
- Accept: application/json