Update a specific user’s information.
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 PATCH \
--url https://api.samsara.com/users/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authType": "default",
"expireAt": "2025-08-13T19:08:25Z",
"name": "Bob Smith",
"roles": [
{
"roleId": "8a9371af-82d1-4158-bf91-4ecc8d3a114c",
"tagId": "3914"
}
]
}
'{
"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.
Unique identifier for the user.
Updates to the user.
The user update 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 For users with temporary access, this is the expiration datetime in RFC3339 format
"2025-08-13T19:08:25Z"
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
Updated user object with ID.
A single user.
A user object.
Show child attributes
curl --request PATCH \
--url https://api.samsara.com/users/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authType": "default",
"expireAt": "2025-08-13T19:08:25Z",
"name": "Bob Smith",
"roles": [
{
"roleId": "8a9371af-82d1-4158-bf91-4ecc8d3a114c",
"tagId": "3914"
}
]
}
'{
"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"
}
}
]
}
}