Revdoku GitHub API

Connect a GitHub repository to a bucket: its files become a copy of one branch, and each push updates them.

GitHub OpenAPI

Operations 9

GET /v1/account/github/installations List connected GitHub accounts #
GET /v1/account/github/installations/{installation_id}/repositories List the repositories of a GitHub account #
GET /v1/buckets/{bucket_id}/github Read the GitHub repository of a bucket #
POST /v1/buckets/{bucket_id}/github Connect a GitHub repository #
PATCH /v1/buckets/{bucket_id}/github Change GitHub sync settings #
DELETE /v1/buckets/{bucket_id}/github Disconnect the GitHub repository #
POST /v1/buckets/{bucket_id}/github/sync Sync the GitHub repository now #
GET /v1/buckets/{bucket_id}/github/branches List the branches that can get a preview #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/revdoku-com:revdoku-com-github-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

revdoku-com-github-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Revdoku GitHub API
  version: 2.0.0
  description: 'A bucket is the project of one docs site: its files, the published site, the site analytics, and the support email address with its tickets. Create buckets, publish sites, read and reply to support requests and store files. The dashboard calls a bucket a site. Guide: https://docs.revdoku.com/api/. Create an account at https://app.revdoku.com/users/sign_up.'
servers:
- url: https://api.revdoku.com
  description: Revdoku application API
security:
- bearerAuth: []
tags:
- name: Github
  description: 'Connect a GitHub repository to a bucket: its files become a copy of one branch, and each push updates them.'
paths:
  /v1/account/github/installations:
    get:
      operationId: listGithubInstallations
      tags:
      - Github
      summary: List connected GitHub accounts
      description: Returns the GitHub accounts and organizations where a person installed the Revdoku GitHub App for this account. Each one reads the repositories that its owner chose on GitHub. Needs an account owner or administrator key with admin access to all buckets. To add a GitHub account, get the links with getGithubSetupLink.
      parameters:
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: Connected GitHub accounts
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - installations
                    - pagination
                    properties:
                      installations:
                        type: array
                        items:
                          $ref: '#/components/schemas/GithubInstallation'
                      pagination:
                        $ref: '#/components/schemas/Pagination'
              example:
                success: true
                data:
                  installations:
                  - installation_id: 51234567
                    github_account_login: acme
                    github_account_type: Organization
                    settings_url: https://github.com/organizations/acme/settings/installations/51234567
                    repository_selection: selected
                  pagination:
                    limit: 50
                    has_more: false
                    next_cursor: null
        default:
          $ref: '#/components/responses/Error'
  /v1/account/github/installations/{installation_id}/repositories:
    get:
      operationId: listGithubRepositories
      tags:
      - Github
      summary: List the repositories of a GitHub account
      description: 'Returns the repositories that one connected GitHub account lets Revdoku read, A-Z by full name. A repository that is not listed needs access on GitHub: give the account''s settings_url to its owner. Needs an account owner or administrator key with admin access to all buckets.'
      parameters:
      - $ref: '#/components/parameters/InstallationId'
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: Repositories
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - repositories
                    - pagination
                    properties:
                      repositories:
                        type: array
                        items:
                          $ref: '#/components/schemas/GithubRepository'
                      pagination:
                        $ref: '#/components/schemas/Pagination'
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/github:
    get:
      operationId: getGithubSync
      tags:
      - Github
      summary: Read the GitHub repository of a bucket
      description: Returns the bucket's GitHub repository and its sync state. github is null when the bucket never had one. After connectGithubRepository, read it until last_synced_at is set (the first copy is done) or sync_state is error.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/AccountId'
      responses:
        '200':
          description: The GitHub repository of the bucket
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - github
                    properties:
                      github:
                        anyOf:
                        - $ref: '#/components/schemas/GithubSync'
                        - type: 'null'
              example:
                success: true
                data:
                  github:
                    id: bgh_8xQ2kL4mN7pR
                    bucket_id: bkt_5Gh3Lm9Qx2Tz
                    installation_id: 51234567
                    repo_owner: acme
                    repo_name: docs
                    repo_full_name: acme/docs
                    repository_url: https://github.com/acme/docs
                    branch: main
                    repo_path: null
                    sync_state: idle
                    last_error: null
                    next_retry_at: null
                    last_synced_at: '2026-11-09T10:15:00Z'
                    last_synced_commit_sha: 4f1c2e9a7b3d5f6081a2c3d4e5f60718293a4b5c
                    last_synced_commit_message: Add the quickstart page
                    auto_publish: true
                    skipped_files: []
                    auto_publish_error: null
                    dashboard_url: https://app.revdoku.com/buckets/view?account_id=acct_3Fh8Qm2Lx9Tw&id=bkt_5Gh3Lm9Qx2Tz&site=github&view=site
                    created_at: '2026-11-09T10:14:20Z'
                    updated_at: '2026-11-09T10:15:00Z'
        default:
          $ref: '#/components/responses/Error'
    post:
      operationId: connectGithubRepository
      tags:
      - Github
      summary: Connect a GitHub repository
      description: 'Makes the bucket''s files a read-only copy of one branch of a repository, or of one folder of it. The first sync copies the files, and each later push to the branch updates them. Revdoku never writes to the repository. The copy is in the bucket folder _repo/. A bucket that has files there needs bucket_files: replace (the repository''s files replace them); its knowledge base (_kb/), its tickets and its agent folders stay. GitHub is the source: change the files there. Needs an account owner or administrator key with admin access to all buckets. A connected GitHub account must read the repository: 403 GITHUB_APP_NOT_INSTALLED gives the links for the person in error.details.'
      parameters:
      - $ref: '#/components/parameters/BucketId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                github:
                  $ref: '#/components/schemas/GithubConnect'
                account_id:
                  type: string
                  description: Select another granted account for this request.
                reason:
                  $ref: '#/components/schemas/ActionReason'
              required:
              - github
      responses:
        '201':
          description: Connected. The first sync is queued
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - github
                    properties:
                      github:
                        $ref: '#/components/schemas/GithubSync'
        default:
          $ref: '#/components/responses/Error'
    patch:
      operationId: updateGithubSync
      tags:
      - Github
      summary: Change GitHub sync settings
      description: 'Sets auto_publish: whether the site publishes again after each sync. Needs an account owner or administrator key with admin access to all buckets.'
      parameters:
      - $ref: '#/components/parameters/BucketId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                github:
                  $ref: '#/components/schemas/GithubSyncSettings'
                account_id:
                  type: string
                  description: Select another granted account for this request.
                reason:
                  $ref: '#/components/schemas/ActionReason'
              required:
              - github
      responses:
        '200':
          description: The changed settings
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - github
                    properties:
                      github:
                        $ref: '#/components/schemas/GithubSync'
        default:
          $ref: '#/components/responses/Error'
    delete:
      operationId: disconnectGithubRepository
      tags:
      - Github
      summary: Disconnect the GitHub repository
      description: Stops the sync. The bucket keeps its files and its site. A later read shows the link with sync_state disconnected; connect the same repository again to continue its copy. Needs an account owner or administrator key with admin access to all buckets.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Reason'
      responses:
        '200':
          description: Disconnected
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/DeleteResult'
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/github/sync:
    post:
      operationId: syncGithubRepository
      tags:
      - Github
      summary: Sync the GitHub repository now
      description: Copies new commits of the branch now and tries a failed sync again. Pushes sync without this call; use it after an error, or after a person changed access on GitHub. enqueued is false when a sync already runs. Needs an account owner or administrator key with admin access to all buckets.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionRequest'
      responses:
        '202':
          description: Sync queued
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - github
                    - enqueued
                    properties:
                      github:
                        $ref: '#/components/schemas/GithubSync'
                      enqueued:
                        type: boolean
                        description: False when a sync already runs.
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/github/branches:
    get:
      operationId: listGithubBranches
      tags:
      - Github
      summary: List the branches that can get a preview
      description: Returns the branches of the bucket's GitHub repository, without the linked branch (the site shows it), A-Z. Pass one as branch to previewBucket. Requires bucket publish permission. 404 GITHUB_SYNC_NOT_CONNECTED without a repository.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/AccountId'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - branches
                    properties:
                      branches:
                        type: array
                        items:
                          type: string
              example:
                success: true
                data:
                  branches:
                  - next
                  - pricing-page
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/github/setup_link:
    get:
      operationId: getGithubSetupLink
      tags:
      - Github
      summary: Get the links to add a GitHub account
      description: Returns the links that a person opens to add a GitHub account or organization to this Revdoku account. Only the person who owns this key or AI connection can finish the step, signed in to Revdoku, within 30 minutes. Give install_url to install the Revdoku GitHub App; on GitHub the person chooses the account and the repositories. Give authorization_url when the App is already installed on that GitHub account; the person then selects Connect on the bucket's GitHub page. Then list the connected GitHub accounts until the new one shows. Needs an account owner or administrator key with admin access to all buckets.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/AccountId'
      responses:
        '200':
          description: Links for the person
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - setup_link
                    properties:
                      setup_link:
                        $ref: '#/components/schemas/GithubSetupLink'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    Limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 50
    BucketId:
      name: bucket_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^bkt_
    AccountId:
      name: account_id
      in: query
      required: false
      schema:
        type: string
      description: Select another granted account for this request. Omit to use the credential default. In JSON bodies, send account_id as a body field instead.
    Reason:
      name: reason
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/ActionReason'
    Cursor:
      name: cursor
      in: query
      required: false
      schema:
        type: string
      description: pagination.next_cursor from the previous page.
    InstallationId:
      name: installation_id
      in: path
      required: true
      schema:
        type: integer
        minimum: 1
      description: installation_id of a connected GitHub account.
  schemas:
    ActionReason:
      type:
      - string
      - 'null'
      maxLength: 2000
      description: Optional purpose for this action. AI agents should explain intentional reads and changes when known; omit when unknown. Do not include secrets, file contents, or transcripts.
    GithubConnect:
      type: object
      additionalProperties: false
      required:
      - repo_owner
      - repo_name
      properties:
        repo_owner:
          type: string
          description: The GitHub account or organization that owns the repository.
        repo_name:
          type: string
          maxLength: 100
        branch:
          type: string
          description: 'The branch to copy. Default: the repository''s default branch.'
        repo_path:
          type: string
          description: 'Copy only this folder of the repository into the bucket folder _repo/, such as docs. Default: the whole repository.'
        installation_id:
          type: integer
          minimum: 1
          description: 'The connected GitHub account that reads the repository. Default: the connected account of repo_owner.'
        bucket_files:
          type: string
          enum:
          - replace
          description: 'For a bucket that has files. replace: the repository''s files replace them, and they stay in the bucket''s versions. Without it, such a connect answers 409 GITHUB_SYNC_BUCKET_NOT_EMPTY. Send it after a person agrees.'
    ActionRequest:
      type: object
      description: Optional account selection and reason for an action without other input.
      properties:
        account_id:
          type: string
          description: Select another granted account for this request.
        reason:
          $ref: '#/components/schemas/ActionReason'
    GithubSyncSettings:
      type: object
      additionalProperties: false
      minProperties: 1
      properties:
        auto_publish:
          type: boolean
          description: Publish the site again after each sync.
    GithubRepository:
      type: object
      additionalProperties: false
      required:
      - id
      - owner
      - name
      - full_name
      - default_branch
      - private
      - archived
      properties:
        id:
          type: integer
          description: GitHub repository ID.
        owner:
          type: string
          description: Pass as repo_owner to connectGithubRepository.
        name:
          type: string
          description: Pass as repo_name.
        full_name:
          type: string
        default_branch:
          type: string
        private:
          type: boolean
        archived:
          type: boolean
        html_url:
          type: string
          format: uri
    ApiError:
      type: object
      properties:
        success:
          const: false
        error:
          type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error identifier. See ErrorCode for the documented values. Invalid input always returns INVALID_ARGUMENT with HTTP 422.
            message:
              type: string
              minLength: 1
            details:
              oneOf:
              - type: object
                additionalProperties: true
              - type: array
                items:
                  type: object
                  properties:
                    field:
                      type: string
                    message:
                      type: string
                  required:
                  - field
                  - message
            request_id:
              type: string
            docs_url:
              type: string
              format: uri
            timestamp:
              type: string
              format: date-time
            recoverable:
              type: boolean
            next_action:
              type: string
            browser_url:
              type: string
          required:
          - code
          - message
      required:
      - success
      - error
      not:
        anyOf:
        - required:
          - data
        - required:
          - error_message
    GithubSetupLink:
      type: object
      additionalProperties: false
      required:
      - install_url
      - authorization_url
      - expires_at
      - dashboard_url
      description: Links for a person's step on GitHub. Only the person who owns this key or AI connection can finish it, signed in to Revdoku. Never ask for GitHub passwords or tokens.
      properties:
        install_url:
          type: string
          format: uri
          description: Installs the Revdoku GitHub App on a GitHub account or organization and connects it. On GitHub the person chooses the repositories.
        authorization_url:
          type: string
          format: uri
          description: For a GitHub account where the App is already installed. After it, the person selects Connect on the bucket's GitHub page.
        expires_at:
          type: string
          format: date-time
          description: The links work for 30 minutes.
        dashboard_url:
          type:
          - string
          - 'null'
          description: The bucket's GitHub page in the dashboard. The person sees the result there, and another owner or administrator can add the GitHub account there.
    GithubSync:
      type: object
      additionalProperties: false
      description: The GitHub repository of a bucket. The bucket's files are a copy of one branch, or of one folder of it.
      properties:
        id:
          type: string
          description: Link ID.
        bucket_id:
          type: string
        installation_id:
          type: integer
          description: The connected GitHub account (Revdoku GitHub App installation) that reads the repository.
        repo_owner:
          type: string
          description: The GitHub account or organization that owns the repository.
        repo_name:
          type: string
        repo_full_name:
          type: string
          description: owner/name.
        repository_url:
          type: string
          format: uri
        branch:
          type: string
        repo_path:
          type:
          - string
          - 'null'
          description: 'The repository folder that is copied into the bucket folder _repo/. Null: the whole repository.'
        sync_state:
          type: string
          enum:
          - idle
          - syncing
          - waiting_locked
          - error
          - disconnected
          description: 'idle: nothing runs. syncing: a sync runs. waiting_locked: the bucket is locked and the sync tries again later. error: see last_error and next_retry_at. disconnected: the repository is no longer connected.'
        last_error:
          anyOf:
          - $ref: '#/components/schemas/GithubSyncError'
          - type: 'null'
          description: Why the last sync failed or waits, or why GitHub disconnected the repository.
        next_retry_at:
          type:
          - string
          - 'null'
          format: date-time
          description: 'When a failed sync tries again. Null after the last try: sync again after the cause is fixed.'
        last_synced_at:
          type:
          - string
          - 'null'
          format: date-time
          description: When the last sync finished. Null until the first copy is done.
        last_synced_commit_sha:
          type:
          - string
          - 'null'
          description: The commit of the branch that the files show.
        last_synced_commit_message:
          type:
          - string
          - 'null'
        auto_publish:
          type: boolean
          description: The site publishes again after each sync. The first publish is publishBucket.
        skipped_files:
          type: array
          description: Repository files that the last sync left out, for example files that are too large or stored in Git LFS.
          items:
            type: object
            additionalProperties: false
            required:
            - path
            - code
            - reason
            properties:
              path:
                type: string
              code:
                type:
                - string
                - 'null'
              reason:
                type:
                - string
                - 'null'
        auto_publish_error:
          anyOf:
          - $ref: '#/components/schemas/GithubSyncError'
          - type: 'null'
          description: Why the site was not published again after the last sync.
        dashboard_url:
          type:
          - string
          - 'null'
          description: The bucket's GitHub page in the dashboard. It grants no access.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - bucket_id
      - installation_id
      - repo_owner
      - repo_name
      - repo_full_name
      - repository_url
      - branch
      - repo_path
      - sync_state
      - last_error
      - next_retry_at
      - last_synced_at
      - last_synced_commit_sha
      - last_synced_commit_message
      - auto_publish
      - skipped_files
      - auto_publish_error
      - dashboard_url
      - created_at
      - updated_at
    Pagination:
      type: object
      description: 'One page of a list. Request the next page with cursor=next_cursor and the same filters. Cursors are opaque strings: do not build or decode them.'
      required:
      - limit
      - has_more
      - next_cursor
      properties:
        limit:
          type: integer
          minimum: 1
          maximum: 200
        has_more:
          type: boolean
          description: True when another page exists.
        next_cursor:
          type:
          - string
          - 'null'
          description: Cursor for the next page; null on the last page. Email lists always return a cursor so that you can poll for new mail.
    GithubInstallation:
      type: object
      additionalProperties: false
      required:
      - installation_id
      - settings_url
      description: A GitHub account or organization where a person installed the Revdoku GitHub App for this account.
      properties:
        installation_id:
          type: integer
          description: Pass it to listGithubRepositories, and optionally to connectGithubRepository.
        github_account_login:
          type: string
        github_account_type:
          type: string
          description: User or Organization.
        settings_url:
          type: string
          format: uri
          description: The installation's page on GitHub, where its owner chooses the repositories that Revdoku can read.
        repository_selection:
          type: string
          enum:
          - all
          - selected
          description: 'all: every repository of the account. selected: only the repositories that its owner chose.'
    GithubSyncError:
      type: object
      additionalProperties: false
      required:
      - code
      - message
      description: 'Why a sync or a publish after a sync failed: a stable code and one readable sentence.'
      properties:
        code:
          type: string
          description: For example REMOTE_BRANCH_GONE, GITHUB_REPO_ACCESS_REMOVED, GITHUB_APP_UNINSTALLED or GITHUB_SYNC_FAILED.
        message:
          type: string
    DeleteResult:
      type: object
      required:
      - deleted
      - id
      properties:
        deleted:
          type: boolean
          const: true
        id:
          type: string
          description: ID of the deleted resource. A webhook delete returns the bucket ID.
  responses:
    Error:
      description: 'Request failed. See error.code. Any 429 or 503 response with Retry-After (for example 503 EMAIL_LABELING_PENDING or 503 EMAIL_INDEX_BUILDING): wait that many seconds, then try the request again. 429 EMAIL_SEND_RATE_LIMITED has no Retry-After. Never retry EMAIL_LOOP_DETECTED.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer YOUR_API_KEY. Create a key in the dashboard under Account → Access.'