Revdoku Files API

Read the files that Revdoku copied from the bucket's GitHub repository. Revdoku only reads a repository: change the files on GitHub.

GitHub OpenAPI

Operations 10

GET /v1/buckets/{bucket_id}/files List files #
POST /v1/buckets/{bucket_id}/files Write a knowledge base file #
POST /v1/buckets/{bucket_id}/uploads Get an upload link for an image #
GET /v1/buckets/{bucket_id}/files/by_path Find a file by path #
GET /v1/buckets/{bucket_id}/files/{file_id} Read file metadata #
DELETE /v1/buckets/{bucket_id}/files/{file_id} Delete a knowledge base file #
GET /v1/buckets/{bucket_id}/files/{file_id}/download Get a download link for a file #
GET /v1/buckets/{bucket_id}/files/{file_id}/versions List file versions #
POST /v1/buckets/{bucket_id}/files/{file_id}/move Move or rename a knowledge base file #
POST /v1/buckets/{bucket_id}/files/{file_id}/versions/{version_id}/restore Restore a file version #

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-files-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-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Revdoku Files 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: Files
  description: 'Read the files that Revdoku copied from the bucket''s GitHub repository. Revdoku only reads a repository: change the files on GitHub.'
paths:
  /v1/buckets/{bucket_id}/files:
    get:
      operationId: listFiles
      tags:
      - Files
      summary: List files
      description: 'Lists current files with their real paths: _repo/ holds the read-only copy of the GitHub repository, and _kb/ holds the knowledge base (_kb/public/ and _kb/private/). Listing never marks files read.'
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Reason'
      - name: q
        in: query
        schema:
          type: string
        description: Case-insensitive text in the path.
      - name: folder
        in: query
        schema:
          type: string
        description: List one folder. An empty value lists the root.
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/FileList'
              example:
                success: true
                data:
                  files:
                  - id: df_example
                    bucket_id: bkt_example
                    basename: summary.txt
                    path: reports/summary.txt
                    role: source
                    deleted: false
                    lock:
                      locked: false
                    current_file_version:
                      id: dfrev_example
                      file_id: df_example
                      version_number: 0
                      name: summary.txt
                      mime_type: text/plain
                      byte_size: 1234
                      sha256: 0d6a3c2b8f5e41a7c9b2d4e6f8a1c3e5b7d9f1a3c5e7b9d1f3a5c7e9b1d3f5a7
                      deleted: false
                      ready: true
                      has_text: false
                      created_at: '2026-10-11T12:20:00Z'
                      created_by:
                        id: user_example
                        email: ada@example.com
                        name: Ada Lovelace
                      updated_by:
                        id: user_example
                        email: ada@example.com
                        name: Ada Lovelace
                      created_by_api_key:
                        id: atok_example
                        label: Orders backend
                        token_type: api
                      created_by_agent:
                        name: Orders backend
                      updated_by_api_key:
                        id: atok_example
                        label: Orders backend
                        token_type: api
                      updated_by_agent:
                        name: Orders backend
                      read: false
                      read_at: null
                      read_by: null
                      read_by_api_key: null
                    created_by:
                      id: user_example
                      email: ada@example.com
                      name: Ada Lovelace
                    created_by_api_key:
                      id: atok_example
                      label: Orders backend
                      token_type: api
                    created_by_agent:
                      name: Orders backend
                    updated_by_api_key:
                      id: atok_example
                      label: Orders backend
                      token_type: api
                    updated_by_agent:
                      name: Orders backend
                    created_at: '2026-10-11T12:20:00Z'
                    updated_at: '2026-10-11T12:20:00Z'
                    read: false
                    read_at: null
                    read_by: null
                    read_by_api_key: null
                  pagination:
                    limit: 50
                    has_more: false
                    next_cursor: null
        default:
          $ref: '#/components/responses/Error'
    post:
      operationId: writeFile
      tags:
      - Files
      summary: Write a knowledge base file
      description: 'Requires bucket write permission. The knowledge base is the bucket folder _kb/: _kb/public/ is published with the site, and _kb/private/ is never published. Every other file of a bucket is read-only: the files of _repo/ change on GitHub. Send one of content (a page), content_base64 (a small image) or signed_blob_id (an uploaded image). A file at the path gets a new version. A file in _kb/public/ needs publish permission; without it the answer is 403 KB_PUBLISH_PERMISSION_REQUIRED. A write never publishes: the site shows a public file after the next publish. Another path returns 422 KB_PATH_REQUIRED, SYNCED_COPY_READ_ONLY or RESERVED_PATH, and another file type 422 KB_FILE_TYPE_UNSUPPORTED. A page of _kb/public/ with the front matter line do_not_publish: true stays off the site, and the site''s AI Support Agent still answers visitors from it: put only facts that visitors may know there, never secrets. A file above the account''s file size limit returns 413 FILE_TOO_LARGE. A locked bucket or file returns 423 BUCKET_LOCKED or FILE_LOCKED.'
      parameters:
      - $ref: '#/components/parameters/BucketId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileWriteRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/FileWriteResult'
        default:
          $ref: '#/components/responses/Error'
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/FileWriteResult'
  /v1/buckets/{bucket_id}/uploads:
    post:
      operationId: createFileUpload
      tags:
      - Files
      summary: Get an upload link for an image
      description: Requires bucket write permission. For an image of the knowledge base that is larger than 256 KB, or for a client that sends files itself. Send the bytes with PUT to upload.url with upload.headers, then call POST /files with path and signed_blob_id. The link works for one hour. The size limit is the account's file size limit. A path outside _kb/ or another file type returns 422 KB_PATH_REQUIRED or KB_FILE_TYPE_UNSUPPORTED, and a file above the limit 413 FILE_TOO_LARGE.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileUploadRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/FileUpload'
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/files/by_path:
    get:
      operationId: getFileByPath
      tags:
      - Files
      summary: Find a file by path
      description: Returns file metadata only. Read content with the download endpoint. The disposition and content_url parameters return INVALID_ARGUMENT.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - name: path
        in: query
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Reason'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - file
                    properties:
                      file:
                        $ref: '#/components/schemas/BucketFile'
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/files/{file_id}:
    get:
      operationId: getFile
      tags:
      - Files
      summary: Read file metadata
      description: Reading metadata never marks the file read.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/FileId'
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Reason'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    required:
                    - file
                    properties:
                      file:
                        $ref: '#/components/schemas/BucketFile'
        default:
          $ref: '#/components/responses/Error'
    delete:
      operationId: deleteFile
      tags:
      - Files
      summary: Delete a knowledge base file
      description: 'Requires bucket write permission, and publish permission for a file in _kb/public/. Deletes one file of the knowledge base. Its versions stay: keep the file ID of the answer, list the versions with GET /files/{file_id}/versions and restore one to bring the file back. A path outside _kb/ returns 422 KB_PATH_REQUIRED, SYNCED_COPY_READ_ONLY or RESERVED_PATH. A locked bucket or file returns 423 BUCKET_LOCKED or FILE_LOCKED.'
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/FileId'
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Reason'
      responses:
        '200':
          description: Success
          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}/files/{file_id}/download:
    get:
      operationId: getFileDownload
      tags:
      - Files
      summary: Get a download link for a file
      description: Returns a temporary link and marks this version read. Send version_id for an older version.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/FileId'
      - name: version_id
        in: query
        schema:
          type: string
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Reason'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/FileDownload'
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/files/{file_id}/versions:
    get:
      operationId: listFileVersions
      tags:
      - Files
      summary: List file versions
      description: Newest first.
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/FileId'
      - $ref: '#/components/parameters/AccountId'
      - $ref: '#/components/parameters/Reason'
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/FileVersionList'
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/files/{file_id}/move:
    post:
      operationId: moveFile
      tags:
      - Files
      summary: Move or rename a knowledge base file
      description: 'Requires bucket write permission. Moves one file inside the knowledge base to new_path: a new name (a rename), another folder, or from _kb/private/ to _kb/public/ and back. A move to or from _kb/public/ needs publish permission (403 KB_PUBLISH_PERMISSION_REQUIRED). The file keeps its ID and its versions. A file at the new path returns 409 BUCKET_FILE_PATH_EXISTS. The site changes after the next publish. A path outside _kb/ returns 422 KB_PATH_REQUIRED, SYNCED_COPY_READ_ONLY or RESERVED_PATH. A locked bucket or file returns 423 BUCKET_LOCKED or FILE_LOCKED.'
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/FileId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileMoveRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/FileMoveResult'
        default:
          $ref: '#/components/responses/Error'
  /v1/buckets/{bucket_id}/files/{file_id}/versions/{version_id}/restore:
    post:
      operationId: restoreFileVersion
      tags:
      - Files
      summary: Restore a file version
      description: 'Requires bucket write permission, and publish permission for a file in _kb/public/. Makes an earlier version of a knowledge base file the current one, as a new version. A deleted file comes back with it: use the file ID that the delete returned. When another file took its path meanwhile, the answer is 409 BUCKET_FILE_PATH_EXISTS. The current version returns 422 FILE_VERSION_ALREADY_CURRENT. A path outside _kb/ returns 422 KB_PATH_REQUIRED, SYNCED_COPY_READ_ONLY or RESERVED_PATH. A locked bucket or file returns 423 BUCKET_LOCKED or FILE_LOCKED.'
      parameters:
      - $ref: '#/components/parameters/BucketId'
      - $ref: '#/components/parameters/FileId'
      - name: version_id
        in: path
        required: true
        schema:
          type: string
        description: A version ID of the file's version list.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - data
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/FileRestoreResult'
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    FileUpload:
      type: object
      required:
      - path
      - signed_blob_id
      - upload
      properties:
        path:
          type: string
        signed_blob_id:
          type: string
          description: Send it to POST /files after the bytes are sent.
        upload:
          type: object
          required:
          - method
          - url
          - headers
          properties:
            method:
              type: string
              const: PUT
            url:
              type: string
              format: uri
            headers:
              type: object
              additionalProperties:
                type: string
              description: Send these headers with the bytes.
    FileVersionList:
      type: object
      required:
      - versions
      - pagination
      properties:
        versions:
          type: array
          items:
            $ref: '#/components/schemas/FileVersion'
        pagination:
          $ref: '#/components/schemas/Pagination'
    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.
    FileList:
      type: object
      required:
      - files
      - pagination
      properties:
        files:
          type: array
          items:
            $ref: '#/components/schemas/BucketFile'
        pagination:
          $ref: '#/components/schemas/Pagination'
    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'
    FileActor:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
    BucketFile:
      type: object
      properties:
        id:
          type: string
        bucket_id:
          type: string
          pattern: ^bkt_
        basename:
          type: string
        path:
          type: string
        role:
          type: string
        created_by_system:
          type: string
        deleted:
          type: boolean
        version_reasons:
          type: array
          items:
            $ref: '#/components/schemas/FileVersionReason'
        lock:
          type: object
          additionalProperties: true
        current_file_version:
          anyOf:
          - $ref: '#/components/schemas/FileVersion'
          - type: 'null'
        created_by:
          $ref: '#/components/schemas/FileActor'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
        created_by_agent:
          type: object
          additionalProperties: true
        updated_by_agent:
          type: object
          additionalProperties: true
        created_by_api_key:
          type: object
          additionalProperties: true
        updated_by_api_key:
          type: object
          additionalProperties: true
        read:
          type: boolean
        read_at:
          type:
          - string
          - 'null'
          format: date-time
        read_by:
          anyOf:
          - $ref: '#/components/schemas/FileActor'
          - type: 'null'
        read_by_api_key:
          anyOf:
          - $ref: '#/components/schemas/FileKey'
          - type: 'null'
      required:
      - id
      - path
    FileKey:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        token_type:
          type: string
    FileWriteResult:
      type: object
      required:
      - path
      - file
      - version
      - created
      - unchanged
      properties:
        path:
          type: string
        file:
          $ref: '#/components/schemas/BucketFile'
        version:
          $ref: '#/components/schemas/FileVersion'
        created:
          type: boolean
          description: False for a new version of a file.
        unchanged:
          type: boolean
          description: True when the file had this content already. Then no version is added.
    FileUploadRequest:
      type: object
      required:
      - path
      - byte_size
      - checksum
      - sha256
      properties:
        path:
          type: string
          description: The path of the image in _kb/public/ or _kb/private/.
        byte_size:
          type: integer
          description: The size of the image in bytes.
        checksum:
          type: string
          description: The MD5 of the bytes, as Base64.
        sha256:
          type: string
          description: The SHA-256 of the bytes, as hex.
        account_id:
          type: string
          description: Select another granted account for this request.
        reason:
          $ref: '#/components/schemas/ActionReason'
    FileRestoreResult:
      type: object
      required:
      - path
      - file
      - version
      - restored_from
      properties:
        path:
          type: string
        file:
          $ref: '#/components/schemas/BucketFile'
        version:
          $ref: '#/components/schemas/FileVersion'
        restored_from:
          $ref: '#/components/schemas/FileVersion'
    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
    FileMoveResult:
      type: object
      required:
      - path
      - old_path
      - file
      - version
      - unchanged
      properties:
        path:
          type: string
        old_path:
          type: string
        file:
          $ref: '#/components/schemas/BucketFile'
        version:
          $ref: '#/components/schemas/FileVersion'
        unchanged:
          type: boolean
          description: True when the file is at this path already.
    FileVersionReason:
      type: object
      properties:
        version_id:
          type: string
        reason:
          type: string
        created_by_id:
          type: string
        version_number:
          type: integer
          format: int64
        created_at:
          type: string
          format: date-time
    FileMoveRequest:
      type: object
      required:
      - new_path
      properties:
        new_path:
          type: string
          description: 'The new path in _kb/public/ or _kb/private/: a new name, another folder, or the other of the two folders. It keeps the file type.'
        reason:
          $ref: '#/components/schemas/ActionReason'
        account_id:
          type: string
          description: Select another granted account for this request.
    FileVersion:
      type: object
      properties:
        id:
          type: string
        file_id:
          type: string
        name:
          type: string
        mime_type:
          type: string
        sha256:
          type: string
        reason:
          type:
          - string
          - 'null'
        created_by_system:
          type: string
        deleted:
          type: boolean
          description: True for the version that records a deletion.
        ready:
          type: boolean
        has_text:
          type: boolean
        version_number:
          type: integer
          format: int64
        byte_size:
          type: integer
          format: int64
        created_at:
          type: string
          format: date-time
        created_by:
          $ref: '#/components/schemas/FileActor'
        updated_by:
          $ref: '#/components/schemas/FileActor'
        created_by_agent:
          type: object
          additionalProperties: true
        updated_by_agent:
          type: object
          additionalProperties: true
        created_by_api_key:
          type: object
          additionalProperties: true
        updated_by_api_key:
          type: object
          additionalProperties: true
        read:
          type: boolean
        read_at:
          type:
          - string
          - 'null'
          format: date-time
        read_by:
          anyOf:
          - $ref: '#/components/schemas/FileActor'
          - type: 'null'
        read_by_api_key:
          anyOf:
          - $ref: '#/components/schemas/FileKey'
          - type: 'null'
      required:
      - id
      - file_id
      - version_number
    FileWriteRequest:
      type: object
      required:
      - path
      properties:
        path:
          type: string
          description: A path in _kb/public/ or _kb/private/, for example _kb/private/refunds.md. A page ends in .md or .mdx; an image in .jpg, .jpeg, .png or .webp.
        content:
          type: string
          description: The UTF-8 text of a page.
        content_base64:
          type: string
          description: An image of at most 256 KB, as Base64.
        signed_blob_id:
          type: string
          description: signed_blob_id of an upload, after the bytes are sent.
        expected_bucket_version:
          type: string
          description: The bucket version from your last read. A stale value returns 409 BUCKET_VERSION_CONFLICT and writes nothing.
        reason:
          $ref: '#/components/schemas/ActionReason'
        account_id:
          type: string
          description: Select another granted account for this request.
    Download:
      type: object
      description: Temporary download link. Fetch url without an API key. Request a new link after it expires.
      required:
      - url
      - filename
      - content_type
      - expires_in
      - size_bytes
      properties:
        url:
          type: string
          format: uri
        filename:
          type: string
        content_type:
          type:
          - string
          - 'null'
        expires_in:
          type: integer
          const: 900
          description: Seconds until the link expires.
        size_bytes:
          type: integer
          minimum: 0
          format: int64
    FileDownload:
      type: object
      required:
      - download
      - version
      properties:
        download:
          $ref: '#/components/schemas/Download'
        version:
          $ref: '#/components/schemas/FileVersion'
        previously_read:
          type: boolean
          description: Read state before this request, when tracking succeeded.
    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.
    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.
  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.
    FileId:
      name: file_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^df_
  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.'