Create users
Each entity must have a unique email, phone, and documentNumber. If an entity with the same values already exists, the request will fail.
email
, phone
, and documentNumber
.1 Create the First User
POST
request (Create Identy) to create the first user:curl --location --request POST 'https://api.conomyhq.com/sandbox/identities' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'User-Agent: <YOUR_APPLICATION_NAME>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: */*' \
--header 'Host: api.conomyhq.com' \
--header 'Connection: keep-alive' \
--data-raw '{
"type": "USER",
"name": "Service Provider 1",
"nickname": "SP1",
"email": "serviceprovider1@example.com",
"phone": "+5692111111",
"documentType": "RUT",
"documentNumber": "17604011-4",
"idv": "iv-23124",
"country": "CHL",
"securityOptions": {
"twoFactorEnabled": false
},
"children": []
}'
Response:
{
"type": "USER",
"name": "Service Provider 1",
"nickname": "SP1",
"email": "serviceprovider1@example.com",
"phone": "+5692111111",
"documentNumber": "17604011-4",
"documentType": "RUT",
"idv": "iv-23124",
"securityOptions": {
"twoFactorAuth": false,
"signTrx": false,
"signAccountsOperations": false
},
"country": "CHL",
"status": "ACTIVE",
"id": "679d29934a21df7584b38e12",
"createdAt": "2025-01-31T19:50:43Z",
"updatedAt": "2025-01-31T19:50:43Z"
}
2 Create the Second User
curl --location --request POST 'https://api.conomyhq.com/sandbox/identities' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'User-Agent: <YOUR_APPLICATION_NAME>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: */*' \
--header 'Host: api.conomyhq.com' \
--header 'Connection: keep-alive' \
--data-raw '{
"type": "USER",
"name": "Service Provider 2",
"nickname": "SP2",
"email": "serviceprovider2@example.com",
"phone": "+5693111111",
"documentType": "RUT",
"documentNumber": "18604011-4",
"idv": "iv-23125",
"country": "CHL",
"securityOptions": {
"twoFactorEnabled": false
},
"children": []
}'
Response:
{
"type": "USER",
"name": "Service Provider 2",
"nickname": "SP2",
"email": "serviceprovider2@example.com",
"phone": "+5693111111",
"documentNumber": "18604011-4",
"documentType": "RUT",
"idv": "iv-23125",
"securityOptions": {
"twoFactorAuth": false,
"signTrx": false,
"signAccountsOperations": false
},
"country": "CHL",
"status": "ACTIVE",
"id": "679d2a134a21df7584b38e13",
"createdAt": "2025-01-31T19:52:51Z",
"updatedAt": "2025-01-31T19:52:51Z"
}
3 Link Users to the Organization
PATCH
request to add the users as children of the organization:curl --location --request PATCH 'https://api.conomyhq.com/sandbox/identities/<ORGANIZATION_ID>' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'User-Agent: <YOUR_APPLICATION_NAME>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Accept: */*' \
--header 'Host: api.conomyhq.com' \
--header 'Connection: keep-alive' \
--data-raw '{
"children": [
{
"id": "<USER_1_ID>",
"name": "Service Provider 1",
"email": "serviceprovider1@example.com"
},
{
"id": "<USER_2_ID>",
"name": "Service Provider 2",
"email": "serviceprovider2@example.com"
}
]
}'
Response:
{
"type": "ORGANIZATION",
"name": "Operator 1",
"nickname": "Op 1",
"email": "operator1@example.com",
"phone": "+5691111111",
"documentNumber": "77123126-K",
"documentType": "RUT",
"idv": "iv-23123",
"securityOptions": {
"twoFactorAuth": false,
"signTrx": false,
"signAccountsOperations": false
},
"country": "CHL",
"children": [
{
"id": "679d29934a21df7584b38e12",
"name": "Service Provider 1",
"lastName": "",
"email": "serviceprovider1@example.com"
},
{
"id": "679d2a134a21df7584b38e13",
"name": "Service Provider 2",
"lastName": "",
"email": "serviceprovider2@example.com"
}
],
"status": "ACTIVE",
"id": "679d26c44a21df7584b38e11",
"createdAt": "2025-01-31T19:38:44Z",
"updatedAt": "2025-01-31T20:01:59Z"
}
Note: After this step, both users will be officially linked to the organization. Ensure that the organization ID and user IDs are correctly used in the request.
Modified at 2025-01-31 20:05:45