Spaces

A space in GitBook is the entity of a project you work in.

Get a space by its ID

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

The unique id of the space

Query parameters
shareKeystringOptional

For sites published via share-links, the share key is useful to resolve published URLs.

Responses
200

OK

application/json
get
/spaces/{spaceId}
200

OK

List all space users permissions

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

The unique id of the space

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber Β· max: 1000Optional

The number of results per page

rolestring Β· 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:
Responses
200

Listing of users who can access the space.

application/json
get
/spaces/{spaceId}/permissions/aggregate
200

Listing of users who can access the space.

Create a space

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

The unique id of the organization

Body
and
anyOptional
or
anyOptional
or
or
Responses
post
/orgs/{organizationId}/spaces
201

Space created

Duplicate a space

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

The unique id of the space

Responses
post
/spaces/{spaceId}/duplicate
201

Space duplicated

Update a space

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

The unique id of the space

Body
and
anyOptional
or
or
Responses
200

The space has been updated

application/json
patch
/spaces/{spaceId}
200

The space has been updated

Was this helpful?