Organization 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
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

The unique id of the organization

Body
roleone ofOptional

Default role to set on newly invited members.

string · enum | nullableOptional

"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.

Possible values:
ssobooleanOptional

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

Responses
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: 45

{
  "emails": [
    "text"
  ],
  "role": "admin",
  "sso": true
}
{
  "users": [
    "text"
  ],
  "invited": 1,
  "failedSSOEmails": [
    "text"
  ]
}

Join an organization with an invite

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

The unique id of the organization

inviteIdstringRequired

The unique id of the invite

Responses
post
/orgs/{organizationId}/invites/{inviteId}
POST /v1/orgs/{organizationId}/invites/{inviteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{}
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

The unique id of the organization

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
get
/orgs/{organizationId}/link-invites
GET /v1/orgs/{organizationId}/link-invites HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

List of invite links in the organization.

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "invite",
      "id": "text",
      "role": "admin",
      "redundant": true
    }
  ]
}

Create an organization invite

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

The unique id of the organization

Body
one ofOptional
or
or
Responses
post
/orgs/{organizationId}/link-invites
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"
}
201

The organization invite has been created

{
  "object": "invite",
  "id": "text",
  "role": "admin",
  "redundant": true
}
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

The unique id of the organization

inviteIdstringRequired

The unique id of the invite

Responses
get
/orgs/{organizationId}/link-invites/{inviteId}
GET /v1/orgs/{organizationId}/link-invites/{inviteId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Invite link in the organization.

{
  "object": "invite",
  "id": "text",
  "role": "admin",
  "redundant": true
}
patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

The unique id of the organization

inviteIdstringRequired

The unique id of the invite

Body
one ofOptional
or
Responses
patch
/orgs/{organizationId}/link-invites/{inviteId}
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"
}
200

The organization invite has been updated

{
  "object": "invite",
  "id": "text",
  "role": "admin",
  "redundant": true
}

Last updated

Was this helpful?