Add a user to the organization.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
To use this endpoint, select Write Users under the Setup & Administration category when creating or editing an API token. Learn More.
curl --request POST \
--url https://api.samsara.com/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authType": "default",
"email": "user@company.com",
"name": "Bob Smith",
"roles": [
{
"roleId": "8a9371af-82d1-4158-bf91-4ecc8d3a114c",
"tagId": "3914"
}
],
"expireAt": "2025-08-13T19:08:25Z"
}
'{
"data": {
"authType": "default",
"email": "user@company.com",
"id": "123",
"name": "Bob Smith",
"roles": [
{
"expireAt": "2025-08-13T19:08:25Z",
"role": {
"id": "8a9371af-82d1-4158-bf91-4ecc8d3a114c",
"name": "Full Admin"
},
"tag": {
"id": "3914",
"name": "East Coast",
"parentTagId": "4815"
}
}
]
}
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The user to create.
The user creation arguments
The authentication type the user uses to authenticate. To use SAML this organization must have a configured SAML integration. Valid values: default, saml.
default, saml The email address of this user.
"user@company.com"
The first and last name of the user.
"Bob Smith"
The list of roles that applies to this user. A user may have "organizational" roles, which apply to the user at the organizational level, and "tag-specific" roles, which apply to the user for a given tag.
Show child attributes
For users with temporary access, this is the expiration datetime in RFC3339 format
"2025-08-13T19:08:25Z"
Newly created user object with ID.
A single user.
A user object.
Show child attributes
curl --request POST \
--url https://api.samsara.com/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authType": "default",
"email": "user@company.com",
"name": "Bob Smith",
"roles": [
{
"roleId": "8a9371af-82d1-4158-bf91-4ecc8d3a114c",
"tagId": "3914"
}
],
"expireAt": "2025-08-13T19:08:25Z"
}
'{
"data": {
"authType": "default",
"email": "user@company.com",
"id": "123",
"name": "Bob Smith",
"roles": [
{
"expireAt": "2025-08-13T19:08:25Z",
"role": {
"id": "8a9371af-82d1-4158-bf91-4ecc8d3a114c",
"name": "Full Admin"
},
"tag": {
"id": "3914",
"name": "East Coast",
"parentTagId": "4815"
}
}
]
}
}