Appearance
Create Client
About 360 wordsAbout 1 min
post /public/v1/users/create
Request Body
| Name | Type | Required | Rule | Description |
|---|---|---|---|---|
| id | string | Optional | the id of client | |
string | Mandatory | email | the email of user | |
| phone | object | Optional | the phone of user | |
| phone.country_code | string | Optional | user's phone country code | |
| phone.number | string | Optional | user's phone number | |
| password | string | Mandatory | the password of user | |
| repeat_password | string | Mandatory | repeat password of user | |
| update_password | boolean | Mandatory | Whether the user needs to change the password when logging in for the first time. | |
| form_id | string | Optional | length 8 | the id of registration form |
| referrer_id | string | Optional | length 8 | the referral code of the referrer |
boolean | Optional | Whether send mail to user | ||
| language | string | Optional | language code | The language of user |
custom_fields | fields | Optional | additional fields configured in registration form | |
| email_code | string | Optional | length 6 | the OTP sent by email |
| phone_code | string | Optional | length 6 | the OTP sent by phone SMS |
Expected HTTP status code
- 201
Custom Field
Custom fields are JSON root fields. The field key is a random key obtained from the form, and the value follows the example format below.
| Type | Input Format | Example |
|---|---|---|
text / textarea / description | String | "Hello World" |
number | Number | 123.45 |
number_string | Numeric String | "123456789" |
boolean | Boolean | true or false |
radio / select | String | "option1" |
dynamicSelect | Any | "any_value" |
multiselect / checkbox | Array | ["value1", "value2"] |
date | String (YYYY-MM-DD) | "2024-06-15" |
document | Array of Objects | [{"id": "doc123", "name": "file.pdf", "doc": "base64"}] |
phone | Object | {"country_code": "86", "number": "13800138000"} |
email | String | "[email protected]" |
country / nation | String | "CN" |
location | Object | {"country": "CN", "state": "GD", "city": "SZ"} |
participants / leads | Array | [{...}, {...}] |
Complete JSON Example
{
"custom_key_text": "Hello World",
"custom_key_textarea": "This is a long text content for textarea field",
"custom_key_description": "This is a description field content",
"custom_key_number": 123.45,
"custom_key_number_string": "123456789",
"custom_key_boolean": true,
"custom_key_radio": "option1",
"custom_key_select": "option2",
"custom_key_dynamicSelect": "dynamic_value",
"custom_key_multiselect": ["value1", "value2", "value3"],
"custom_key_checkbox": ["option1", "option2"],
"custom_key_date": "2024-06-15",
"custom_key_document": [
{
"id": "doc001",
"name": "ID_Card.pdf",
"doc": "base64_encoded_string"
}
],
"custom_key_phone": {
"country_code": "86",
"number": "13800138000"
},
"custom_key_email": "[email protected]",
"custom_key_country": "CN",
"custom_key_nation": "CN",
"custom_key_location": {
"country": "CN",
"state": "Guangdong",
"city": "Shenzhen"
},
"custom_key_participants": [
{ "id": "p001", "name": "Participant 1" }
],
"custom_key_leads": [
{ "id": "l001", "name": "Lead 1" }
]
}