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.

Available in MCP
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
Body
rolestring · enum · nullableOptional

Default role to set on newly invited members.

Possible values:
teamIdsstring[] · min: 1Optional

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.

ssobooleanOptional

If true, invites the user as an SSO user of the organization. Defaults to false.

Responses
200

OK

application/json
usersstring[]Required

The unique identifiers of the users who were added to the organization

invitednumberRequired

The number of users who were added to the organization

failedSSOEmailsstring[]OptionalDeprecated

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

pendingConsentEmailsstring[]Optional

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.

unverifiedEmailsstring[]Optional

Email addresses that must be verified before their existing accounts can be invited.

post/orgs/{organizationId}/invites
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?

Powered by GitBook