Skip to content
POST /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

activeboolean
displayNamestring

Used as the name when name.formatted is not sent.

externalIdstring
nameobject
formattedstring
userNamestring
Example: jane@example.com

Response Body

activeboolean

Whether the user is an active member of the team.

externalIdstring

The identity provider's ID for the user.

idstring

The Truto user ID.

metaobject
createdstring · date-time
lastModifiedstring · date-time
locationstring
resourceTypestring
Possible values:
UserGroup
nameobject
formattedstring

The user's name, or their email address when no name is set.

schemasstring[]
Example: ["urn:ietf:params:scim:schemas:core:2.0:User"]
userNamestring

The user's email address, lowercased.

Example: jane@example.com

Errors

StatusDescription
400No 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())