Skip to main content
Skip table of contents

User Registration

Use the User Registration API to create a new user in Crassula.

After following the step-by-step instructions below, you will be able to carry out the following operations:

  • Construct a sample request with all the necessary parameters for user registration.

  • Include additional parameters in the request body to provide further information on the client's address, such as postal code, state, and full address.

  • Use the master API key in the authorization header to access additional parameters, including client verification status and verification level.

Entry Parameters

Below are the essential entry parameters for user registration:

Endpoint

This API uses a POST method to send a request to the server:

POST /api/public/register

Base URL

Below is the Crassula host URL:

Client.crassula.localhost

Headers

The HTTP headers below let the client and the server pass additional information:

Header

Required

Description

Authorization

N/A

Required only when there is a need to set the verification level and the verification status during the registration.

Captcha-token

N/A

Required only if the Captcha functionality is enabled in the WL’s configuration.

Device-type

N/A

Required for mobile application only.

Request Body Parameters

The request body contains the following user sign-up details:

Parameter

Type

Required

Description

firstName

String

Yes

Client first name.

lastName

String

Yes

Client second name.

email

String

Yes

Full client email address.

countryCode

String

Yes

Сountry code in the ISO 3166-1 alpha-2 format.

password

String

Yes

Password of at least 8 characters, with at least one lowercase symbol, one uppercase symbol, and at least one digit.

referralCode

String/Null

Yes

Referral code that is recorded in the client profile.

agreed

Boolean

Yes

Reply to whether the customer agrees to the terms of use.

birthDate

String

Yes

Client birth date.

Additional Request Body Parameters

The parameters listed below serve to provide additional information on client address:

Parameter

Type

Required

Description

postalCode

String

Yes

Client postal code.

state

String

Yes

Client region or state.

addressLine1

String

Yes

First full client address.

addressLine2

String

Yes

Second full client address.

If the master API key is used in the authorization header, the following additional parameters are available:

Parameter

Type

Required

Description

verificationStatus: 

0: Not Verified

1: Email Verified

2: Phone Verified

3: Documents submitted

4: Identified

String

Yes

Client verification status

verificationLevel

String

Yes

Client verification level. Used, for example, to apply payment limits. Can be from 0 to 5.

Response Body Parameters

Parameter

Description

token

A JWT token that can be used in the Authorization header to send requests.

refresh_token

A token that is used to update the JWT token.

clientId

Client ID that was created in the system on the basis of a registration request.

Request Example

{"firstName":"test",

"lastName":"register",

"email":"test4@crassula.io",

"countryCode":"LV",

"password":"Qwerty123",

"referralCode":null,

"agreed":true,

"birthDate":"2005-04-03"}

Response Example

{

"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2ODA1MjM0OTIsImV4cCI6MTY4MDUyNDA5Miwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoidGVzdDRAY3Jhc3N1bGEuaW8iLCJjdXJyZW50Q291bnRyeUNvZGUiOiJaWiIsInRmYVJlcXVpcmVkIjpmYWxzZSwidGZhVmVyaWZpZWQiOmZhbHNlLCJ0ZmFNZXRob2RzIjpbXX0.fpupSSs4sxlXX5vPo7-jypVQPx_gpGy6t854WXd7vuGSYRKoh0dkQpcFVwPauSinUL2CJtbyy1mbtm3VYWDwJ8t_I3mV1f7kg2mtlxlDR7IDJYa5TkgymMnctoancdO3mW0NFk8VkpLNeG8vGpPLQVa8-gV7srvRmkwYsACrHTC-uLtKpuv5kk_NoZx6fdY_TLGx_e41i_ZkEmmWoaMaa_Rj78uKCGVQbH1OP1ataJWB29XJ92ru0bLmzRUJyHbP8BMs0BuspKmIhv8MlefEh_DIVXMQDS_WCrNri46n-qOiLdkvqqrA7XAR4tD7zJAu_ObtNdrehG4LHvxyZ9h1svcvCdcELX9B7AQiwKFmpmGvVZFvC-hRcNQ1TMM8Ztj7Le027j7dofBrW-mPbW3hgw1LFasap5XCNSXTYPdw-SM_yKKYrpqWOP4ykITbN5WXlilH9V0vx3xoATVoESoUaZIf6xqehms8Rn3ZH6eIHi3btCW5sGzwFTe8Teq-yLg-sSAKTe80tMvSSyMGDUCu3eKZiHRii04y2zJ8aHWEkTuZHMTc_FSoDhUiNZ9A3zTW_5uqpmKHAG3Qxg5IZaDDdyp95qwYn-eTclPmqpxMUH45AleUjlSpEhXmuHijmJ46E7wNktvACTBnQndzaij9rhk7e6Jx2U1tBpFo4M_dW0Y",

"refresh_token": "94f54a1c32d7f5dac19b8b71602941685b9ea5fbe34474a69c349cbd0b9ca1de4579a420ad4509be4d39a2e0c721aa45bb32ff049af87c465c44c4a0bf882496",

"clientId": "e7500eb9-5ea8-461a-8808-7ca50a237f7a"

}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.