Basic concepts

The ONLYOFFICE Hosted Solution is implemented as REST over HTTP using GET/POST. All the resources, like client creation, portal registration, etc, have their own URLs and are designed to be manipulated in isolation.

Authentication

Authentication in the ONLYOFFICE Hosted Solution is managed via the HTTP authentication, i.e. every request must include the Authorization HTTP header. For information and examples please visit the Authentication section.

Making requests

To identify the request and response format, please make sure that both the Content-Type and Accept headers are set to application/json. The API methods are called without specifying the format for the response and are returned in JSON format.

Responses

If a request succeeds, it will return a status code in the 200 range and a JSON-formatted response. Note that, in general, if a request causes a new record to be created, the response will use the 201 Created status. Any other successful operation will return a 200 status code.

If a request fails, a non-200 status code will be returned in JSON format, containing the error code and additional error information (if available) as the response content.

Possible error codes and their description

HTTP Status CodeError codeDescription
400portalNameEmptyThe required parameter portalName, which must be present in the request, is not specified.
400tooShortErrorThe portalName specified in the request is too short.
400portalNameIncorrectInvalid characters in the portalName parameter.
400portalNameNotFoundNo portal with the portal name specified in the request has been registered.
400portalNameExistPortal with the portal name specified in the request has already been registered.
400portalsCountTooMuchThe limit for the number of portals has been reached.
400tooMuchAttemptsThe limit for the number of request attempts has been reached.
400passPolicyErrorThe password specified in the request does not meet the requirements.
400recaptchaInvalidInvalid reCAPTCHA value has been entered.
400paramsAn error has been made in the method parameters specified in the request.
403authorizationAuthorization 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.
500authorizationInternal server error when decoding the authorization key.
500registerNewTenantErrorInternal server error when registering a new portal.
500errorInternal server error.

Get Help

  • If you have any questions about ONLYOFFICE DocSpace, 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).