Skip to content

Create or update user

POST
/users
curl --request POST \
--url https://safe-api.safetyradar.com/v2/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com", "fullName": "example", "phoneNumber": "example", "role": "admin", "externalId": "example", "supervisorId": "example", "departmentId": "example", "locationId": "example", "teamId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "permissionGroupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Create a new user, or update the existing user with the same email and add them to this organization if needed. Returns 201 if the organization membership was created, 200 if it already existed. A user is one global record shared by every organization they belong to: fullName and phoneNumber are updated only when the user has no other active organization membership and is not a SafetyRadar super admin, and a verified phone number is never changed. The response carries the stored values.

Media typeapplication/json
object
email
required
string format: email
fullName
required
string
>= 1 characters
phoneNumber
string
nullable /^\+[1-9]\d{6,14}$/
role
string
Allowed values: admin member safety_center_user
externalId
string
supervisorId
string
departmentId
string
locationId
string
teamId
string format: uuid
permissionGroupId
string format: uuid

User updated (existing user found by email; already a member of this organization)

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
email
required
string
fullName
required
string
nullable
phoneNumber
required
string
nullable
avatarUrl
required
string
nullable
role
required
string
Allowed values: admin member safety_center_user
externalId
required
string
nullable
supervisorId
required
string format: uuid
nullable
supervisorEmail
required
string
nullable
departments
required
Array<object>
object
id
required
string format: uuid
name
required
string
slug
required
string
locations
required
Array<object>
object
id
required
string format: uuid
name
required
string
slug
required
string
nullable
teams
required
Array<object>
object
id
required
string format: uuid
name
required
string
slug
required
string
createdAt
required
string
updatedAt
required
string
Example
{
"data": {
"role": "admin"
}
}

User created

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
email
required
string
fullName
required
string
nullable
phoneNumber
required
string
nullable
avatarUrl
required
string
nullable
role
required
string
Allowed values: admin member safety_center_user
externalId
required
string
nullable
supervisorId
required
string format: uuid
nullable
supervisorEmail
required
string
nullable
departments
required
Array<object>
object
id
required
string format: uuid
name
required
string
slug
required
string
locations
required
Array<object>
object
id
required
string format: uuid
name
required
string
slug
required
string
nullable
teams
required
Array<object>
object
id
required
string format: uuid
name
required
string
slug
required
string
createdAt
required
string
updatedAt
required
string
Example
{
"data": {
"role": "admin"
}
}

Bad request - validation error or invalid reference

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Unauthorized

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Rate limit exceeded (rate_limit_exceeded)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Unexpected server error (internal_error)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Version bd999fd · Released November 23, 2026