> For the complete documentation index, see [llms.txt](https://sugoi.gitbook.io/lanraragi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sugoi.gitbook.io/lanraragi/api-documentation/tankoubon-api.md).

# Tankoubon API

## Get all Tankoubons

> Get list of Tankoubons paginated.

```json
{"openapi":"3.1.0","info":{"title":"LANraragi API","version":"0.9.6"},"tags":[{"name":"tankoubons","description":"Endpoints related to Tankoubons."}],"servers":[{"url":"https://lrr.tvc-16.science/api"}],"paths":{"/tankoubons":{"get":{"operationId":"getTankoubonList","summary":"Get all Tankoubons","description":"Get list of Tankoubons paginated.","tags":["tankoubons"],"parameters":[{"name":"page","in":"query","required":false,"description":"Page of the list of Tankoubons.  \nThe amount of tanks per page depends on the server `archives_per_page` setting.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Tankoubons","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/TankoubonMetadataJson"}},"total":{"type":"integer","description":"Total count of Tankoubons on the server"},"filtered":{"type":"integer","description":"Number of Tankoubons on the current page"}}}}}}}}}},"components":{"schemas":{"TankoubonMetadataJson":{"type":"object","description":"Tankoubon metadata as returned by the list endpoint","required":["id"],"properties":{"id":{"type":"string","description":"ID of the tankoubon"},"name":{"type":"string","description":"Name of the tankoubon"},"summary":{"type":"string","description":"Summary of the tankoubon"},"tags":{"type":"string","description":"Tags associated with the tankoubon"},"archives":{"type":"array","description":"Array of archive IDs","items":{"type":"string","minLength":40,"maxLength":40}},"progress":{"type":"integer","description":"Reading progress (page number) for this Tankoubon"}}}}}}
```

## 🔑 Create a Tankoubon

> Create a new Tankoubon or update the name of an existing one.

```json
{"openapi":"3.1.0","info":{"title":"LANraragi API","version":"0.9.6"},"tags":[{"name":"tankoubons","description":"Endpoints related to Tankoubons."}],"servers":[{"url":"https://lrr.tvc-16.science/api"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header","description":"Use Authorization: Bearer <base64(api_key)>"}},"schemas":{"OperationResponse":{"type":"object","required":["operation","success"],"properties":{"operation":{"type":"string","description":"Name of operation"},"error":{"type":"string","description":"Error message if any"},"successMessage":{"type":"string","description":"Success message if any"},"success":{"type":"integer","description":"Returns 1 if operation was successful, else 0","enum":[0,1]}}}}},"paths":{"/tankoubons":{"put":{"operationId":"createTankoubon","summary":"🔑 Create a Tankoubon","description":"Create a new Tankoubon or update the name of an existing one.","tags":["tankoubons"],"requestBody":{"required":false,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the Tankoubon"},"tankid":{"type":"string","description":"ID of an existing Tankoubon, if you want to change its name."}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the Tankoubon"},"tankid":{"type":"string","description":"ID of an existing Tankoubon, if you want to change its name."}}}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"string","enum":["create_tankoubon"]},"tankoubon_id":{"type":"string","description":"ID of the created/modified Tankoubon"},"success":{"type":"integer","enum":[0,1]}}}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}}}}}}}
```

## Get a single Tankoubon

> Get the details of the specified tankoubon ID.

```json
{"openapi":"3.1.0","info":{"title":"LANraragi API","version":"0.9.6"},"tags":[{"name":"tankoubons","description":"Endpoints related to Tankoubons."}],"servers":[{"url":"https://lrr.tvc-16.science/api"}],"paths":{"/tankoubons/{id}":{"get":{"operationId":"getTankoubon","summary":"Get a single Tankoubon","description":"Get the details of the specified tankoubon ID.","tags":["tankoubons"],"responses":{"200":{"description":"Tankoubon","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID of this Tankoubon."},"name":{"type":"string","description":"Name of this Tankoubon."},"summary":{"type":"string"},"tags":{"type":"string"},"archives":{"type":"array","description":"Full list of archive IDs contained in this Tankoubon.","items":{"type":"string","oneOf":[{"minLength":40,"maxLength":40,"pattern":"^[0-9a-f]{40}$"},{"minLength":15,"maxLength":15,"pattern":"^TANK_[0-9]{10}$"}]},"uniqueItems":true},"progress":{"type":"integer","description":"Reading progress (page number) for this Tankoubon."}}}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}}}}}},"components":{"schemas":{"OperationResponse":{"type":"object","required":["operation","success"],"properties":{"operation":{"type":"string","description":"Name of operation"},"error":{"type":"string","description":"Error message if any"},"successMessage":{"type":"string","description":"Success message if any"},"success":{"type":"integer","description":"Returns 1 if operation was successful, else 0","enum":[0,1]}}}}}}
```

## 🔑 Update Tankoubon metadata/contents

> Modify the full metadata (name, summary, additional tags) or the contents of a Tankoubon.  \
> If you only need to change the name of Tank, consider just using PUT \`/api/tankoubons\`.  \
> \
> Note: If there is no need to update something in one of the \`data\` keys, do not send the key -- This otherwise can result in unwanted results.

```json
{"openapi":"3.1.0","info":{"title":"LANraragi API","version":"0.9.6"},"tags":[{"name":"tankoubons","description":"Endpoints related to Tankoubons."}],"servers":[{"url":"https://lrr.tvc-16.science/api"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header","description":"Use Authorization: Bearer <base64(api_key)>"}},"schemas":{"OperationResponse":{"type":"object","required":["operation","success"],"properties":{"operation":{"type":"string","description":"Name of operation"},"error":{"type":"string","description":"Error message if any"},"successMessage":{"type":"string","description":"Success message if any"},"success":{"type":"integer","description":"Returns 1 if operation was successful, else 0","enum":[0,1]}}}}},"paths":{"/tankoubons/{id}":{"put":{"operationId":"updateTankoubon","summary":"🔑 Update Tankoubon metadata/contents","description":"Modify the full metadata (name, summary, additional tags) or the contents of a Tankoubon.  \nIf you only need to change the name of Tank, consider just using PUT `/api/tankoubons`.  \n\nNote: If there is no need to update something in one of the `data` keys, do not send the key -- This otherwise can result in unwanted results.","tags":["tankoubons"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the Tankoubon to update.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Json with 2 optional keys \"archives\" and \"metadata\"","content":{"application/json":{"schema":{"type":"object","properties":{"archives":{"description":"Ordered array with the IDs of the archives.","type":"array","items":{"type":"string","minLength":40,"maxLength":40}},"metadata":{"description":"Metadata parameters -- All are optional.","type":"object","properties":{"name":{"type":"string","description":"Name of the Tankoubon"},"summary":{"type":"string","description":"Summary of the Tankoubon"},"tags":{"type":"string","description":"Additional tags for the Tankoubon, in LRR comma-separated format. This will replace whatever additional tags the Tank already has, unless append=true."},"append":{"type":"boolean","description":"If true, tags are appended to the Tank's existing own tags instead of replacing them. Defaults to false."}}}}}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}},"423":{"description":"The Tankoubon is currently locked for modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}}}}}}}
```

## 🔑 Delete Tankoubon

> Remove a Tankoubon from the server. This doesn't delete underlying Archives.

```json
{"openapi":"3.1.0","info":{"title":"LANraragi API","version":"0.9.6"},"tags":[{"name":"tankoubons","description":"Endpoints related to Tankoubons."}],"servers":[{"url":"https://lrr.tvc-16.science/api"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header","description":"Use Authorization: Bearer <base64(api_key)>"}},"schemas":{"OperationResponse":{"type":"object","required":["operation","success"],"properties":{"operation":{"type":"string","description":"Name of operation"},"error":{"type":"string","description":"Error message if any"},"successMessage":{"type":"string","description":"Success message if any"},"success":{"type":"integer","description":"Returns 1 if operation was successful, else 0","enum":[0,1]}}}}},"paths":{"/tankoubons/{id}":{"delete":{"operationId":"deleteTankoubon","summary":"🔑 Delete Tankoubon","description":"Remove a Tankoubon from the server. This doesn't delete underlying Archives.","tags":["tankoubons"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}},"423":{"description":"The Tankoubon is currently locked for modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}}}}}}}
```

## 🔑 Add an Archive to a Tankoubon

> Append an archive at the final position of a Tankoubon.

```json
{"openapi":"3.1.0","info":{"title":"LANraragi API","version":"0.9.6"},"tags":[{"name":"tankoubons","description":"Endpoints related to Tankoubons."}],"servers":[{"url":"https://lrr.tvc-16.science/api"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header","description":"Use Authorization: Bearer <base64(api_key)>"}},"schemas":{"OperationResponse":{"type":"object","required":["operation","success"],"properties":{"operation":{"type":"string","description":"Name of operation"},"error":{"type":"string","description":"Error message if any"},"successMessage":{"type":"string","description":"Success message if any"},"success":{"type":"integer","description":"Returns 1 if operation was successful, else 0","enum":[0,1]}}}}},"paths":{"/tankoubons/{id}/{archive}":{"put":{"operationId":"addToTankoubon","summary":"🔑 Add an Archive to a Tankoubon","description":"Append an archive at the final position of a Tankoubon.","tags":["tankoubons"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the Tankoubon to update.","schema":{"type":"string"}},{"name":"archive","in":"path","required":true,"description":"ID of the Archive to append.","schema":{"type":"string","minLength":40,"maxLength":40}}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}},"423":{"description":"The Tankoubon is currently locked for modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}}}}}}}
```

## DELETE /tankoubons/{id}/{archive}

> 🔑 Remove an Archive from a Tankoubon

```json
{"openapi":"3.1.0","info":{"title":"LANraragi API","version":"0.9.6"},"tags":[{"name":"tankoubons","description":"Endpoints related to Tankoubons."}],"servers":[{"url":"https://lrr.tvc-16.science/api"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header","description":"Use Authorization: Bearer <base64(api_key)>"}},"schemas":{"OperationResponse":{"type":"object","required":["operation","success"],"properties":{"operation":{"type":"string","description":"Name of operation"},"error":{"type":"string","description":"Error message if any"},"successMessage":{"type":"string","description":"Success message if any"},"success":{"type":"integer","description":"Returns 1 if operation was successful, else 0","enum":[0,1]}}}}},"paths":{"/tankoubons/{id}/{archive}":{"delete":{"operationId":"removeFromTankoubon","summary":"🔑 Remove an Archive from a Tankoubon","tags":["tankoubons"],"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the Tankoubon to update.","schema":{"type":"string"}},{"name":"archive","in":"path","required":true,"description":"ID of the Archive to remove.","schema":{"type":"string","minLength":40,"maxLength":40}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}},"423":{"description":"The Tankoubon is currently locked for modification","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sugoi.gitbook.io/lanraragi/api-documentation/tankoubon-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
