> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/developers/integrations/development/client-library/gitbook-methods.md).

# GitBook methods

#### Search

The following methods can be found on the `client.search` object.

| Method            |
| ----------------- |
| `searchContent()` |
| `askQuery()`      |

#### User

The following methods can be found on the `client.user` object.

<table><thead><tr><th width="770.3333333333333">Method</th></tr></thead><tbody><tr><td><code>getAuthenticatedUser()</code></td></tr><tr><td><code>listSpacesForAuthenticatedUser()</code></td></tr></tbody></table>

#### Users

The following methods can be found on the `client.users` object.

| Method          |
| --------------- |
| `getUserById()` |

#### Spaces

The following methods can be found on the `client.spaces` object.

<table><thead><tr><th width="750.3333333333333">Method</th></tr></thead><tbody><tr><td><code>getSpaceById()</code></td></tr><tr><td><code>searchSpaceContent()</code></td></tr><tr><td><code>askQueryInSpace()</code></td></tr><tr><td><code>importGitRepository()</code></td></tr><tr><td><code>exportToGitRepository()</code></td></tr><tr><td><code>getContentAnalyticsForSpaceById()</code></td></tr><tr><td><code>getSearchAnalyticsForSpaceById()</code></td></tr><tr><td><code>getTrafficAnalyticsForSpaceById()</code></td></tr><tr><td><code>trackViewInSpaceById()</code></td></tr><tr><td><code>getCurrentRevision()</code></td></tr><tr><td><code>importContent()</code></td></tr><tr><td><code>listFiles()</code></td></tr><tr><td><code>getPageById()</code></td></tr><tr><td><code>importContentInPageById()</code></td></tr><tr><td><code>getPageByPath()</code></td></tr><tr><td><code>createChangeRequest()</code></td></tr><tr><td><code>mergeChangeRequest()</code></td></tr><tr><td><code>updateChangeRequest()</code></td></tr><tr><td><code>getRevisionOfChangeRequestById()</code></td></tr><tr><td><code>importContentInChangeRequest()</code></td></tr><tr><td><code>listFilesInChangeRequestById()</code></td></tr><tr><td><code>getPageInChangeRequestById()</code></td></tr><tr><td><code>importContentInChangeRequestPageById()</code></td></tr><tr><td><code>getPageInChangeRequestByPath()</code></td></tr><tr><td><code>getRevisionById()</code></td></tr><tr><td><code>listFilesInRevisionById()</code></td></tr><tr><td><code>getPageInRevisionById()</code></td></tr><tr><td><code>getPageInRevisionByPath()</code></td></tr><tr><td><code>listPermissionsAggregateInSpace()</code></td></tr></tbody></table>

#### Collections

The following methods can be found on the `client.collections` object.

| Method                                   |
| ---------------------------------------- |
| `getCollectionById()`                    |
| `listSpacesInCollectionById()`           |
| `listPermissionsAggregateInCollection()` |

#### Integrations

The following methods can be found on the `client.integrations` object.

<table><thead><tr><th width="749.3333333333333">Method</th></tr></thead><tbody><tr><td><code>listIntegrations()</code></td></tr><tr><td><code>getIntegrationByName()</code></td></tr><tr><td><code>publishIntegration()</code></td></tr><tr><td><code>unpublishIntegration()</code></td></tr><tr><td><code>listIntegrationInstallations()</code></td></tr><tr><td><code>listIntegrationSpaceInstallations()</code></td></tr><tr><td><code>renderIntegrationUiWithGet()</code></td></tr><tr><td><code>renderIntegrationUiWithPost()</code></td></tr><tr><td><code>updateIntegrationInstallation()</code></td></tr><tr><td><code>createIntegrationInstallationToken()</code></td></tr><tr><td><code>updateIntegrationSpaceInstallation()</code></td></tr></tbody></table>

#### Orgs

The following methods can be found on the `client.orgs` object.

<table><thead><tr><th width="744.3333333333333">Method</th></tr></thead><tbody><tr><td><code>listOrganizationsForAuthenticatedUser()</code></td></tr><tr><td><code>listMembersInOrganizationById()</code></td></tr><tr><td><code>getMemberInOrganizationById()</code></td></tr><tr><td><code>updateMemberInOrganizationById()</code></td></tr><tr><td><code>removeMemberFromOrganizationById()</code></td></tr><tr><td><code>setUserAsSsoMemberForOrganization()</code></td></tr><tr><td><code>listSpacesForOrganizationMember()</code></td></tr><tr><td><code>listTeamsInOrganizationById()</code></td></tr><tr><td><code>createOrganizationTeam()</code></td></tr><tr><td><code>getTeamInOrganizationById()</code></td></tr><tr><td><code>updateTeamInOrganizationById()</code></td></tr><tr><td><code>removeTeamFromOrganizationById()</code></td></tr><tr><td><code>updateMembersInOrganizationTeam()</code></td></tr><tr><td><code>listTeamMembersInOrganizationById()</code></td></tr><tr><td><code>addMemberToOrganizationTeamById()</code></td></tr><tr><td><code>deleteMemberFromOrganizationTeamById()</code></td></tr><tr><td><code>inviteUsersToOrganization()</code></td></tr><tr><td><code>joinOrganizationWithInvite()</code></td></tr><tr><td><code>upgradeOrganizationPlan()</code></td></tr><tr><td><code>getOrganizationBillingPortal()</code></td></tr><tr><td><code>requestOrganizationUpgrade()</code></td></tr><tr><td><code>transferOrganization()</code></td></tr><tr><td><code>searchOrganizationContent()</code></td></tr><tr><td><code>listSpacesInOrganizationById()</code></td></tr><tr><td><code>listCollectionsInOrganizationById()</code></td></tr><tr><td><code>setupDirectorySync()</code></td></tr><tr><td><code>listDirectorySyncGroups()</code></td></tr><tr><td><code>syncDirectorySyncGroupsToTeams()</code></td></tr></tbody></table>

#### Urls

The following methods can be found on the `client.urls` object.

| Method              |
| ------------------- |
| `getContentByUrl()` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/developers/integrations/development/client-library/gitbook-methods.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
