GitBook API API reference OrganizationsOrganization invites Streamline the invitation process for new members joining your organization.
Use this API to create and revoke invitations for new members. By automating invite flows, you can maintain a cohesive onboarding experience for collaborators and speed up team expansion.
Invite users in an organization
post
https://api.gitbook.com/v1 /orgs/ {organizationId} /invites
organizationId string required The unique id of the organization
role one of optional Default role to set on newly invited members.
"The role of a member in an organization.
"admin": Can administrate the content: create, delete spaces, ...
"create": Can create content.
"review": Can review content.
"edit": Can edit the content (live or change requests).
"comment": Can access the content and its discussions.
"read": Can access the content, but cannot update it in any way.
sso boolean optional If true, invites the user as an SSO user of the organization. Defaults to false.
Copy POST /v1/orgs/{organizationId}/invites HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"emails": [
"text"
],
"role": "admin",
"sso": true
}
Join an organization with an invite
post
https://api.gitbook.com/v1 /orgs/ {organizationId} /invites/ {inviteId}
organizationId string required The unique id of the organization
inviteId string required The unique id of the invite
Copy POST /v1/orgs/{organizationId}/invites/{inviteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
List organization invites
get
https://api.gitbook.com/v1 /orgs/ {organizationId} /link-invites
organizationId string required The unique id of the organization
page string optional Identifier of the page results to fetch.
limit number · max: 1000 optional The number of results per page
Copy GET /v1/orgs/{organizationId}/link-invites HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Create an organization invite
post
https://api.gitbook.com/v1 /orgs/ {organizationId} /link-invites
organizationId string required The unique id of the organization
one of optional An invite link created in an organization
An invite link to an organization
An invite link to a specific space in an organization
An invite link to a specific collection in an organization
Copy POST /v1/orgs/{organizationId}/link-invites HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"role": "admin"
}
Get an organization by its ID
get
https://api.gitbook.com/v1 /orgs/ {organizationId} /link-invites/ {inviteId}
organizationId string required The unique id of the organization
inviteId string required The unique id of the invite
one of optional An invite link created in an organization
An invite link to an organization
An invite link to a specific space in an organization
An invite link to a specific collection in an organization
Copy GET /v1/orgs/{organizationId}/link-invites/{inviteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Deletes an organization invite.
delete
https://api.gitbook.com/v1 /orgs/ {organizationId} /link-invites/ {inviteId}
organizationId string required The unique id of the organization
inviteId string required The unique id of the invite
Copy DELETE /v1/orgs/{organizationId}/link-invites/{inviteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Update an organization invite
patch
https://api.gitbook.com/v1 /orgs/ {organizationId} /link-invites/ {inviteId}
organizationId string required The unique id of the organization
inviteId string required The unique id of the invite
one of optional
Update role of an organization invite
Update level of an organization content invite
one of optional An invite link created in an organization
An invite link to an organization
An invite link to a specific space in an organization
An invite link to a specific collection in an organization
Copy PATCH /v1/orgs/{organizationId}/link-invites/{inviteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"role": "admin"
}