Register a client
This tutorial provides detailed instructions on registering a new client via API.
To register a client, follow the steps below:
To start a registration procedure, initialize the Sign Up wizard:
POST[host]/api/v2/my/signup/wizard
If there’s more than one wizard that can be used for running the registration procedure, select the preferred wizard:
POST[host]/api/v2/my/signup
In the request body, specify the
uuid
andwizard_id
parameters.If you have only one Sign Up wizard configured and enabled, skip this step and proceed to Step 3.
Register a client:
POST[host]/api/v2/my/signup
In the request body, specify the fields required for client registration.
Step 1
Initialize the Sign Up wizard.
Request
Header parameters:
Accept: application/json
Content-Type: application/json
POST[host]/api/v2/my/signup/wizard
curl --location --request POST 'https://host.name/api/v2/my/signup/wizard' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
Response
- code
integer
An HTTP code specifying the current step of a registration procedure:
HTTP code
200
for an intermediary step after which another page of a registration form is displayed to a clientHTTP code
202
for a final wizard step signaling that client registration succeeded
- data
object
ornull
The object containing either a list of fields required for registration or a list of available Sign Up wizards.
- done
boolean
If
true
, a client was successfully registered; otherwise,false
.- uuid
string
The universally unique identifier (UUID) assigned to a registration procedure.
- workflow
string
A string value indicating the next step of a registration procedure. Possible values:
basic_register_form
— indicates that there’s only one available Sign Up wizard and that a list of fields required for client registration has been received in the response. Next, proceed to Step 3.registration_list
— indicates that a list of available Sign Up wizards has been received in the response. Next, proceed to Step 2.
{
"code": 200,
"data": [
{
"id": 1,
"created_at": "2022-01-12T10:45:06.000000Z",
"updated_at": "2023-05-26T09:29:53.000000Z",
"name": "Corporate",
"description": "",
"type": "registration",
"default": true
},
{
"id": 2,
"created_at": "2021-05-28T11:22:58.000000Z",
"updated_at": "2023-12-27T14:00:46.000000Z",
"name": "Individual",
"description": "",
"type": "registration",
"default": false
}
],
"done": false,
"uuid": "71548d30-9a09-401a-be8e-e36bf22b596f",
"workflow": "registration_list"
}
Step 2
If you have more than one Sign Up wizard configured and enabled, select the preferred wizard.
Request
Header parameters:
Accept: application/json
Content-Type: application/json
Body:
- uuid
string
required The universally unique identifier (UUID) assigned to a registration procedure.
- wizard_id
integer
The identifier of the wizard selected for running a registration procedure.
POST[host]/api/v2/my/signup
curl --location --request POST 'https://host.name/api/v2/my/signup' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"uuid": "71548d30-9a09-401a-be8e-e36bf22b596f",
"wizard_id": 2
}'
Response
- code
integer
An HTTP code specifying the current step of a registration procedure:
HTTP code
200
for an intermediary step after which another page of a registration form is displayed to a clientHTTP code
202
for a final wizard step signaling that client registration succeeded
- data
object
The object containing a list of fields required for client registration.
In this example, the following required fields must be submitted at the next step of a registration procedure:
email
— the client email addresspassword
— the client passwordpassword_confirmation
— the repeatedly entered password for its confirmationinfo
— the object specifying the client’s first and last names
- done
boolean
If
true
, a client was successfully registered; otherwise,false
.- uuid
string
The universally unique identifier (UUID) assigned to a registration procedure.
- workflow
string
The string value
basic_register_form
indicates that the preferred Sign Up wizard was selected, and the list of fields required for client registration was received in the response.
{
"code": 200,
"data": {
"fields": {
"email": {
"id": "428d46a4-d868-4270-a6ea-4ae65d07a293",
"priority": 1,
"name": "email",
"label": {
"value": "email",
"raw": false,
"hint": null
},
"type": "input",
"rules": [
[
"required",
[]
],
[
"email",
[
"rfc",
"spoof",
"strict"
]
]
]
},
"password": {
"id": "76c1ac94-59d7-459b-bd36-be5717732d19",
"priority": 2,
"name": "password",
"label": {
"value": "password",
"raw": false,
"hint": {
"value": "password_hint",
"position": null
}
},
"type": "passwordButton",
"rules": [
[
"required",
[]
]
]
},
"password_confirmation": {
"id": "c5a595d3-75ba-4c82-8969-87c6cff5e3b6",
"priority": 3,
"name": "password_confirmation",
"label": {
"value": "Password Confirmation",
"raw": false,
"hint": {
"value": "password_confirm_hint",
"position": null
}
},
"type": "passwordButton",
"rules": [
[
"required",
[]
],
[
"same",
[
"password"
]
]
]
},
"info": {
"id": "jfbfgfafab",
"priority": 4,
"name": "info",
"label": {
"value": "-",
"raw": false,
"hint": null
},
"type": "",
"rules": [],
"initialValue": null,
"options": [],
"description": null,
"hidden": false,
"readonly": false,
"data": null,
"fields": {
"givenName": {
"id": "icaebhgabb",
"priority": 1,
"name": "givenName",
"label": {
"value": "First Name",
"raw": false,
"hint": null
},
"type": "input",
"rules": [
[
"required",
[]
],
[
"string",
[]
],
[
"min",
[
"1"
]
],
[
"max",
[
"30"
]
]
]
},
"familyName": {
"id": "fcejjaehib",
"priority": 2,
"name": "familyName",
"label": {
"value": "Last name",
"raw": false,
"hint": null
},
"type": "input",
"rules": [
[
"required",
[]
],
[
"string",
[]
],
[
"min",
[
"1"
]
],
[
"max",
[
"30"
]
]
]
}
}
},
"recaptchaResponse": {
"id": null,
"priority": null,
"name": "recaptchaResponse",
"label": {
"value": "",
"raw": false,
"hint": null
},
"type": "captcha",
"rules": [],
"initialValue": null,
"options": [],
"description": null,
"hidden": false,
"readonly": false,
"data": {
"enabled": false
}
}
}
},
"done": false,
"uuid": "4921304f-e49c-41a6-99dc-076bce957317",
"workflow": "basic_register_form"
Step 3
Register a client.
Request
Header parameters:
Accept: application/json
Content-Type: application/json
Body:
- uuid
string
required The universally unique identifier (UUID) assigned to a registration procedure.
The fields required for client registration. In this example, the fields received at Step 2 are used for illustration purposes:
- email
string
required The client email address.
- password
string
required The client password.
- password_confirmation
string
required The repeatedly entered password for its confirmation.
- info
object
required The object specifying a client’s name:
Show object fields- givenName
string
The client’s first name.
- familyName
string
The client’s last name.
- givenName
POST[host]/api/v2/my/signup
curl --location --request POST 'https://host.name/api/v2/my/signup' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"uuid": "4921304f-e49c-41a6-99dc-076bce957317",
"email": "username@example.com",
"password": "QAzqw123!",
"password_confirmation": "QAzqw123!",
"info": {
"givenName": "John",
"familyName": "Smith"
}
}'
Response
- code
integer
An HTTP code specifying the current step of a registration procedure:
HTTP code
200
for an intermediary step after which another page of a registration form is displayed to a clientHTTP code
202
for a final wizard step signaling that client registration succeeded
- done
boolean
If
true
, a client was successfully registered; otherwise,false
.- uuid
string
The universally unique identifier (UUID) assigned to a registration procedure.
- workflow
string
The string value
Terminate
indicates that a client was successfully registered.
{
"code": 202,
"data": [],
"done": true,
"uuid": "4921304f-e49c-41a6-99dc-076bce957317",
"workflow": "Terminate"
}