Invite a user to the entity
POST/users/invitations
Creates a PENDING invitation and sends the acceptance link by email.
Idempotent on (email, entity): if a PENDING invitation for that
email already exists in this entity, returns 200 with the existing
invitation — no new row, no new email.
Scope validation: each subAccountId must belong to the entity; Admin
role cannot be scoped to sub-accounts.
Requires USER_CREATE permission.
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 404
- 409
Pending invitation for this email already exists (idempotent)
Invitation created and email sent
Validation error (invalid email, invalid UUID, scope limit exceeded)
Missing/invalid JWT or entity selection
Caller lacks USER_CREATE permission
Role not found (RBAC_ROLE_NOT_FOUND) or entity not found
RBAC_SCOPED_OWNER_FORBIDDEN — Admin role cannot be scoped; RBAC_SUB_ACCOUNT_NOT_IN_ENTITY — a publicId does not belong to the entity