Skip to content

Editor API

Implement these endpoints to support the in-app editor in Mankai.

This API extends the Mankai Compatible API, which defines shared types such as Manga, Chapter, Status, and Genre.

Insert or update a manga entry. If the request body’s id field is omitted, the server should generate a new ID. Otherwise, update the existing manga with that ID.

Request body

interface MangaRequest {
id?: string // Omit for new manga — the server may generate its own ID.
title?: string
status?: Status
description?: string
authors: string[]
genres: Genre[]
remarks?: string
}

Response — 200 OK

interface MangaResponse {
id: string
}

Delete a manga and all of its associated chapter groups, chapters, and images.

Path parameters

Parameter Type Description
id string The manga’s ID.

Insert or update the cover image for a manga. Send the raw image bytes in the request body. The server should infer the format from the request’s Content-Type header, such as image/png or image/jpeg.

Path parameters

Parameter Type Description
id string The manga’s ID.

Request body

Raw image data, such as PNG or JPEG.

A chapter group is a named container for a set of related chapters (for example, a “Season 1” group, or chapters belonging to the same scanlation team).

Insert or update a chapter group. Omit id to create a new group. Otherwise, update the existing group with that ID.

Request body

interface ChapterGroupRequest {
id?: string // Omit to create a new chapter group.
mangaId: string
title: string
}

Delete a chapter group and all of its chapters and images.

Path parameters

Parameter Type Description
id string The chapter group’s ID.

Retrieve the ordered list of chapters that belong to a chapter group.

Path parameters

Parameter Type Description
id string The chapter group’s ID.

Response — 200 OK

type ChaptersResponse = Chapter[]
interface Chapter {
id: string
title?: string
locked?: boolean
}

Insert or update a chapter. Omit id to create a new chapter. Otherwise, update the existing chapter with that ID.

Request body

interface ChapterUpsertRequest {
id?: string // Omit to create a new chapter.
title: string
chapterGroupId: string
}

Delete a chapter and all of its associated images.

Path parameters

Parameter Type Description
id string The chapter’s ID.

Set the order of chapters within a chapter group. The request body is an ordered list of chapter IDs — the first ID becomes the first chapter, the second becomes the second, and so on.

Request body

type ChapterOrderRequest = string[] // Ordered list of chapter IDs

Append images to the end of a chapter. Each entry in the images array should be a base64-encoded image.

Path parameters

Parameter Type Description
id string The chapter’s ID.

Request body

interface ChapterImagesRequest {
images: string[] // Array of image data, each encoded in base64.
}

Delete one or more images by their full URLs. Use this when removing pages from a chapter or cleaning up orphaned images.

Request body

type DeleteImagesRequest = string[] // List of image URLs to delete.

Set the order of images within a chapter. The request body is an ordered list of image URLs — the first URL becomes the first image, the second becomes the second, and so on.

Request body

type ImageOrderRequest = string[] // Ordered list of image URLs.