Organizations

Get the list of organizations for the currently authenticated user

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
chevron-right
200

OK

application/json
get
/orgs

Create an organization

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
titlestring · min: 2 · max: 255Required

Name of the organization

emailDomainsstring[]Optional
typestring · enumOptionalPossible values:
useCasestring · enumOptionalPossible values:
Responses
post
/orgs

Get an organization by its ID

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}

Delete an organization by its ID

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

The unique id of the organization

Responses
delete
/orgs/{organizationId}

No content

Update an organization by its ID

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

The unique id of the organization

Body
titlestring · min: 2 · max: 255Optional

Name of the organization

emailDomainsstring[]Optional
hostnamestring · min: 3 · max: 32Optional

Default hostname for the organization's public content, e.g. .gitbook.io

defaultRoleone ofOptional

The role of a member in an organization, null for guests

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:
defaultContentone ofOptional
or
string · enum | nullableOptionalPossible values:
logoone ofOptional
string · uriOptional
or
string · enum | nullableOptionalPossible values:
ssobooleanOptional
aibooleanOptional
inviteLinksbooleanOptional
Responses
chevron-right
200

The organization has been updated

application/json
patch
/orgs/{organizationId}

List all content in an organization

get

Lists all spaces, collections, sites accessible by current user in the current organization. This endpoint is internal for now as the data structure is optimized for the sidebar.

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/content

List organization members

get

Lists members for the specified organization.

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

orderstring · enumOptional

An order for the items in the list

Default: descPossible values:
roleone ofOptional

The Role to filter the member list by

string · enumOptional

"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:
searchstringOptional

A query to filter the member list (displayName and email)

sortstring · enumOptional

The property to sort the results by. When sorting by lastSeenAt, only active members will be listed.

Default: joinedAtPossible values:
Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/members

Get specified organization member

get

Gets a specific member in an organization.

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

The unique id of the organization

userIdstringRequired

The unique ID of the User

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/members/{userId}

Delete a member from an organization

delete

Deletes a specific member from an organization

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

The unique id of the organization

userIdstringRequired

The unique ID of the User

Responses
delete
/orgs/{organizationId}/members/{userId}

No content

Update specified organization member

patch

Updates a specific member in an organization.

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

The unique id of the organization

userIdstringRequired

The unique ID of the User

Body
roleone ofOptional

The role of a member in an organization, null for guests

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:
Responses
chevron-right
200

The member has been updated

application/json
patch
/orgs/{organizationId}/members/{userId}

Update organization member's "last seen at" timestamp.

post

Update organization member's "last seen at" timestamp.

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

The unique id of the organization

Responses
chevron-right
200

Organization member has been updated. Optionally returns a JWT token to attach to the user.

application/json
post
/orgs/{organizationId}/ping

Set a user as an SSO member of an organization

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

The unique id of the organization

userIdstringRequired

The unique ID of the User

Responses
chevron-right
200

The user has been added as an SSO member of the organization.

application/json
post
/orgs/{organizationId}/members/{userId}/sso

List organization teams

get

Lists teams for the specified organization.

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

ownerstringOptional

The unique identifier of a member of the organization. Only teams they can manage will be returned.

titlestringOptional

If provided, only teams whose name contains the given parameter will be returned. Case insensitive.

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/teams

Create organization team

put

Creates a team in the specified organization.

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

The unique id of the organization

Body
titlestring · min: 1 · max: 64Required

Title of the team

membersstring[]Optional

A list of organization member identifiers

Responses
put
/orgs/{organizationId}/teams

Get specified organization team

get

Gets a specific team in an organization.

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

The unique id of the organization

teamIdstringRequired

The unique ID of the Team

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/teams/{teamId}

Delete a team in an organization

delete

Deletes a specific team in an organization

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

The unique id of the organization

teamIdstringRequired

The unique ID of the Team

Responses
delete
/orgs/{organizationId}/teams/{teamId}

No content

Update specified organization team

patch

Updates a specific team in an organization.

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

The unique id of the organization

teamIdstringRequired

The unique ID of the Team

Body
titlestring · min: 1 · max: 64Required

Title of the team

Responses
chevron-right
200

The team has been updated

application/json
patch
/orgs/{organizationId}/teams/{teamId}

List team members

get

Lists members, and their roles, for the specified organization team.

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

The unique id of the organization

teamIdstringRequired

The unique ID of the Team

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/teams/{teamId}/members

Updates members of an organization team

put

Updates members of an organization team, either adding or removing them. If a the same user is included as both an add and a remove, they will be removed from the team.

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

The unique id of the organization

teamIdstringRequired

The unique ID of the Team

Body
addstring[]Optional

A user to add. It can either be a user ID or an email.

removestring[]Optional

A user to remove. It can either be a user ID or an email.

Responses
put
/orgs/{organizationId}/teams/{teamId}/members

No content

Add or update a team membership

put

Add or updates member in the specified organization team.

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

The unique id of the organization

teamIdstringRequired

The unique ID of the Team

userIdstringRequired

The unique ID of the User

Body
rolestring · enumOptional

"The role of a team member. "owner": Can manage team members. "member": Is a member of the team.

Possible values:
Responses
put
/orgs/{organizationId}/teams/{teamId}/members/{userId}

No content

Delete members from a team

delete

Deletes member from the specified organization team.

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

The unique id of the organization

teamIdstringRequired

The unique ID of the Team

userIdstringRequired

The unique ID of the User

Responses
delete
/orgs/{organizationId}/teams/{teamId}/members/{userId}

No content

Invite users to a given organization based on a list of emails

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
chevron-right
200

OK

application/json
post
/orgs/{organizationId}/invites

Use an invite to join an organization.

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
chevron-right
200

OK

application/json
Responseobject
post
/orgs/{organizationId}/invites/{inviteId}
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

spacestringOptional

If specified, only return invite links that provide specific permissions on the given space.

collectionstringOptional

If specified, only return invite links that provide permissions on the given collection.

Responses
chevron-right
200

List of invite links to content in the organization.

application/json
get
/orgs/{organizationId}/content-link-invites
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
chevron-right
200

List of invite links in the organization.

application/json
get
/orgs/{organizationId}/link-invites

Create a new organization invite

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

The unique id of the organization

Body
or
or
Responses
post
/orgs/{organizationId}/link-invites
delete
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
delete
/orgs/{organizationId}/link-invites/{inviteId}

No content

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
or
Responses
chevron-right
200

The organization invite has been updated

application/json
Responseone of

An invite link created in an organization

or
or
patch
/orgs/{organizationId}/link-invites/{inviteId}

Upgrade an organization's billing plan

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

The unique id of the organization

Query parameters
successReturnURLstringOptional

The app screen URL to bring the user back to after a successful checkout.

cancelReturnURLstringOptional

The app screen URL to bring the user back to after a canceled checkout.

Body
productstring · enumRequired

Name of the product

Possible values:
intervalstring · enumRequired

Interval for a billing subscription

Possible values:
reasonstringOptional

Reason that triggered the billing upgrade

modestring · enumOptional

Mode to use for the upgrade (default value is commit): - auto: user is redirect to checkout if possible, other a preview of the auto-upgrade is returned. - commit: a checkout session is returned or an auto-upgrade is done - preview: a preview invoice is always returned

Possible values:
Responses
chevron-right
200

OK

application/json
Responseone of
or
or
or
or
post
/orgs/{organizationId}/billing

Preview a migration of an organization to new pricing.

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

The unique id of the organization

Query parameters
intervalstring · enumRequired

Interval for a billing subscription

Possible values:
productstring · enumRequired

The new product to upgrade to

Possible values:
Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/billing/migrate

Migrate an organization's legacy billing plan to new pricing

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

The unique id of the organization

Query parameters
intervalstring · enumRequired

Interval for a billing subscription

Possible values:
productstring · enumRequired

The new product to upgrade to

Possible values:
Responses
post
/orgs/{organizationId}/billing/migrate

No content

Lists all legacy sites of an org and computes their new type and contributing features

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
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/billing/migrate/sites

Get the billing portal for an organization

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/billing/portal

Generates a billing invoice preview for organizations without an active subscription

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

The unique id of the organization

Query parameters
intervalstring · enumRequired

Interval for a billing subscription

Possible values:
productstring · enumRequired

Name of the product

Possible values:
membersnumberOptional

The desired amount of members in the organization

premiumSitesnumberOptional

The desired amount of published premium sites

ultimateSitesnumberOptional

The desired amount of published ultimate sites

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/billing/preview

Send a request to ask the organization's admin to upgrade it.

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
Responseobject
post
/orgs/{organizationId}/request_upgrade
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

The unique id of the organization

Query parameters
querystring · max: 512Required
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/search

List organization spaces

get

Lists spaces for the specified organization.

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
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/spaces

List organization collections

get

Lists collections for the specified organization.

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

nestedbooleanOptional

If true, all nested collections will be listed

Default: true
Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/collections

Get the custom fields for spaces in an organization

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
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/custom-fields

Create a new custom field in an orgamization

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

The unique id of the organization

Body
namestring · min: 1 · max: 50RequiredPattern: ^[a-z_\-0-9]+$
typestring · enumRequiredPossible values:
titlestring · max: 100Optional
descriptionstring · max: 200Optional
placeholderstring · max: 100Optional
optionsstring[] · min: 1 · max: 50Optional
Responses
post
/orgs/{organizationId}/custom-fields

Get a custom field by its name

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

The unique id of the organization

fieldNamestringRequired

The name of the custom field

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/custom-fields/{fieldName}

Delete a custom field in an organization

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

The unique id of the organization

fieldNamestringRequired

The name of the custom field

Responses
delete
/orgs/{organizationId}/custom-fields/{fieldName}

No content

Update a custom field in an organization

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

The unique id of the organization

fieldNamestringRequired

The name of the custom field

Body
titlestring · max: 100Optional
descriptionstring · max: 200Optional
placeholderstring · max: 100Optional
optionsstring[] · min: 1 · max: 50Optional
Responses
chevron-right
200

OK

application/json
patch
/orgs/{organizationId}/custom-fields/{fieldName}

List organization SAML providers

get

Lists SAML providers configured for the specified organization.

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
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/saml

Create a new SAML provider in an orgamization

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

The unique id of the organization

Body
labelstring · min: 1 · max: 30Required
entityIDstring · max: 1024Optional
certificatestring · max: 10000Optional
ssoURLstring · uriOptional
defaultTeamstringOptional
defaultRoleone ofOptional

The role of a member in an organization, null for guests

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:
Responses
post
/orgs/{organizationId}/saml

Get a SAML provider in an organization by its ID

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

The unique id of the organization

samlProviderIdstringRequired

The unique id of the SAML provider

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/saml/{samlProviderId}

Delete a SAML provider in an organization

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

The unique id of the organization

samlProviderIdstringRequired

The unique id of the SAML provider

Responses
delete
/orgs/{organizationId}/saml/{samlProviderId}

No content

Update a SAML provider in an organization

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

The unique id of the organization

samlProviderIdstringRequired

The unique id of the SAML provider

Body
labelstring · min: 1 · max: 30Optional
entityIDstring · max: 1024Optional
certificatestring · max: 10000Optional
ssoURLstring · uriOptional
defaultTeamstringOptional
defaultRoleone ofOptional

The role of a member in an organization, null for guests

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:
Responses
chevron-right
200

SAML provider has been updated

application/json
patch
/orgs/{organizationId}/saml/{samlProviderId}

List organization SSO provider login information

get

Lists SSO login information configured for the specified organization.

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/sso

Get all usage metrics for an organization

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/usage

Get collections usage metrics for an organization

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/usage/collections

Get spaces usage metrics for an organization

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/usage/spaces

Get sites usage metrics for an organization

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/usage/sites

Get teams usage metrics for an organization

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/usage/teams

Get members usage metrics for an organization

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/usage/members

Get team members usage metrics for an organization

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

The unique id of the organization

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/usage/team-members
Deprecated

List captures. Deprecated, use listSnippets instead.

get

List captures in an organization, newest first.

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

The unique id of the organization

Query parameters
formatstring · enumOptional

Output format for the content.

Possible values:
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

contextstring · enumOptional

The context in which the item was captured

Possible values:
Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/captures

Start a capture

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

The unique id of the organization

Body
titlestring · max: 100Optional

Optional title describing the capture

contextone ofRequired
string · enumOptionalPossible values:
externalIdstringOptional

ID in the original source of the capture.

externalURLstring · uriOptional

URL of the original source of the capture.

Responses
post
/orgs/{organizationId}/captures
Deprecated

Get a capture by its ID. Deprecated, use getSnippet instead.

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

The unique id of the organization

captureIdstringRequired

The unique id of a capture

Query parameters
formatstring · enumOptional

Output format for the content.

Possible values:
Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/captures/{captureId}

Add events to a running capture

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

The unique id of the organization

captureIdstringRequired

The unique id of a capture

Body
Responses
post
/orgs/{organizationId}/captures/{captureId}/events

No content

Stop a capture

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

The unique id of the organization

captureIdstringRequired

The unique id of a capture

Query parameters
formatstring · enumOptional

Output format for the content.

Possible values:
Body
objectOptional
Responses
chevron-right
200

Capture stopped

application/json
post
/orgs/{organizationId}/captures/{captureId}/stop

Lists snippets.

get

List snippets in an organization, newest first.

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

sourcestringOptional

If specified, only snippets from the specified source will be returned.

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/snippets

Create a new snippet

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

The unique id of the organization

Body
objectOptional
Responses
post
/orgs/{organizationId}/snippets

Get a snippet by its ID

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

The unique id of the organization

snippetIdstringRequired

The unique id of a snippet

Responses
chevron-right
200

OK

application/json
get
/orgs/{organizationId}/snippets/{snippetId}

Update an existing snippet.

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

The unique id of the organization

snippetIdstringRequired

The unique id of a snippet

Header parameters
If-Unmodified-Sincestring · date-timeOptional

If provided, the operation will be rejected if the underlying resource has been modified since the date provided in the header.

Body
titlestringOptional

A new title for the snippet.

Responses
chevron-right
200

OK

application/json
put
/orgs/{organizationId}/snippets/{snippetId}

Delete a snippet by its ID.

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

The unique id of the organization

snippetIdstringRequired

The unique id of a snippet

Responses
chevron-right
200

OK

No content

delete
/orgs/{organizationId}/snippets/{snippetId}

No content

Return possible snippet locations in an organization based on the current user.

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

The unique id of the organization

snippetIdstringRequired

The unique id of a snippet

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

spaceIdstringOptional

If specified, only locations in the given space will be returned. If not specified, GitBook will suggest spaces.

pageIdstringOptional

If specified, only locations under the given pageId will be returned. You must specify a spaceId too. If pageId is not specified, GitBook will suggest pages at the top level.

searchstringOptional

If specified, only locations matching the search query will be returned.

Responses
chevron-right
200

A paginated list of suggested snippet locations.

application/json
get
/orgs/{organizationId}/snippets/{snippetId}/move

Move a snippet into a destination. The snippet will be archived in the process.

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

The unique id of the organization

snippetIdstringRequired

The unique id of a snippet

Body
Responses
chevron-right
200

The snippet was successfully moved.

application/json
post
/orgs/{organizationId}/snippets/{snippetId}/move

Last updated

Was this helpful?