Users

Prev Next
Post
/public/v1/user-management/users

Creates one or more users. Returns 207 Multi-Status when some users were created and others failed. Returns 409 Conflict for duplicate usernames or emails, and 422 for invalid field values.

Security

The requesting user must have the following permission to create users:

  • Administration → Users → Create Users
Security
HTTP
Type Bearer
Header parameters
x-r365-context-tenant-id
stringRequired

Identifies the R365 tenant the request applies to. Required on every request.

Body parameters
Array of object
object
fullName
string Required
username
string Required
defaultLocation
string (uuid) Required
email
string Required
managedByBrand
string | null
mobileNumber
string | null
allLocationsAccess
boolean | null
allBrandFranchiseeLocationAccess
boolean | null
canGrantAccessBeyondPersonalLevel
boolean
inActive
boolean | null
userRoles
Array of object (GuidId) Required

User roles to assign. At least one role is required — an empty array is rejected with errorCode 'urn:r365:user:role-required'.

Min items1
object
id
string (uuid)

Unique identifier of the guid id.

locations
Array of object | null
object
id
string (uuid)

Unique identifier of the guid id.

externalLocations
Array of object | null
object
id
string (uuid)

Unique identifier of the external location.

tenant
string
reportRoles
Array of object | null
object
id
string (uuid)

Unique identifier of the guid id.

optionIds
Array of object | null
object
id
integer (int64)

Unique identifier of the entity reference long post.

linkedToEmployee
string (uuid) | null

Identifier of the employee record to link this user to. Supplied as a bare GUID on the request; the GET response returns it as an object with id and name.

legalEntities
Array of object | null

Legal entities to scope this user to.

object
id
string (uuid)

Unique identifier of the guid id.

Responses
200

Users created successfully.

Expand All
object
success
Array of object (UserCreated)
object
id
string (uuid)

Unique identifier of the user created.

username
string
errors
Array

Per-item failures. NOTE: the wire property is 'errors' (SuccessErrorsResponse), not 'userErrors'.

Example[]
207

207 Multi-Status – Partial success: the response contains arrays of created users and of errors for those that could not be created.

Expand All
object
success
Array of object (UserCreated)
object
id
string (uuid)

Unique identifier of the user created.

username
string
errors
Array of object (UserErrors)
object
username
string
errors
Array of object (ErrorMessage)
object
error
string | null
errorCode
string | null
400

Bad Request — a parameter value is malformed, of the wrong type, or outside its allowed range.

401

Unauthorized — the bearer token is missing, invalid or expired, or is not valid for the specified tenant.

403

Forbidden — the caller lacks the permission required for this operation.

404

Not Found — the requested resource does not exist, or the supplied continuation token is unknown or has expired.

409

Conflict — the request conflicts with the current state of the resource and cannot be applied.

422

Unprocessable Entity — a required parameter is missing, or a supplied parameter value is invalid.

429

Too Many Requests — the caller has exceeded the rate limit; retry after a short delay.

500

Internal Server Error — an unexpected error occurred while processing the request.