Links

Spaces

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

GET spaces for current user

get
https://api.gitbook.com/v1
/user/spaces
List spaces for the authenticated user

Lists spaces that the authenticated user explicitly own.

Parameters
Query
page
string
Identifier of the page results to fetch.
limit
number
The number of results per page
Responses
200: OK
OK
default
Unexpected Error

GET a specific space

get
https://api.gitbook.com/v1
/spaces/{spaceId}
Get the details about a space.
Parameters
Path
spaceId*
string
The unique id of the space
Responses
200: OK
OK
default
Unexpected Error

POST a new space in an organization

post
https://api.gitbook.com/v1
/orgs/{organizationId}/spaces
Create an organization space
Parameters
Path
organizationId*
string
The unique id of the organization
Body
Example
Schema
{
"title": "string",
"emoji": "🎉",
"private": true,
"parent": "string"
}
Responses
201: Created
Space created
default
Unexpected Error

POST a duplicate of a space

post
https://api.gitbook.com/v1
/spaces/{spaceId}/duplicate
Create a duplicate of the space.
Parameters
Path
spaceId*
string
The unique id of the space
Responses
201: Created
Space duplicated
default
Unexpected Error

UPDATE a specific space

patch
https://api.gitbook.com/v1
/spaces/{spaceId}
Update the details of a space
Parameters
Path
spaceId*
string
The unique id of the space
Body
Example
Schema
{
"visibility": "public"
}
Responses
200: OK
The space has been updated
default
Unexpected Error