Kavita Cbl API

Responsible for the CBL import flow

Operations 14

POST /api/Cbl/sync Enqueues the Reading List to be synced on a background thread. #
POST /api/Cbl/file-import Saves an uploaded CBL file to disk without importing. #
POST /api/Cbl/upload-cbl-file Downloads a CBL file from a URL and saves it to disk without importing #
POST /api/Cbl/repo-import Downloads selected CBL files from the GitHub repo and saves them to disk… #
POST /api/Cbl/re-validate Validates an already-saved CBL file on disk. #
POST /api/Cbl/finalize-import Finalizes the import of a saved CBL file with user decisions #
GET /api/Cbl/remap-rules Returns all remap rules accessible to the current user (own rules +… #
POST /api/Cbl/remap-rules Creates a new remap rule, or updates an existing one if a rule with the same… #
GET /api/Cbl/remap-rules/all Returns all rules across all users #
POST /api/Cbl/remap-rules/{id}/promote Promotes a remap rule to global scope. Admin-only #
POST /api/Cbl/remap-rules/{id}/demote Demotes a global remap rule back to user-scoped. Admin-only #
POST /api/Cbl/remap-rules/{id} Updates a remap rule with issue-level detail (volume/chapter) #
DELETE /api/Cbl/remap-rules/{id} Deletes a remap rule. Users can only delete their own rules #
GET /api/Cbl/browse Provides the browse CBL Repo interface. Requires Download role #

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/kavita:kavita-cbl-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

kavita-cbl-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Kavita Cbl API
  description: Kavita provides a set of APIs authenticated via an Auth Key passed in the `x-api-key` header. Generate an Auth Key under User Settings → Manage Auth Keys, paste it into the Authorize panel, and all Try It requests will include it. Assume all fields of a payload are required unless marked optional. Built against v0.9.1.15
  license:
    name: GPL-3.0
    url: https://github.com/Kareadita/Kavita/blob/develop/LICENSE
  version: 0.9.1.15
servers:
- url: '{protocol}://{hostpath}'
  variables:
    protocol:
      default: http
      enum:
      - http
      - https
    hostpath:
      default: localhost:5000
security:
- AuthKey: []
tags:
- name: Cbl
  description: Responsible for the CBL import flow
paths:
  /api/Cbl/sync:
    post:
      tags:
      - Cbl
      summary: Enqueues the Reading List to be synced on a background thread.
      parameters:
      - name: readingListId
        in: query
        description: ''
        schema:
          type: integer
          format: int32
      - name: force
        in: query
        description: Ignore Hash and force sync flow
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: OK
      operationId: postApiCblSync
      x-operation-id-source: derived
  /api/Cbl/file-import:
    post:
      tags:
      - Cbl
      summary: Saves an uploaded CBL file to disk without importing.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                cblFile:
                  type: string
                  format: binary
            encoding:
              cblFile:
                style: form
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CblSavedFileDto'
            application/json:
              schema:
                $ref: '#/components/schemas/CblSavedFileDto'
            text/json:
              schema:
                $ref: '#/components/schemas/CblSavedFileDto'
      operationId: postApiCblFileImport
      x-operation-id-source: derived
  /api/Cbl/upload-cbl-file:
    post:
      tags:
      - Cbl
      summary: Downloads a CBL file from a URL and saves it to disk without importing
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadUrlDto'
          text/json:
            schema:
              $ref: '#/components/schemas/UploadUrlDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UploadUrlDto'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CblSavedFileDto'
            application/json:
              schema:
                $ref: '#/components/schemas/CblSavedFileDto'
            text/json:
              schema:
                $ref: '#/components/schemas/CblSavedFileDto'
      operationId: postApiCblUploadCblFile
      x-operation-id-source: derived
  /api/Cbl/repo-import:
    post:
      tags:
      - Cbl
      summary: Downloads selected CBL files from the GitHub repo and saves them to disk…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CblRepoImportRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/CblRepoImportRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CblRepoImportRequestDto'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CblSavedFileDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CblSavedFileDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CblSavedFileDto'
      operationId: postApiCblRepoImport
      x-operation-id-source: derived
  /api/Cbl/re-validate:
    post:
      tags:
      - Cbl
      summary: Validates an already-saved CBL file on disk.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CblReValidateRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/CblReValidateRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CblReValidateRequestDto'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CblImportSummaryDto'
            application/json:
              schema:
                $ref: '#/components/schemas/CblImportSummaryDto'
            text/json:
              schema:
                $ref: '#/components/schemas/CblImportSummaryDto'
      operationId: postApiCblReValidate
      x-operation-id-source: derived
  /api/Cbl/finalize-import:
    post:
      tags:
      - Cbl
      summary: Finalizes the import of a saved CBL file with user decisions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CblFinalizeRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/CblFinalizeRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CblFinalizeRequestDto'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CblImportSummaryDto'
            application/json:
              schema:
                $ref: '#/components/schemas/CblImportSummaryDto'
            text/json:
              schema:
                $ref: '#/components/schemas/CblImportSummaryDto'
      operationId: postApiCblFinalizeImport
      x-operation-id-source: derived
  /api/Cbl/remap-rules:
    get:
      tags:
      - Cbl
      summary: Returns all remap rules accessible to the current user (own rules +…
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RemapRuleDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RemapRuleDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RemapRuleDto'
      operationId: getApiCblRemapRules
      x-operation-id-source: derived
    post:
      tags:
      - Cbl
      summary: Creates a new remap rule, or updates an existing one if a rule with the same…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRemapRuleDto'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateRemapRuleDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateRemapRuleDto'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
            application/json:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
            text/json:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
      operationId: postApiCblRemapRules
      x-operation-id-source: derived
  /api/Cbl/remap-rules/all:
    get:
      tags:
      - Cbl
      summary: Returns all rules across all users
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RemapRuleDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RemapRuleDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RemapRuleDto'
      operationId: getApiCblRemapRulesAll
      x-operation-id-source: derived
  /api/Cbl/remap-rules/{id}/promote:
    post:
      tags:
      - Cbl
      summary: Promotes a remap rule to global scope. Admin-only
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
            application/json:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
            text/json:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
      operationId: postApiCblRemapRulesByIdPromote
      x-operation-id-source: derived
  /api/Cbl/remap-rules/{id}/demote:
    post:
      tags:
      - Cbl
      summary: Demotes a global remap rule back to user-scoped. Admin-only
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
            application/json:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
            text/json:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
      operationId: postApiCblRemapRulesByIdDemote
      x-operation-id-source: derived
  /api/Cbl/remap-rules/{id}:
    post:
      tags:
      - Cbl
      summary: Updates a remap rule with issue-level detail (volume/chapter)
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRemapRuleDto'
          text/json:
            schema:
              $ref: '#/components/schemas/UpdateRemapRuleDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/UpdateRemapRuleDto'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
            application/json:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
            text/json:
              schema:
                $ref: '#/components/schemas/RemapRuleDto'
      operationId: postApiCblRemapRulesById
      x-operation-id-source: derived
    delete:
      tags:
      - Cbl
      summary: Deletes a remap rule. Users can only delete their own rules
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: OK
      operationId: deleteApiCblRemapRulesById
      x-operation-id-source: derived
  /api/Cbl/browse:
    get:
      tags:
      - Cbl
      summary: Provides the browse CBL Repo interface. Requires Download role
      parameters:
      - name: path
        in: query
        description: ''
        schema:
          type: string
          default: ''
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CblRepoBrowseResultDto'
            application/json:
              schema:
                $ref: '#/components/schemas/CblRepoBrowseResultDto'
            text/json:
              schema:
                $ref: '#/components/schemas/CblRepoBrowseResultDto'
      operationId: getApiCblBrowse
      x-operation-id-source: derived
components:
  schemas:
    ReadingListProvider:
      enum:
      - 0
      - 1
      - 2
      type: integer
      description: 'Members:

        - `0` — File (None)

        - `1` — File

        - `2` — Url'
      format: int32
      x-enum-varnames:
      - None
      - File
      - Url
      x-enum-descriptions:
      - File
      - File
      - Url
    CblSeriesCandidate:
      type: object
      properties:
        seriesId:
          type: integer
          format: int32
        libraryId:
          type: integer
          format: int32
        seriesName:
          type:
          - string
          - 'null'
      additionalProperties: false
    UpdateRemapRuleDto:
      type: object
      properties:
        cblSeriesName:
          type:
          - string
          - 'null'
        seriesId:
          type:
          - integer
          - 'null'
          format: int32
        volumeId:
          type:
          - integer
          - 'null'
          format: int32
        chapterId:
          type:
          - integer
          - 'null'
          format: int32
        cblVolume:
          type:
          - string
          - 'null'
        cblNumber:
          type:
          - string
          - 'null'
      additionalProperties: false
    LibraryType:
      enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      type: integer
      description: 'Members:

        - `0` — Manga

        - `1` — Comic (Flexible) (Comic)

        - `2` — Book

        - `3` — Image

        - `4` — Light Novel (LightNovel)

        - `5` — Comic (ComicVine)'
      format: int32
      x-enum-varnames:
      - Manga
      - Comic
      - Book
      - Image
      - LightNovel
      - ComicVine
      x-enum-descriptions:
      - Manga
      - Comic (Flexible)
      - Book
      - Image
      - Light Novel
      - Comic
    CblRepoImportRequestDto:
      type: object
      properties:
        items:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CblRepoItemDto'
      additionalProperties: false
    CblSavedFileDto:
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
        fileName:
          type:
          - string
          - 'null'
        provider:
          $ref: '#/components/schemas/ReadingListProvider'
        repoPath:
          type:
          - string
          - 'null'
        downloadUrl:
          type:
          - string
          - 'null'
        sha:
          type:
          - string
          - 'null'
      additionalProperties: false
    CblRepoBrowseResultDto:
      type: object
      properties:
        items:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CblRepoItemDto'
        rateLimitDto:
          $ref: '#/components/schemas/GithubRateLimitDto'
        fromCache:
          type: boolean
      additionalProperties: false
    CblReValidateRequestDto:
      type: object
      properties:
        fileName:
          type:
          - string
          - 'null'
      additionalProperties: false
    CreateRemapRuleDto:
      type: object
      properties:
        cblSeriesName:
          type:
          - string
          - 'null'
        seriesId:
          type: integer
          format: int32
        cblVolume:
          type:
          - string
          - 'null'
        cblNumber:
          type:
          - string
          - 'null'
        volumeId:
          type:
          - integer
          - 'null'
          format: int32
        chapterId:
          type:
          - integer
          - 'null'
          format: int32
      additionalProperties: false
    RemapRuleDto:
      type: object
      properties:
        id:
          type: integer
          format: int32
        normalizedCblSeriesName:
          type:
          - string
          - 'null'
        cblSeriesName:
          type:
          - string
          - 'null'
        cblVolume:
          type:
          - string
          - 'null'
        cblNumber:
          type:
          - string
          - 'null'
        seriesId:
          type: integer
          format: int32
        volumeId:
          type:
          - integer
          - 'null'
          format: int32
        volumeNumber:
          type:
          - string
          - 'null'
        chapterId:
          type:
          - integer
          - 'null'
          format: int32
        kind:
          $ref: '#/components/schemas/CblRemapRuleKind'
        chapterRange:
          type:
          - string
          - 'null'
        chapterTitleName:
          type:
          - string
          - 'null'
        chapterIsSpecial:
          type: boolean
        libraryType:
          $ref: '#/components/schemas/LibraryType'
        seriesNameAtMapping:
          type:
          - string
          - 'null'
        appUserId:
          type: integer
          format: int32
        isGlobal:
          type: boolean
        createdByUserName:
          type:
          - string
          - 'null'
        createdUtc:
          type: string
          format: date-time
      additionalProperties: false
    UploadUrlDto:
      required:
      - url
      type: object
      properties:
        url:
          minLength: 1
          type: string
      additionalProperties: false
    CblImportReason:
      enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - 8
      - 9
      type: integer
      description: 'Members:

        - `0` — Chapter missing (ChapterMissing)

        - `1` — Volume missing (VolumeMissing)

        - `2` — Series missing (SeriesMissing)

        - `3` — Name Conflict (NameConflict)

        - `4` — All Series Missing (AllSeriesMissing)

        - `5` — Empty File (EmptyFile)

        - `6` — Series Collision (SeriesCollision)

        - `7` — All Chapters Missing (AllChapterMissing)

        - `8` — Success

        - `9` — Invalid File (InvalidFile)'
      format: int32
      x-enum-varnames:
      - ChapterMissing
      - VolumeMissing
      - SeriesMissing
      - NameConflict
      - AllSeriesMissing
      - EmptyFile
      - SeriesCollision
      - AllChapterMissing
      - Success
      - InvalidFile
      x-enum-descriptions:
      - Chapter missing
      - Volume missing
      - Series missing
      - Name Conflict
      - All Series Missing
      - Empty File
      - Series Collision
      - All Chapters Missing
      - Success
      - Invalid File
    CblImportSummaryDto:
      type: object
      properties:
        cblName:
          type:
          - string
          - 'null'
        fileName:
          type:
          - string
          - 'null'
        results:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CblBookResult'
        success:
          $ref: '#/components/schemas/CblImportResult'
        successfulInserts:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CblBookResult'
        isUpdate:
          type: boolean
        readingListId:
          type: integer
          format: int32
      additionalProperties: false
    GithubRateLimitDto:
      type: object
      properties:
        remaining:
          type:
          - integer
          - 'null'
          format: int32
        limit:
          type:
          - integer
          - 'null'
          format: int32
        resetsAtUtc:
          type:
          - string
          - 'null'
          format: date-time
        isLow:
          type: boolean
          readOnly: true
        isExhausted:
          type: boolean
          readOnly: true
      additionalProperties: false
    CblItemDecision:
      type: object
      properties:
        seriesId:
          type: integer
          format: int32
        volumeId:
          type: integer
          format: int32
        chapterId:
          type: integer
          format: int32
      additionalProperties: false
    CblMatchTier:
      enum:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
      - 7
      - -1
      type: integer
      description: 'Members:

        - `0` — RemapRule

        - `1` — ExternalId

        - `2` — ExactName

        - `3` — ComicVineNaming

        - `4` — ArticleStripped

        - `5` — ReprintStripped

        - `6` — AlternateSeries

        - `7` — UserDecision

        - `-1` — Unmatched'
      format: int32
      x-enum-varnames:
      - RemapRule
      - ExternalId
      - ExactName
      - ComicVineNaming
      - ArticleStripped
      - ReprintStripped
      - AlternateSeries
      - UserDecision
      - Unmatched
      x-enum-descriptions:
      - RemapRule
      - ExternalId
      - ExactName
      - ComicVineNaming
      - ArticleStripped
      - ReprintStripped
      - AlternateSeries
      - UserDecision
      - Unmatched
    CblImportResult:
      enum:
      - 0
      - 1
      - 2
      type: integer
      description: 'Members:

        - `0` — Fail

        - `1` — Partial

        - `2` — Success'
      format: int32
      x-enum-varnames:
      - Fail
      - Partial
      - Success
      x-enum-descriptions:
      - Fail
      - Partial
      - Success
    CblFinalizeRequestDto:
      type: object
      properties:
        fileName:
          type:
          - string
          - 'null'
        decisions:
          $ref: '#/components/schemas/CblImportDecisions'
        provider:
          $ref: '#/components/schemas/ReadingListProvider'
        repoPath:
          type:
          - string
          - 'null'
        downloadUrl:
          type:
          - string
          - 'null'
        sha:
          type:
          - string
          - 'null'
        promote:
          type: boolean
      additionalProperties: false
    CblBookResult:
      type: object
      properties:
        order:
          type: integer
          format: int32
        series:
          type:
          - string
          - 'null'
        volume:
          type:
          - string
          - 'null'
        number:
          type:
          - string
          - 'null'
        libraryId:
          type: integer
          format: int32
        seriesId:
          type: integer
          format: int32
        readingListName:
          type:
          - string
          - 'null'
        reason:
          $ref: '#/components/schemas/CblImportReason'
        matchTier:
          $ref: '#/components/schemas/CblMatchTier'
        chapterId:
          type: integer
          format: int32
        chapterTitle:
          type:
          - string
          - 'null'
        matchedSeriesName:
          type:
          - string
          - 'null'
        libraryType:
          $ref: '#/components/schemas/LibraryType'
        chapterNumber:
          type:
          - string
          - 'null'
        candidates:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/CblSeriesCandidate'
      additionalProperties: false
    CblImportDecisions:
      type: object
      properties:
        itemResolutions:
          type:
          - object
          - 'null'
          additionalProperties:
            $ref: '#/components/schemas/CblItemDecision'
        saveAsRemapRules:
          type: boolean
      additionalProperties: false
    CblRemapRuleKind:
      enum:
      - 0
      - 1
      - 2
      type: integer
      description: 'Members:

        - `0` — Series

        - `1` — Volume

        - `2` — Chapter'
      format: int32
      x-enum-varnames:
      - Series
      - Volume
      - Chapter
      x-enum-descriptions:
      - Series
      - Volume
      - Chapter
    CblRepoItemDto:
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
        path:
          type:
          - string
          - 'null'
        isDirectory:
          type: boolean
        sha:
          type:
          - string
          - 'null'
        size:
          type: integer
          format: int64
        downloadUrl:
          type:
          - string
          - 'null'
        existingReadingListId:
          type:
          - integer
          - 'null'
          format: int32
        alreadySynced:
          type: boolean
          readOnly: true
      additionalProperties: false
  securitySchemes:
    AuthKey:
      type: apiKey
      description: Auth Key authentication. Enter your Auth key from your user settings
      name: x-api-key
      in: header