Attention Within the same ClientId, multiple users can be created with the same documentNumber only if they have different email or phone .
After creating an organization , you need to create two users associated with it. Each user must have a unique documentNumber but different email or phone .
Field Format Structural validation Email RF522- Phone +{country code}{number}The country code must match the selected country (e.g., CHL ⇒ +56) Type Must be one of USER or ORGANIZATION Country ISO 3166-1 alpha-3DocumentType Check #document-types DocumentNumber Must follow the format related to the documentType
Make the following POST request (Create Identity ) to create the first user
Request HTTP curl JavaScript Python Go Rust
POST /sandbox/identities HTTP / 1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Content-Type: application/json
Accept: application/json
{
" 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 " : []
} curl -X POST ' https://api.conomyhq.com/sandbox/identities ' \
-H ' x-api-key: {YOUR_API_KEY} ' \
-H ' Authorization: Bearer {ACCESS_TOKEN} ' \
-H ' conomyhq-api-version: 24-04-2025 ' \
-H ' User-Agent: MyApp/1.0 ' \
-H ' Content-Type: application/json ' \
-H ' Accept: application/json ' \
-d ' {
"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": []
} ' const response = await fetch ( ' https://api.conomyhq.com/sandbox/identities ' , {
method : ' POST ' ,
headers : {
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
body : JSON . stringify ({
" 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 " : []
}),
});
const data = await response . json (); import requests
payload = {
" 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 = requests . post (
' https://api.conomyhq.com/sandbox/identities ' ,
headers ={
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
json = payload ,
)
data = response . json () package main
import (
" bytes "
" net/http "
)
func main () {
payload := [] byte ( ` {
"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": []
} ` )
body := bytes . NewReader ( payload )
req , _ := http . NewRequest ( " POST " , " https://api.conomyhq.com/sandbox/identities " , body )
req . Header . Set ( " x-api-key " , " {YOUR_API_KEY} " )
req . Header . Set ( " Authorization " , " Bearer {ACCESS_TOKEN} " )
req . Header . Set ( " conomyhq-api-version " , " 24-04-2025 " )
req . Header . Set ( " User-Agent " , " MyApp/1.0 " )
req . Header . Set ( " Content-Type " , " application/json " )
req . Header . Set ( " Accept " , " application/json " )
client := & http . Client {}
resp , _ := client . Do ( req )
defer resp . Body . Close ()
} use reqwest :: Client ;
use serde_json :: json ;
#[ tokio :: main ]
async fn main () -> Result <(), Box < dyn std :: error :: Error >> {
let client = Client :: new ();
let payload = json! ({
" 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 " : []
});
let response = client
. post ( " https://api.conomyhq.com/sandbox/identities " )
. header ( " x-api-key " , " { YOUR_API_KEY } " )
. header ( " Authorization " , " Bearer { ACCESS_TOKEN } " )
. header ( " conomyhq-api-version " , " 24-04-2025 " )
. header ( " User-Agent " , " MyApp/1.0 " )
. header ( " Content-Type " , " application/json " )
. header ( " Accept " , " application/json " )
. json ( & payload )
. send ()
. await ? ;
let data : serde_json :: Value = response . json () . await ? ;
Ok (())
} {
" id " : " 679d29934a21df7584b38e12 " ,
" type " : " USER " ,
" name " : " Service Provider 1 " ,
" email " : " serviceprovider1@example.com " ,
" country " : " CHL " ,
" status " : " ACTIVE "
}
Make the following POST request (Create Identity ) to create the second user.
Request HTTP curl JavaScript Python Go Rust
POST /sandbox/identities HTTP / 1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Content-Type: application/json
Accept: application/json
{
" 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 " : []
} curl -X POST ' https://api.conomyhq.com/sandbox/identities ' \
-H ' x-api-key: {YOUR_API_KEY} ' \
-H ' Authorization: Bearer {ACCESS_TOKEN} ' \
-H ' conomyhq-api-version: 24-04-2025 ' \
-H ' User-Agent: MyApp/1.0 ' \
-H ' Content-Type: application/json ' \
-H ' Accept: application/json ' \
-d ' {
"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": []
} ' const response = await fetch ( ' https://api.conomyhq.com/sandbox/identities ' , {
method : ' POST ' ,
headers : {
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
body : JSON . stringify ({
" 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 " : []
}),
});
const data = await response . json (); import requests
payload = {
" 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 = requests . post (
' https://api.conomyhq.com/sandbox/identities ' ,
headers ={
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
json = payload ,
)
data = response . json () package main
import (
" bytes "
" net/http "
)
func main () {
payload := [] byte ( ` {
"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": []
} ` )
body := bytes . NewReader ( payload )
req , _ := http . NewRequest ( " POST " , " https://api.conomyhq.com/sandbox/identities " , body )
req . Header . Set ( " x-api-key " , " {YOUR_API_KEY} " )
req . Header . Set ( " Authorization " , " Bearer {ACCESS_TOKEN} " )
req . Header . Set ( " conomyhq-api-version " , " 24-04-2025 " )
req . Header . Set ( " User-Agent " , " MyApp/1.0 " )
req . Header . Set ( " Content-Type " , " application/json " )
req . Header . Set ( " Accept " , " application/json " )
client := & http . Client {}
resp , _ := client . Do ( req )
defer resp . Body . Close ()
} use reqwest :: Client ;
use serde_json :: json ;
#[ tokio :: main ]
async fn main () -> Result <(), Box < dyn std :: error :: Error >> {
let client = Client :: new ();
let payload = json! ({
" 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 " : []
});
let response = client
. post ( " https://api.conomyhq.com/sandbox/identities " )
. header ( " x-api-key " , " { YOUR_API_KEY } " )
. header ( " Authorization " , " Bearer { ACCESS_TOKEN } " )
. header ( " conomyhq-api-version " , " 24-04-2025 " )
. header ( " User-Agent " , " MyApp/1.0 " )
. header ( " Content-Type " , " application/json " )
. header ( " Accept " , " application/json " )
. json ( & payload )
. send ()
. await ? ;
let data : serde_json :: Value = response . json () . await ? ;
Ok (())
} {
" id " : " 679d2a134a21df7584b38e13 " ,
" type " : " USER " ,
" name " : " Service Provider 2 " ,
" email " : " serviceprovider2@example.com " ,
" country " : " CHL " ,
" status " : " ACTIVE "
}
Once both users have been created, they need to be linked to the organization . This is done by updating the organization entity with the user IDs.
Run the following PATCH request to add the users as children of the organization, or use add children request .
Request HTTP curl JavaScript Python Go Rust
PATCH /sandbox/identities/{ORGANIZATION_ID} HTTP / 1.1
Host: api.conomyhq.com
x-api-key: {YOUR_API_KEY}
Authorization: Bearer {ACCESS_TOKEN}
conomyhq-api-version: 24-04-2025
User-Agent: MyApp/1.0
Content-Type: application/json
Accept: application/json
{
" 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 "
}
]
} curl -X PATCH ' https://api.conomyhq.com/sandbox/identities/{ORGANIZATION_ID} ' \
-H ' x-api-key: {YOUR_API_KEY} ' \
-H ' Authorization: Bearer {ACCESS_TOKEN} ' \
-H ' conomyhq-api-version: 24-04-2025 ' \
-H ' User-Agent: MyApp/1.0 ' \
-H ' Content-Type: application/json ' \
-H ' Accept: application/json ' \
-d ' {
"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"
}
]
} ' const response = await fetch ( ' https://api.conomyhq.com/sandbox/identities/{ORGANIZATION_ID} ' , {
method : ' PATCH ' ,
headers : {
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
body : JSON . stringify ({
" 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 "
}
]
}),
});
const data = await response . json (); import requests
payload = {
" 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 = requests . patch (
' https://api.conomyhq.com/sandbox/identities/ {ORGANIZATION_ID} ' ,
headers ={
' x-api-key ' : ' {YOUR_API_KEY} ' ,
' Authorization ' : ' Bearer {ACCESS_TOKEN} ' ,
' conomyhq-api-version ' : ' 24-04-2025 ' ,
' User-Agent ' : ' MyApp/1.0 ' ,
' Content-Type ' : ' application/json ' ,
' Accept ' : ' application/json ' ,
},
json = payload ,
)
data = response . json () package main
import (
" bytes "
" net/http "
)
func main () {
payload := [] byte ( ` {
"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"
}
]
} ` )
body := bytes . NewReader ( payload )
req , _ := http . NewRequest ( " PATCH " , " https://api.conomyhq.com/sandbox/identities/{ORGANIZATION_ID} " , body )
req . Header . Set ( " x-api-key " , " {YOUR_API_KEY} " )
req . Header . Set ( " Authorization " , " Bearer {ACCESS_TOKEN} " )
req . Header . Set ( " conomyhq-api-version " , " 24-04-2025 " )
req . Header . Set ( " User-Agent " , " MyApp/1.0 " )
req . Header . Set ( " Content-Type " , " application/json " )
req . Header . Set ( " Accept " , " application/json " )
client := & http . Client {}
resp , _ := client . Do ( req )
defer resp . Body . Close ()
} use reqwest :: Client ;
use serde_json :: json ;
#[ tokio :: main ]
async fn main () -> Result <(), Box < dyn std :: error :: Error >> {
let client = Client :: new ();
let payload = json! ({
" 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 "
}
]
});
let response = client
. patch ( " https://api.conomyhq.com/sandbox/identities/ { ORGANIZATION_ID } " )
. header ( " x-api-key " , " { YOUR_API_KEY } " )
. header ( " Authorization " , " Bearer { ACCESS_TOKEN } " )
. header ( " conomyhq-api-version " , " 24-04-2025 " )
. header ( " User-Agent " , " MyApp/1.0 " )
. header ( " Content-Type " , " application/json " )
. header ( " Accept " , " application/json " )
. json ( & payload )
. send ()
. await ? ;
let data : serde_json :: Value = response . json () . await ? ;
Ok (())
} {
" id " : " 679d26c44a21df7584b38e11 " ,
" type " : " ORGANIZATION " ,
" name " : " Operator 1 " ,
" children " : [
{
" id " : " 679d29934a21df7584b38e12 " ,
" name " : " Service Provider 1 "
},
{
" id " : " 679d2a134a21df7584b38e13 " ,
" name " : " Service Provider 2 "
}
],
" status " : " ACTIVE "
}
Tip 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.