Invite users in an organization
Optionally adds invitees to teams using teamIds. Team owners may invite organization Guests into teams they own. Other organization invitations require an organization admin.
A unique entity identifier
^[a-zA-Z0-9_-]+$Default role to set on newly invited members.
Teams to add the invitees to as Members, preserving existing team roles. The caller must be an owner of every team or an organization admin. Team-owner email invitations require acceptance before granting organization Guest and team Member access, including when the recipient already belongs to the organization. Existing roles are preserved. Granting an organization role or SSO access requires an organization admin.
If true, invites the user as an SSO user of the organization. Defaults to false.
OK
The unique identifiers of the users who were added to the organization
The number of users who were added to the organization
A list of emails who were invited to the organization, but who were not added as SSO users as they are members of another org
Addresses awaiting acceptance of a team-owner invitation. Every requested address follows this flow, regardless of account existence or organization membership. No access is granted until acceptance.
Email addresses that must be verified before their existing accounts can be invited.
Bad Request
POST /v1/orgs/{organizationId}/invites HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"emails": [
"contact@gitbook.com"
],
"role": "admin",
"teamIds": [
"text"
],
"sso": true
}{
"users": [
"text"
],
"invited": 1,
"pendingConsentEmails": [
"text"
],
"unverifiedEmails": [
"text"
]
}Last updated
Was this helpful?