List users
const url = 'https://safe-api.safetyradar.com/v2/users?role=admin';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://safe-api.safetyradar.com/v2/users?role=admin' \ --header 'Authorization: Bearer <token>'Get all users in the organization with optional filters.
Not paginated: the response is every matching user in one data array, and the endpoint takes no page or limit.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Filter by organization role (admin, member, safety_center_user)
Filter by organization role (admin, member, safety_center_user)
Filter by team membership (UUID)
Filter by team membership (UUID)
Filter by department (UUID or slug)
Filter by department (UUID or slug)
Filter by location (UUID or slug)
Filter by location (UUID or slug)
Filter by email (partial match)
Filter by email (partial match)
Responses
Section titled “Responses”List of users
object
object
object
object
object
Example
{ "data": [ { "role": "admin" } ]}Invalid request: a parameter or the body failed validation (validation_error), or the body is not valid JSON (invalid_json)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unauthorized
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Rate limit exceeded (rate_limit_exceeded)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unexpected server error (internal_error)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}
