Create SCIM user
/scim/v2/Users
Adds a user to the team. userName (or emails[0].value) is the email address. A user created with active: false is a 400. The user starts with the role and environments of the team's default SSO connection (a 400 if it has no default environments), and the team's group mappings then apply.
Request Body
Used as the name when name.formatted is not sent.
jane@example.comResponse Body
Whether the user is an active member of the team.
The identity provider's ID for the user.
The Truto user ID.
UserGroup
The user's name, or their email address when no name is set.
["urn:ietf:params:scim:schemas:core:2.0:User"]The user's email address, lowercased.
jane@example.comErrors
| Status | Description |
|---|---|
400 | No userName, active is false, or the default SSO connection has no default environments. |
curl -X POST 'https://api.truto.one/scim/v2/Users' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"userName": "jane@example.com",
"externalId": "your_externalId",
"name": {},
"displayName": "your_displayName",
"active": true
}'const body = {
"userName": "jane@example.com",
"externalId": "your_externalId",
"name": {},
"displayName": "your_displayName",
"active": true
};
const response = await fetch('https://api.truto.one/scim/v2/Users', {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/scim/v2/Users"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
payload = {
"userName": "jane@example.com",
"externalId": "your_externalId",
"name": {},
"displayName": "your_displayName",
"active": True
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())