private AccountRegistrationResponse submitRequest(final AccountRegistrationRequest request,
                                                      final String domain) throws Exception {
        HttpResponse response = null;
        try {
            val syncopeRestUrl = StringUtils.appendIfMissing(SpringExpressionLanguageValueResolver.getInstance().resolve(properties.getUrl()), "/rest/users");
            val headers = CollectionUtils.<String, String>wrap("X-Syncope-Domain", domain,
                HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE,
                HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
            headers.putAll(properties.getHeaders());

            val entity = MAPPER.writeValueAsString(SyncopeUtils.convertToUserCreateEntity(request.getProperties(),
                new UsernamePasswordCredential(request.getUsername(), request.getPassword()), getSyncopeRealm(request)));

            val exec = HttpExecutionRequest.builder()
                .method(HttpMethod.POST)
                .url(syncopeRestUrl)
                .basicAuthUsername(properties.getBasicAuthUsername())
                .basicAuthPassword(properties.getBasicAuthPassword())
                .headers(headers)
                .entity(entity)
                .build();
            response = Objects.requireNonNull(HttpUtils.execute(exec));
            LOGGER.debug("Received http response status as [{}]", response.getReasonPhrase());
            if (!HttpStatus.valueOf(response.getCode()).isError()) {
                val result = EntityUtils.toString(((HttpEntityContainer) response).getEntity());
                LOGGER.debug("Received user object as [{}]", result);
                val responseJson = MAPPER.readValue(result, new TypeReference<Map<String, Object>>() {
                });
                return AccountRegistrationResponse.success()
                    .putProperty("domain", domain)
                    .putProperty("entity", responseJson.get("entity"))
                    .putProperty("propagationStatuses", responseJson.get("propagationStatuses"));
            }
        } finally {
            HttpUtils.close(response);
        }
        return AccountRegistrationResponse.failure().putProperty("domain", domain);
    }
This is {@link SyncopeAccountRegistrationProvisioner}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-syncope-authentication/src/main/java/org/apereo/cas/syncope/SyncopeAccountRegistrationProvisioner.java