Assign Unit Role by Email
POST
/units/{unitId}/roles/invite
Assigns a unit role by email. Single entry point for the UI. If the email belongs to a registered user, the role is assigned directly (outcome: “assigned”). If the email is not registered, an invitation is created (outcome: “invited”). The caller does not need to know whether the user exists.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” unitId
required
string
Header Parameters
Section titled “Header Parameters ” X-Space-Id
required
string format: uuid
UUID of the target Space (tenant boundary). Validated against user access.
Request Body required
Section titled “Request Body required ”object
email
required
Email of the user to invite or assign
string format: email
Example
john.smith@example.com role
required
Role to assign
string
Example
operatorResponses
Section titled “ Responses ”object
outcome
required
Whether the user was directly assigned or invited
string
Example
assigned id
required
Assignment or invitation ID
string format: uuid
Example
770e8400-e29b-41d4-a716-446655440000Unauthorized — missing or invalid JWT
Forbidden — insufficient permissions
Resource not found
Validation failed — invalid input