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
Path parameters
organizationIdstringrequired

The unique id of the organization

Body
emailsone of[]required

roleone ofoptional

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.

ssobooleanoptional

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

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/invites' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "emails": [
      "text"
    ],
    "role": "admin",
    "sso": true
  }'
{
  "users": [
    "text"
  ],
  "invited": 1,
  "failedSSOEmails": [
    "text"
  ]
}

Join an organization with an invite

post
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

inviteIdstringrequired

The unique id of the invite

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/invites/{inviteId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{}
get
Authorizations
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
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/link-invites' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "invite",
      "id": "text",
      "role": "admin"
    }
  ]
}
post
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

Body
one ofoptional

Responses
curl -L \
  --request POST \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/link-invites' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "role": "admin"
  }'
{
  "object": "invite",
  "id": "text",
  "role": "admin"
}
get
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

inviteIdstringrequired

The unique id of the invite

Responses
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/link-invites/{inviteId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "object": "invite",
  "id": "text",
  "role": "admin"
}
delete
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

inviteIdstringrequired

The unique id of the invite

Responses
curl -L \
  --request DELETE \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/link-invites/{inviteId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'

No Content

patch
Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

inviteIdstringrequired

The unique id of the invite

Body
one ofoptional

Update role of an organization invite

Update level of an organization content invite

Responses
curl -L \
  --request PATCH \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/link-invites/{inviteId}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "role": "admin"
  }'
{
  "object": "invite",
  "id": "text",
  "role": "admin"
}

Was this helpful?