Validate portal name

POST /api/portal/validateportalname

Request

Checks if the specified name is available to create a portal.

Query

portalNamestringrequired

Portal name

Examples

POST /api/portal/validateportalname?portalName=example HTTP/1.1
Host: example.com
curl --request POST \
  --url 'https://example.com/api/portal/validateportalname?portalName=example'

Responses

200

Response containing information about the portal name availability.

errorenum of string

If the portal name is already taken or some other error occurred during the request, the response object will have the error key with one of the following values:

  • error - a general error, the description will be given in the message parameter,
  • portalNameEmpty - the portal name is empty, you need to send some value in the portalName parameter,
  • portalNameExist - the portal name is already taken, you need to choose another one,
  • portalNameIncorrect - the portal name contains some characters which are not allowed (characters other than base Latin letters and digits),
  • tooShortError - the portal name is too short, it cannot be less than 6 characters.

Can be one of: error, portalNameEmpty, portalNameExist, portalNameIncorrect, tooShortError.

messagestring

If the portal name is available, the response object message key will have the "portalNameReadyToRegister" value, otherwise the error description will be included into the message value.

variantsarray of string

In case error is equal to "portalNameExist", the response will also have a list of all the existing potal names starting with the name from the request.

400

Response containing information about the portal name availability.

errorenum of string

If the portal name is already taken or some other error occurred during the request, the response object will have the error key with one of the following values:

  • error - a general error, the description will be given in the message parameter,
  • portalNameEmpty - the portal name is empty, you need to send some value in the portalName parameter,
  • portalNameExist - the portal name is already taken, you need to choose another one,
  • portalNameIncorrect - the portal name contains some characters which are not allowed (characters other than base Latin letters and digits),
  • tooShortError - the portal name is too short, it cannot be less than 6 characters.

Can be one of: error, portalNameEmpty, portalNameExist, portalNameIncorrect, tooShortError.

messagestring

If the portal name is available, the response object message key will have the "portalNameReadyToRegister" value, otherwise the error description will be included into the message value.

variantsarray of string

In case error is equal to "portalNameExist", the response will also have a list of all the existing potal names starting with the name from the request.

403

Forbidden

errorenum of string
  • authorization - Authorization error, the possible reasons: an unknown authorization scheme is used, or the authorization key is missing, or the authorization key time is out, or a wrong key is used.

Can be one of: authorization.

500

Internal Server Error

errorenum of string
  • authorization - Internal server error when decoding the authorization key.
  • registerNewTenantError - An error occurred while registering a new portal.
  • error - An internal server error occurred.

Can be one of: authorization, registerNewTenantError, error.

Get Help

  • If you have any questions about ONLYOFFICE Workspace, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).