{"openapi":"3.1.0","info":{"title":"GitBook (BYOK) API","version":"0.1.0","description":"GitBook (BYOK) lets an AI assistant read your own GitBook data through the GitBook API with a key you supply (GitBook personal access token). Read-only: 11 tools (get_current_user, list_organizations, get_organization, list_spaces, get_space, list_sites, list_members, list_teams, list_change_requests, search_space, search_organization). The BYOK key travels with each request, is used for that one...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-gitbook.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-gitbook/docs"},"termsOfService":"https://connectorbay.com/byok-gitbook/terms"},"servers":[{"url":"https://byok-gitbook.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-gitbook/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_current_user":{"post":{"operationId":"get_current_user","summary":"Show the GitBook user the token belongs to: id, display name and email. Use for \"Which GitBook account is my token for\".","description":"Show the GitBook user the token belongs to: id, display name and email. Use for \"Which GitBook account is my token for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_current_userArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_organizations":{"post":{"operationId":"list_organizations","summary":"List the organizations the user belongs to with title, type (business or community), use case and hostname. Use for \"Whi","description":"List the organizations the user belongs to with title, type (business or community), use case and hostname. Use for \"Which GitBook organizations am I a member of\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page cursor: the next.page value of the previous answer, to get the next page.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 1000).","title":"Limit"}},"title":"list_organizationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_organization":{"post":{"operationId":"get_organization","summary":"Get one organization: title, type, plan, use case, hostname, SSO, AI and audit log flags. Use for \"What GitBook plan is ","description":"Get one organization: title, type, plan, use case, hostname, SSO, AI and audit log flags. Use for \"What GitBook plan is my organization on\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"GitBook organization id, as returned by list_organizations.","maxLength":100,"title":"Organization Id","type":"string"}},"required":["organization_id"],"title":"get_organizationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_spaces":{"post":{"operationId":"list_spaces","summary":"List the spaces of an organization with title, visibility (public, unlisted, share-link, visitor-auth, in-collection, pr","description":"List the spaces of an organization with title, visibility (public, unlisted, share-link, visitor-auth, in-collection, private), edit mode, language and links. Use for \"Which GitBook spaces does my organization have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"GitBook organization id, as returned by list_organizations.","maxLength":100,"title":"Organization Id","type":"string"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page cursor: the next.page value of the previous answer, to get the next page.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 1000).","title":"Limit"}},"required":["organization_id"],"title":"list_spacesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_space":{"post":{"operationId":"get_space","summary":"Get one space by id: title, visibility, edit mode, language, creation and update times and links. Use for \"Show GitBook ","description":"Get one space by id: title, visibility, edit mode, language, creation and update times and links. Use for \"Show GitBook space space_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"space_id":{"description":"GitBook space id, as returned by list_spaces.","maxLength":100,"title":"Space Id","type":"string"}},"required":["space_id"],"title":"get_spaceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_sites":{"post":{"operationId":"list_sites","summary":"List the documentation sites of an organization with title, type, visibility, published state, hostname and number of li","description":"List the documentation sites of an organization with title, type, visibility, published state, hostname and number of linked spaces. Use for \"Which GitBook documentation sites are published\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"GitBook organization id, as returned by list_organizations.","maxLength":100,"title":"Organization Id","type":"string"},"title":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only sites whose title contains this text.","title":"Title"},"published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only published sites, false for only unpublished.","title":"Published"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page cursor: the next.page value of the previous answer, to get the next page.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 1000).","title":"Limit"}},"required":["organization_id"],"title":"list_sitesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_members":{"post":{"operationId":"list_members","summary":"List organization members with role, user display name and email, join and last-seen times and SSO flag. Filter by name ","description":"List organization members with role, user display name and email, join and last-seen times and SSO flag. Filter by name or email text. Use for \"Who are the members of my GitBook organization and when were they last seen\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"GitBook organization id, as returned by list_organizations.","maxLength":100,"title":"Organization Id","type":"string"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only members whose display name or email contains this text.","title":"Search"},"sort":{"anyOf":[{"enum":["joinedAt","lastSeenAt","name"],"type":"string"},{"type":"null"}],"default":"joinedAt","description":"Sort by joinedAt, lastSeenAt or name.","title":"Sort"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort order: asc or desc.","title":"Order"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page cursor: the next.page value of the previous answer, to get the next page.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 1000).","title":"Limit"}},"required":["organization_id"],"title":"list_membersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_teams":{"post":{"operationId":"list_teams","summary":"List teams of an organization with title, member count, space count and creation time. Use for \"What teams exist in my G","description":"List teams of an organization with title, member count, space count and creation time. Use for \"What teams exist in my GitBook organization\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"GitBook organization id, as returned by list_organizations.","maxLength":100,"title":"Organization Id","type":"string"},"title":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only teams whose title contains this text (case-insensitive).","title":"Title"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page cursor: the next.page value of the previous answer, to get the next page.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 1000).","title":"Limit"}},"required":["organization_id"],"title":"list_teamsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_change_requests":{"post":{"operationId":"list_change_requests","summary":"List a space's change requests with number, status (draft, open, archived, merged), subject, author and times. Use for \"","description":"List a space's change requests with number, status (draft, open, archived, merged), subject, author and times. Use for \"Which change requests are open in GitBook space space_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"space_id":{"description":"GitBook space id, as returned by list_spaces.","maxLength":100,"title":"Space Id","type":"string"},"status":{"anyOf":[{"enum":["draft","open","archived","merged"],"type":"string"},{"type":"null"}],"default":null,"description":"Only change requests with this status: draft, open, archived or merged.","title":"Status"},"order_by":{"anyOf":[{"enum":["updatedAt","createdAt"],"type":"string"},{"type":"null"}],"default":"updatedAt","description":"Sort by updatedAt or createdAt.","title":"Order By"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page cursor: the next.page value of the previous answer, to get the next page.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Results per page (1 to 1000).","title":"Limit"}},"required":["space_id"],"title":"list_change_requestsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_space":{"post":{"operationId":"search_space","summary":"Full-text search the published pages of one space; returns matching pages with path, score, excerpt sections and links. ","description":"Full-text search the published pages of one space; returns matching pages with path, score, excerpt sections and links. Use for \"Search my GitBook handbook space for 'onboarding'\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"space_id":{"description":"GitBook space id, as returned by list_spaces.","maxLength":100,"title":"Space Id","type":"string"},"query":{"description":"Search text.","maxLength":300,"title":"Query","type":"string"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page cursor: the next.page value of the previous answer, to get the next page.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page (1 to 1000).","title":"Limit"}},"required":["space_id","query"],"title":"search_spaceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_organization":{"post":{"operationId":"search_organization","summary":"Search content across all spaces of an organization; returns the matching spaces with their score. Use for \"Which of my ","description":"Search content across all spaces of an organization; returns the matching spaces with their score. Use for \"Which of my GitBook spaces mention 'security policy'\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"GitBook organization id, as returned by list_organizations.","maxLength":100,"title":"Organization Id","type":"string"},"query":{"description":"Search text.","maxLength":300,"title":"Query","type":"string"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page cursor: the next.page value of the previous answer, to get the next page.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page (1 to 1000).","title":"Limit"}},"required":["organization_id","query"],"title":"search_organizationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}