POST
/api/users/invitesCreate a user invite
Creates an invite link for a new user. Only available when embedded IdP is enabled. The user is not created until they accept the invite.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
User invite information
auto_groupsarray<string>required
Group IDs to auto-assign to peers registered by this user
emailstringrequired
User's email address
expires_inintegeroptional
Invite expiration time in seconds (default 72 hours)
namestringrequired
User's full name
rolestringrequired
User's NetBird account role
200Invite created successfully
auto_groupsarray<string>required
Group IDs to auto-assign to peers registered by this user
created_atstringrequired
Invite creation time
emailstringrequired
User's email address
expiredbooleanrequired
Whether the invite has expired
expires_atstringrequired
Invite expiration time
idstringrequired
Invite ID
invite_tokenstringoptional
The invite link to be shared with the user. Only returned when the invite is created or regenerated.
namestringrequired
User's full name
rolestringrequired
User's NetBird account role
400Bad Request
401Requires authentication
403Forbidden
409User or invite already exists
412Precondition failed - embedded IdP is not enabled
422Validation failed
500Internal Server Error
Error handling
A 400 is returned: Bad Request. A 401 is returned: Requires authentication. A 403 is returned: Forbidden. A 409 is returned: User or invite already exists. A 412 is returned: Precondition failed - embedded IdP is not enabled. A 422 is returned: Validation failed. A 500 is returned: Internal Server Error.