User Creation and Management Flow
All user-related operations require users to be created first in the system.Create User
curl -X POST "https://connect.cariqa.com/api/v1/users/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"locale": "de",
"custom_properties": {
"external_id": "abcdefg123456"
}
}'
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
data = {
"email": "user@example.com",
"locale": "de",
"custom_properties": {
"external_id": "abcdefg123456"
}
}
response = requests.post(
"https://connect.cariqa.com/api/v1/users/",
headers=headers,
json=data
)
const response = await fetch('https://connect.cariqa.com/api/v1/users/', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'user@example.com',
locale: 'de',
custom_properties: {
'external_id': 'abcdefg123456'
}
})
});
{
"id": "72794486-bf87-44fb-9b74-5b8fed6c994d",
"email": "user@example.com",
"locale": "de",
"external_id": {
"external_id": "abcdefg123456"
}
}
List Users Before Selection
curl -X GET "https://connect.cariqa.com/api/v1/users/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
response = requests.get(
"https://connect.cariqa.com/api/v1/users/",
headers=headers
)
const response = await fetch('https://connect.cariqa.com/api/v1/users/', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
});
{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"id": "29b8c323-eaf8-487a-a43d-0d37dd7328f1",
"email": "user1@example.com",
"locale": "en",
"custom_properties": null
},
{
"id": "72794486-bf87-44fb-9b74-5b8fed6c994d",
"email": "user@example.com",
"locale": "de",
"custom_properties": {
"external_id": "abcdefg123456"
}
},
{
"id": "db48d284-d67b-4e71-9065-1ef0e1b062d0",
"email": "user@example.com",
"locale": "de",
"custom_properties": {
"external_id": null
}
}
]
}
Retrieve User Details
curl -X GET "https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locale": "en"
}'
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
response = requests.get(
"https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/",
headers=headers
)
const response = await fetch('https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
});
{
"id": "72794486-bf87-44fb-9b74-5b8fed6c994d",
"email": "user@example.com",
"locale": "de",
"custom_properties": {
"external_id": "abcdefg123456"
}
}
Update User Details
curl -X PATCH "https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"locale": "en"
}'
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
data = {"locale": "en"}
response = requests.patch(
"https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/",
headers=headers,
json=data
)
const response = await fetch('https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
locale: 'en'
})
});
{
"id": "72794486-bf87-44fb-9b74-5b8fed6c994d",
"email": "user@example.com",
"locale": "en",
"custom_properties": {
"external_id": "abcdefg123456"
}
}
Soft Delete User
curl -X DELETE "https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}
response = requests.delete(
"https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/",
headers=headers
)
const response = await fetch('https://connect.cariqa.com/api/v1/users/72794486-bf87-44fb-9b74-5b8fed6c994d/', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json'
}
});
Key Implementation Notes
- Client Scoping: API automatically validates ownership - users are scoped to the authenticated client
- Email Uniqueness: Email addresses are not unique across the system and are optional
- External id: Set external ids of the users and use them to search users
- Soft Delete: Users are marked as deleted but data is preserved for compliance
- Automatic Validation: No need to manually verify user ownership before calling detail endpoints
