Space users
Manage user roles and permissions on a per-space basis.
Was this helpful?
Manage user roles and permissions on a per-space basis.
Was this helpful?
Was this helpful?
Give your collaborators the right level of access for specific spaces. This endpoint makes it simple to add, remove, or update space members individually.
The unique id of the space
Role to set.
"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.
OK
No team or user with the provided Id
No content
The unique id of the space
Identifier of the page results to fetch.
The number of results per page
Listing of users who have been added to a space.
No space was found with the given Id
The unique id of the space
The unique ID of the User
The role of a member in an organization, null for guests
"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.
User permission was updated
No user found with the given ID
The unique id of the space
Identifier of the page results to fetch.
The number of results per page
"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.
Listing of users who can access the space.
Listing of users who can access the space.
No content
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"permission": "admin",
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
]
}
POST /v1/spaces/{spaceId}/permissions HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 33
{
"role": "admin",
"teams": [
"text"
]
}
GET /v1/spaces/{spaceId}/permissions/users HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"permission": "admin",
"user": {
"object": "user",
"id": "text",
"displayName": "text",
"email": "text",
"photoURL": "text",
"urls": {
"location": "https://example.com"
}
}
}
]
}
DELETE /v1/spaces/{spaceId}/permissions/users/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
PATCH /v1/spaces/{spaceId}/permissions/users/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"role": "admin"
}
GET /v1/spaces/{spaceId}/permissions/aggregate HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*