Skip to main content
POST
/
users
Create a user
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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The user to create.

The user creation arguments

authType
enum<string>
required

The authentication type the user uses to authenticate. To use SAML this organization must have a configured SAML integration. Valid values: default, saml.

Available options:
default,
saml
email
string
required

The email address of this user.

Example:

"user@company.com"

name
string
required

The first and last name of the user.

Example:

"Bob Smith"

roles
object[]
required

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.

expireAt
string

For users with temporary access, this is the expiration datetime in RFC3339 format

Example:

"2025-08-13T19:08:25Z"

Response

Newly created user object with ID.

A single user.

data
object

A user object.