Create User
Creates a new user with the provided information.
Request
POST /v2/users/users
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer token for authentication |
Content-Type | Required. Must be application/json |
Request Body
| Field | Type | Description |
|---|---|---|
email | string | Required. User's email address |
name | string | Required. User's first name |
surname | string | Required. User's last name |
identity_number | string | Required. User's national identity number |
Example
curl --location '\{\{baseUrl\}\}/v2/users/users' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJRCI6Ijk3MWNlZGVmLWVlZDctNDcwZi04YWIzLTBhZTM3ZDc0NTY4NCIsImV4cGlyYXRpb24iOjE3NjI5MjI4MTAsInN1cGVydmlzb3JFbWFpbCI6ImRldkBydWRpcS5jb20iLCJzdXBlcnZpc29ySUQiOiI2OGQyODBiYmM1ODA3M2NkZjU2NDJkMjAiLCJzdXBlcnZpc29yTm9kZUlEIjoiNjY1YWU1MzZhNjM5MmI3NWNmZDQwMzUyIiwic3VwZXJ2aXNvck5vZGVJbnRJRCI6MSwic3VwZXJ2aXNvck5vZGVQYXRoIjoiMSIsInN1cGVydmlzb3JSb2xlSUQiOiI2NjVhZTc5NjEwY2UyMTZkYmMzNWM5M2IiLCJzdXBlcnZpc29yUm9sZVByaW9yaXR5IjoxMDB9.kVHOxb43oLj-oe-Skkxe9_vxZIKikn4_h3qlsWatyPg' \
--data-raw '{
"email": "burkayydurduu@gmail.com",
"name": "Burkay",
"surname": "Durdu",
"identity_number": "11111111111"
}'
Response
A successful response returns the created user information:
Status Code: 201 Created
{
"id": "6913872755654191dede37da",
"name": "Burkay",
"surname": "Durdu",
"email": "burkay.durdu@dalioprotocol.com",
"address": "",
"identity_number": "11111111111",
"kyc": null
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the user |
name | string | User's first name |
surname | string | User's last name |
email | string | User's email address |
address | string | User's blockchain wallet address (empty string if not set) |
identity_number | string | User's national identity number |
kyc | object | null | Know Your Customer verification information (null if not set) |
Status Codes
| Status Code | Description |
|---|---|
| 201 | Created - User created successfully |
| 400 | Bad Request - Invalid request parameters or body |
| 401 | Unauthorized - Invalid or missing authentication token |
| 409 | Conflict - User with the same email or identity number already exists |
| 500 | Internal Server Error |