Invite a Member
Invite someone to join the active account by email address. The person does not need an existing Ngris account at the time of invitation — they're identified by email and assigned the role you specify.
When the invite is created, Ngris sends the recipient an email containing accept and decline links. Independently of email delivery, the invitee can see the pending invite by calling GET /v1/user/invitations from their own session and act on it from there. On acceptance they become a member of this account and can switch into it.
The active account is taken from your session/API key context — there's no account id in the path. Requires the members:write permission. Only one pending invite can exist per email per account; inviting an address that already has a pending invite returns 409.
Request body
@.uuid of the role to grant on acceptance (from /account/roles). Must be a role that belongs to the active account.Deprecated: role_id (integer) is still accepted until the sunset. Send role_uuid; sending both for different objects is a 400 id_uuid_mismatch.
Response (201 Created)
Returns the created invitation under the invitation key.
uuid of the account the invitee will join.uuid of the role granted on acceptance.uuid of the user who issued the invite (you).pending, accepted, declined, expired, revoked. Always pending on creation.Deprecated: until the sunset this response also carries the legacy integer id and *_id fields. Don't use them; read uuid and the *_uuid fields.
Errors
email, missing role_uuid or not a uuid, or role_id and role_uuid name different roles (id_uuid_mismatch).members:write permission on the active account, or the role grants a permission you do not hold yourself.role_uuid is not a role of the active account (another account's role reads like an unknown one).