Create a user
curl --request POST \
--url https://clarus-api.com/api/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "users",
"attributes": {
"email": "[email protected]",
"role_id": 123,
"name": "<string>",
"is_active": true,
"language": "<string>",
"timezone": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>"
}
}
}
'import requests
url = "https://clarus-api.com/api/users"
payload = { "data": {
"type": "users",
"attributes": {
"email": "[email protected]",
"role_id": 123,
"name": "<string>",
"is_active": True,
"language": "<string>",
"timezone": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>"
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'users',
attributes: {
email: '[email protected]',
role_id: 123,
name: '<string>',
is_active: true,
language: '<string>',
timezone: '<string>',
external_system_reference1: '<string>',
external_system_reference2: '<string>',
external_system_reference3: '<string>',
string1: '<string>',
string2: '<string>',
string3: '<string>',
string4: '<string>',
string5: '<string>'
}
}
})
};
fetch('https://clarus-api.com/api/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 123,
"type": "users",
"attributes": {
"email": "[email protected]",
"role_id": 123,
"name": "<string>",
"is_active": true,
"language": "<string>",
"timezone": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>"
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Users
Create a user
Create a new user account for accessing the WMS. Users are assigned roles that determine their permissions.
POST
/
api
/
users
Create a user
curl --request POST \
--url https://clarus-api.com/api/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "users",
"attributes": {
"email": "[email protected]",
"role_id": 123,
"name": "<string>",
"is_active": true,
"language": "<string>",
"timezone": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>"
}
}
}
'import requests
url = "https://clarus-api.com/api/users"
payload = { "data": {
"type": "users",
"attributes": {
"email": "[email protected]",
"role_id": 123,
"name": "<string>",
"is_active": True,
"language": "<string>",
"timezone": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>"
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'users',
attributes: {
email: '[email protected]',
role_id: 123,
name: '<string>',
is_active: true,
language: '<string>',
timezone: '<string>',
external_system_reference1: '<string>',
external_system_reference2: '<string>',
external_system_reference3: '<string>',
string1: '<string>',
string2: '<string>',
string3: '<string>',
string4: '<string>',
string5: '<string>'
}
}
})
};
fetch('https://clarus-api.com/api/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 123,
"type": "users",
"attributes": {
"email": "[email protected]",
"role_id": 123,
"name": "<string>",
"is_active": true,
"language": "<string>",
"timezone": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>"
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "users",
"attributes": {
"email": "[email protected]",
"name": "John Smith",
"role_id": 5,
"is_active": true
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
email | Yes | Unique email address for login |
name | Yes | User display name |
role_id | No | Role ID for permissions |
is_active | No | Whether user can log in (default: true) |
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Show child attributes
Show child attributes
Response
User created successfully
Show child attributes
Show child attributes
⌘I

