# Source: https://gitbook.com/docs/developers/gitbook-api/api-reference/organizations/organization-members.md

# Organization members

Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.

## GET /orgs/{organizationId}/members

> List all organization members

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organization-members","description":"Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}},"listOrder":{"name":"order","in":"query","description":"An order for the items in the list","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}},"schemas":{"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"OrganizationMember":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"member\"","enum":["member"]},"id":{"type":"string","description":"Unique identifier for the user."},"role":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"user":{"$ref":"#/components/schemas/User"},"disabled":{"type":"boolean","description":"Whatever the membership of this user is disabled and prevent them from accessing content."},"joinedAt":{"description":"Date at which the user joined the organization.","$ref":"#/components/schemas/Timestamp"},"lastSeenAt":{"description":"Date at which the user was last seen active in the organization.","$ref":"#/components/schemas/Timestamp"},"sso":{"type":"boolean","description":"Whether the user can login with SSO."},"spaces":{"type":"number"},"teams":{"type":"number"}},"required":["object","id","role","user","disabled","joinedAt","sso","spaces","teams"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"string","nullable":true,"enum":[null]}]},"User":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"user\"","enum":["user"]},"id":{"type":"string","description":"Unique identifier for the user"},"displayName":{"type":"string","description":"Full name for the user"},"email":{"type":"string","description":"Email address of the user"},"photoURL":{"type":"string","description":"URL of the user's profile picture"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the user in the API","format":"uri"}},"required":["location"]}},"required":["object","id","displayName","urls"]},"Timestamp":{"type":"string","format":"date-time"}}},"paths":{"/orgs/{organizationId}/members":{"get":{"operationId":"listMembersInOrganizationById","summary":"List all organization members","tags":["organization-members"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"$ref":"#/components/parameters/listOrder"},{"name":"role","description":"The Role to filter the member list by","in":"query","schema":{"oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"string","enum":["guest"]}]}},{"name":"search","in":"query","description":"A query to filter the member list (displayName and email)","schema":{"type":"string"}},{"name":"sort","in":"query","description":"The property to sort the results by. When sorting by lastSeenAt, only active members will be listed.","schema":{"type":"string","default":"joinedAt","enum":["joinedAt","lastSeenAt"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMember"}}}}]}}}}}}}}}
```

## GET /orgs/{organizationId}/members/{userId}

> Get an organization member by its ID

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organization-members","description":"Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}},"userId":{"name":"userId","in":"path","required":true,"description":"The unique ID of the User","schema":{"type":"string"}}},"schemas":{"OrganizationMember":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"member\"","enum":["member"]},"id":{"type":"string","description":"Unique identifier for the user."},"role":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"user":{"$ref":"#/components/schemas/User"},"disabled":{"type":"boolean","description":"Whatever the membership of this user is disabled and prevent them from accessing content."},"joinedAt":{"description":"Date at which the user joined the organization.","$ref":"#/components/schemas/Timestamp"},"lastSeenAt":{"description":"Date at which the user was last seen active in the organization.","$ref":"#/components/schemas/Timestamp"},"sso":{"type":"boolean","description":"Whether the user can login with SSO."},"spaces":{"type":"number"},"teams":{"type":"number"}},"required":["object","id","role","user","disabled","joinedAt","sso","spaces","teams"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"string","nullable":true,"enum":[null]}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"User":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"user\"","enum":["user"]},"id":{"type":"string","description":"Unique identifier for the user"},"displayName":{"type":"string","description":"Full name for the user"},"email":{"type":"string","description":"Email address of the user"},"photoURL":{"type":"string","description":"URL of the user's profile picture"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the user in the API","format":"uri"}},"required":["location"]}},"required":["object","id","displayName","urls"]},"Timestamp":{"type":"string","format":"date-time"}}},"paths":{"/orgs/{organizationId}/members/{userId}":{"get":{"operationId":"getMemberInOrganizationById","summary":"Get an organization member by its ID","tags":["organization-members","critical"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMember"}}}}}}}}}
```

## DELETE /orgs/{organizationId}/members/{userId}

> Delete an organization member

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organization-members","description":"Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}},"userId":{"name":"userId","in":"path","required":true,"description":"The unique ID of the User","schema":{"type":"string"}}}},"paths":{"/orgs/{organizationId}/members/{userId}":{"delete":{"operationId":"removeMemberFromOrganizationById","summary":"Delete an organization member","tags":["organization-members"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/userId"}],"responses":{"204":{"description":"Member did not exist in the organization."},"205":{"description":"The member was deleted from the organization."}}}}}}
```

## PATCH /orgs/{organizationId}/members/{userId}

> Update an organization member

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organization-members","description":"Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}},"userId":{"name":"userId","in":"path","required":true,"description":"The unique ID of the User","schema":{"type":"string"}}},"schemas":{"OrganizationMember":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"member\"","enum":["member"]},"id":{"type":"string","description":"Unique identifier for the user."},"role":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"user":{"$ref":"#/components/schemas/User"},"disabled":{"type":"boolean","description":"Whatever the membership of this user is disabled and prevent them from accessing content."},"joinedAt":{"description":"Date at which the user joined the organization.","$ref":"#/components/schemas/Timestamp"},"lastSeenAt":{"description":"Date at which the user was last seen active in the organization.","$ref":"#/components/schemas/Timestamp"},"sso":{"type":"boolean","description":"Whether the user can login with SSO."},"spaces":{"type":"number"},"teams":{"type":"number"}},"required":["object","id","role","user","disabled","joinedAt","sso","spaces","teams"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"string","nullable":true,"enum":[null]}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"User":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"user\"","enum":["user"]},"id":{"type":"string","description":"Unique identifier for the user"},"displayName":{"type":"string","description":"Full name for the user"},"email":{"type":"string","description":"Email address of the user"},"photoURL":{"type":"string","description":"URL of the user's profile picture"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the user in the API","format":"uri"}},"required":["location"]}},"required":["object","id","displayName","urls"]},"Timestamp":{"type":"string","format":"date-time"}}},"paths":{"/orgs/{organizationId}/members/{userId}":{"patch":{"operationId":"updateMemberInOrganizationById","summary":"Update an organization member","tags":["organization-members"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"The member has been updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMember"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/MemberRoleOrGuest"}}}}}}}}}}
```

## POST /orgs/{organizationId}/ping

> Update an organization member last seen at

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organization-members","description":"Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}}}},"paths":{"/orgs/{organizationId}/ping":{"post":{"operationId":"updateOrganizationMemberLastSeenAt","summary":"Update an organization member last seen at","tags":["organization-members"],"parameters":[{"$ref":"#/components/parameters/organizationId"}],"responses":{"200":{"description":"Organization member has been updated. Optionally returns a JWT token to attach to the user.","content":{"application/json":{"schema":{"type":"object","properties":{"gitbookVisitorClaims":{"description":"A JTW token containing the claims to attach to this user.","type":"string"}}}}}}}}}}}
```

## POST /orgs/{organizationId}/members/{userId}/sso

> Set a user as an SSO member of an organization

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organization-members","description":"Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}},"userId":{"name":"userId","in":"path","required":true,"description":"The unique ID of the User","schema":{"type":"string"}}},"schemas":{"OrganizationMember":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"member\"","enum":["member"]},"id":{"type":"string","description":"Unique identifier for the user."},"role":{"$ref":"#/components/schemas/MemberRoleOrGuest"},"user":{"$ref":"#/components/schemas/User"},"disabled":{"type":"boolean","description":"Whatever the membership of this user is disabled and prevent them from accessing content."},"joinedAt":{"description":"Date at which the user joined the organization.","$ref":"#/components/schemas/Timestamp"},"lastSeenAt":{"description":"Date at which the user was last seen active in the organization.","$ref":"#/components/schemas/Timestamp"},"sso":{"type":"boolean","description":"Whether the user can login with SSO."},"spaces":{"type":"number"},"teams":{"type":"number"}},"required":["object","id","role","user","disabled","joinedAt","sso","spaces","teams"]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"string","nullable":true,"enum":[null]}]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"User":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"user\"","enum":["user"]},"id":{"type":"string","description":"Unique identifier for the user"},"displayName":{"type":"string","description":"Full name for the user"},"email":{"type":"string","description":"Email address of the user"},"photoURL":{"type":"string","description":"URL of the user's profile picture"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the user in the API","format":"uri"}},"required":["location"]}},"required":["object","id","displayName","urls"]},"Timestamp":{"type":"string","format":"date-time"}}},"paths":{"/orgs/{organizationId}/members/{userId}/sso":{"post":{"operationId":"setUserAsSSOMemberForOrganization","summary":"Set a user as an SSO member of an organization","tags":["organization-members"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"The user has been added as an SSO member of the organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMember"}}}}}}}}}
```

## GET /orgs/{organizationId}/members/{userId}/spaces

> List an organization member space permissions

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organization-members","description":"Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}},"userId":{"name":"userId","in":"path","required":true,"description":"The unique ID of the User","schema":{"type":"string"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}},"listOrder":{"name":"order","in":"query","description":"An order for the items in the list","schema":{"type":"string","default":"desc","enum":["asc","desc"]}}},"schemas":{"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"MemberContentPermission":{"type":"object","description":"Permission of a member in a content.","properties":{"permission":{"$ref":"#/components/schemas/MemberRole"},"space":{"$ref":"#/components/schemas/Space"}},"required":["permission","space"]},"MemberRole":{"type":"string","description":"\"The role of a member in an organization.\n\"admin\": Can administrate the content: create, delete spaces, ...\n\"create\": Can create content.\n\"review\": Can review content.\n\"edit\": Can edit the content (live or change requests).\n\"comment\": Can access the content and its discussions.\n\"read\": Can access the content, but cannot update it in any way.\n","enum":["admin","create","edit","review","comment","read"]},"Space":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"space\"","enum":["space"]},"id":{"type":"string","description":"Unique identifier for the space"},"title":{"$ref":"#/components/schemas/SpaceTitle"},"emoji":{"description":"An emoji for this space. It'll match the emoji shown in the GitBook app.","$ref":"#/components/schemas/Emoji"},"visibility":{"$ref":"#/components/schemas/ContentVisibility"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"deletedAt":{"$ref":"#/components/schemas/Timestamp"},"editMode":{"$ref":"#/components/schemas/SpaceEditMode"},"mergeRules":{"$ref":"#/components/schemas/MergeRulesSpaceConfiguration"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the space in the API","format":"uri"},"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"published":{"type":"string","description":"URL of the published version of the space. Only defined when visibility is not \"private.\"","format":"uri"},"public":{"type":"string","description":"URL of the public version of the space. Only defined when visibility is \"public\".","format":"uri"},"icon":{"description":"URL of the icon of this space, if defined.","$ref":"#/components/schemas/URL"}},"required":["app","location"]},"organization":{"type":"string","description":"ID of the organization owning this space"},"parent":{"type":"string","description":"ID of the parent collection."},"language":{"$ref":"#/components/schemas/TranslationLanguage"},"gitSync":{"$ref":"#/components/schemas/GitSyncState"},"visitorAuth":{"$ref":"#/components/schemas/VisitorAuth"},"revision":{"type":"string","description":"ID of the active revision in the space."},"defaultLevel":{"$ref":"#/components/schemas/DefaultLevel"},"comments":{"type":"number","description":"Count of opened comments on the space."},"changeRequests":{"type":"number","description":"Total count of change requests on the space."},"changeRequestsOpen":{"type":"number","description":"Count of open change requests on the space."},"changeRequestsDraft":{"type":"number","description":"Count of draft change requests on the space."},"internal_poweredByV2":{"type":"boolean","description":"Whether the space is powered by V2 of the content system."},"permissions":{"type":"object","description":"The set of permissions for the space","properties":{"view":{"type":"boolean","description":"Can the user view the space content."},"access":{"type":"boolean","description":"Can the user access the space in the application."},"admin":{"type":"boolean","description":"Can the user edit the title, install integrations, and manage the space."},"viewInviteLinks":{"type":"boolean","description":"Can the user view the invite links of the space."},"edit":{"type":"boolean","description":"Can the user edit the content of the space by creating a change request."},"triggerGitSync":{"type":"boolean","description":"Can the user trigger a git sync."},"comment":{"type":"boolean","description":"Can the user comment on the content."},"merge":{"type":"boolean","description":"Can the user merge change requests."},"review":{"type":"boolean","description":"Can the user review change requests."},"installIntegration":{"type":"boolean","description":"Can the user install integrations in the space."}},"required":["view","access","admin","viewInviteLinks","edit","triggerGitSync","comment","merge","review","installIntegration"]}},"required":["object","id","title","emoji","organization","visibility","revision","createdAt","updatedAt","comments","changeRequests","changeRequestsOpen","changeRequestsDraft","mergeRules","urls","defaultLevel","permissions"]},"SpaceTitle":{"type":"string","description":"Title of the space","maxLength":50},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"ContentVisibility":{"type":"string","description":"* `public`: Anyone can access the content, and the content is indexed by search engines.\n* `unlisted`: Anyone can access the content, and the content is not indexed by search engines\n* `share-link`: Anyone with a secret token in the url can access the content.\n* `visitor-auth`: Anyone authenticated through a JWT token can access the content.\n* `in-collection`: Anyone who can access the parent collection can access the content.\n  Only available for spaces in a collection.\n* `private`: Authorized members can access the content.\n","enum":["public","unlisted","share-link","visitor-auth","in-collection","private"]},"Timestamp":{"type":"string","format":"date-time"},"SpaceEditMode":{"type":"string","description":"Determines how a Space can be edited.\n* `live`: Users can directly edit the space\n* `locked`: All edits are locked for this space.\n","enum":["live","locked"]},"MergeRulesSpaceConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationInherit"},{"$ref":"#/components/schemas/MergeRulesStandaloneConfiguration"}]},"MergeRulesConfigurationInherit":{"type":"object","description":"The merge rules inherits from the organization configuration.","properties":{"type":{"type":"string","enum":["inherit"]}},"required":["type"]},"MergeRulesStandaloneConfiguration":{"oneOf":[{"$ref":"#/components/schemas/MergeRulesConfigurationRules"},{"$ref":"#/components/schemas/MergeRulesConfigurationNone"}]},"MergeRulesConfigurationRules":{"type":"object","description":"The merge rules are composed of individual rules that must all pass.","properties":{"type":{"type":"string","enum":["rules"]},"rules":{"type":"array","items":{"$ref":"#/components/schemas/MergeRule"}}},"required":["type","rules"]},"MergeRule":{"oneOf":[{"type":"object","properties":{"rule":{"type":"string","enum":["require_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_one_of_specific_reviewers"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["allow_bypass"]},"users":{"type":"array","description":"List of user IDs.","items":{"type":"string"}}},"required":["rule","users"]},{"type":"object","properties":{"rule":{"type":"string","enum":["require_at_least_one_review","require_at_least_one_approved_review","require_all_reviews_approved","require_agent_review","require_up_to_date_change_request","require_change_request_subject","require_change_request_description","require_author_to_merge"]}},"required":["rule"]},{"type":"object","description":"The merge rule is written in the advanced custom expression syntax.","properties":{"rule":{"type":"string","enum":["custom"]},"expression":{"$ref":"#/components/schemas/Expression"}},"required":["rule","expression"]}]},"Expression":{"type":"string","description":"Expression to evaluate","minLength":0,"maxLength":1024},"MergeRulesConfigurationNone":{"type":"object","description":"The merge rules are disabled, change requests can be merged without review.","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},"URL":{"type":"string","format":"uri","maxLength":2048},"TranslationLanguage":{"type":"string","enum":["en","fr","de","es","it","pt","pt-br","ru","ja","zh","yue","ko","ar","hi","nl","pl","tr","sv","no","da","fi","el","cs","hu","ro","th","vi","id","ms","he","uk","sk","bg","hr","lt","lv","et","sl"]},"GitSyncState":{"type":"object","properties":{"repoName":{"type":"string","description":"Repository name."},"installationProvider":{"$ref":"#/components/schemas/GitSyncProvider"},"integration":{"type":"string","description":"The integration name providing the Git Sync."},"url":{"type":"string","description":"The URL to the repository tree, used when rendering public content."},"updatedAt":{"description":"When the Git provider details were last updated","$ref":"#/components/schemas/Timestamp"}}},"GitSyncProvider":{"type":"string","description":"The provider of the Git Sync installation.","enum":["github","gitlab","github-legacy"]},"VisitorAuth":{"oneOf":[{"$ref":"#/components/schemas/VisitorAuthCustomBackend"},{"allOf":[{"$ref":"#/components/schemas/VisitorAuthIntegrationBackend"},{"type":"object","properties":{"integration":{"type":"string","description":"Name of integration being used as the backend for authenticated access"}},"required":["integration"]}]}]},"VisitorAuthCustomBackend":{"type":"object","title":"Custom backend for authenticated access","properties":{"backend":{"type":"string","description":"Custom backend for authenticated access","enum":["custom"]}},"required":["backend"]},"VisitorAuthIntegrationBackend":{"type":"object","title":"Integration backend for authenticated access","properties":{"backend":{"type":"string","description":"Integration as backend for authenticated access","enum":["integration"]}},"required":["backend"]},"DefaultLevel":{"description":"Default level for a piece of content","oneOf":[{"$ref":"#/components/schemas/MemberRoleOrGuest"},{"type":"string","enum":["inherit"]}]},"MemberRoleOrGuest":{"description":"The role of a member in an organization, null for guests","oneOf":[{"$ref":"#/components/schemas/MemberRole"},{"type":"string","nullable":true,"enum":[null]}]}}},"paths":{"/orgs/{organizationId}/members/{userId}/spaces":{"get":{"operationId":"listSpacesForOrganizationMember","summary":"List an organization member space permissions","tags":["organization-members"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"$ref":"#/components/parameters/listOrder"}],"responses":{"200":{"description":"Listing of spaces that can be accessed by the user in the organization.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MemberContentPermission"}}}}]}}}}}}}}}
```

## GET /orgs/{organizationId}/members/{userId}/teams

> List all organization member teams

```json
{"openapi":"3.0.3","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"organization-members","description":"Organization members can be managed through this API, which lets you invite and manage users under a particular organization. You can define roles and permissions to ensure your team has the right level of access.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"}},"parameters":{"organizationId":{"name":"organizationId","in":"path","required":true,"description":"The unique id of the organization","schema":{"type":"string"}},"userId":{"name":"userId","in":"path","required":true,"description":"The unique ID of the User","schema":{"type":"string"}},"listPage":{"name":"page","in":"query","description":"Identifier of the page results to fetch.","schema":{"type":"string"}},"listLimit":{"name":"limit","in":"query","description":"The number of results per page","schema":{"type":"number","minimum":0,"maximum":1000}}},"schemas":{"List":{"type":"object","properties":{"next":{"type":"object","properties":{"page":{"type":"string","description":"Unique identifier to query the next results page"}},"required":["page"]},"count":{"type":"number","description":"Total count of objects in the list"}}},"OrganizationTeam":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"team\"","enum":["team"]},"id":{"type":"string","description":"Unique identifier for the team."},"title":{"$ref":"#/components/schemas/OrganizationTeamTitle"},"members":{"type":"integer","description":"Count of members in this team."},"spaces":{"type":"number","description":"Count of spaces this team has access to."},"createdAt":{"description":"Date at which the team was created.","$ref":"#/components/schemas/Timestamp"},"permissions":{"type":"object","description":"The set of permissions for the team","properties":{"admin":{"type":"boolean","description":"Can the user manage the team"},"view":{"type":"boolean","description":"Can the user view the team and list its members"}},"required":["admin","view"]}},"required":["object","id","title","members","spaces","createdAt","permissions"]},"OrganizationTeamTitle":{"type":"string","description":"Title of the team","minLength":1,"maxLength":64},"Timestamp":{"type":"string","format":"date-time"},"TeamMember":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/TeamMemberRole"}},"required":["role"]},"TeamMemberRole":{"type":"string","description":"\"The role of a team member.\n\"owner\": Can manage team members.\n\"member\": Is a member of the team.\n","enum":["owner","member"]}}},"paths":{"/orgs/{organizationId}/members/{userId}/teams":{"get":{"operationId":"listTeamsForOrganizationMember","summary":"List all organization member teams","tags":["organization-members"],"parameters":[{"$ref":"#/components/parameters/organizationId"},{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/listPage"},{"$ref":"#/components/parameters/listLimit"},{"in":"query","name":"title","description":"If provided, only teams whose name contains the given parameter will be returned. Case insensitive.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","required":["team","member"],"properties":{"team":{"$ref":"#/components/schemas/OrganizationTeam"},"member":{"$ref":"#/components/schemas/TeamMember"}}}}}}]}}}}}}}}}
```