saveMailDomainSettings
StringWrapper saveMailDomainSettings(MailDomainSettingsRequestDto)
POST /api/2.0/settings/maildomainsettings
Save the mail domain settings
Overwrites the portal's trusted mail domain configuration, which controls which email domains are treated as already verified when a user is invited or self-registers. Requires Owner or DocSpaceAdmin (the EditPortalSettings permission). When the requested mode is a custom domain list, every domain is normalized to lowercase and checked against the expected hostname format; a domain that fails the check, or an empty custom list, causes the whole call to be rejected without saving anything. For the other modes the domain list in the request is ignored. The inviteUsersAsVisitors flag controls whether users who join through a trusted domain are added as full members or as visitors, and takes effect on the next join rather than retroactively. This is a mutating, idempotent call: repeating it with the same body leaves the portal in the same state. On success it returns a confirmation message, not the saved settings themselves; read them back from GET api/2.0/settings.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| MailDomainSettingsRequestDto | body | MailDomainSettingsRequestDto | [optional] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Confirmation message that the trusted mail domain settings were saved | StringWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | The request body cannot be read or has no type, domains or inviteUsersAsVisitors, or the trust type is Custom and the domain list is empty or holds an empty or malformed domain | - | - |
| 403 | The caller has no portal-settings right | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | 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