Skip to main content

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​

NameInTypeDescriptionNotes
MailDomainSettingsRequestDtobodyMailDomainSettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Confirmation message that the trusted mail domain settings were savedStringWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The 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--
403The caller has no portal-settings right--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

StringWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json