# Add Manga to Lists

You can add Manga to:

  • Your Reading List to keep track of your reading library
  • Your Follows List to receive updates about new chapters
  • Your own Custom Lists to group Manga that you find similar in any form

# Adding Manga to a Reading List

 POST /manga/{id}/status

There are six kinds of reading lists, each with a straightforward meaning:

  • Reading
  • On Hold
  • Dropped
  • Plan to Read
  • Completed
  • Re-Reading
# Request

Let's add the manga Ichijou-San Wa Kao Ni Deyasui to a reading list as "reading."

manga_id = "bbdaa3a3-ea49-4f12-9e1c-baa452f0830d"
status = "reading"
session_token = "somesessiontoken"
import requests

base_url = "https://api.mangadex.org"

r = requests.post(
    f"{base_url}/manga/{manga_id}/status",
    headers={
        "Authorization": f"Bearer {session_token}"
    },
    json={"status": status},
)

print(r.json()["result"])
const mangaID = 'bbdaa3a3-ea49-4f12-9e1c-baa452f0830d';
const status = 'reading';
const sessionToken = 'somesessiontoken';
const axios = require('axios');

const baseUrl = 'https://api.mangadex.org';

const resp = await axios({
    method: 'POST',
    url: `${baseUrl}/manga/${mangaID}/status`,
    headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${sessionToken}`
    },
    data: {
        status: status
    }
});

console.log(resp.data.result);

# Adding Manga to the Follows List

 POST /manga/{id}/follow

To receive updates on your feed when a new chapter is uploaded, you need to add the Manga to your Follows List.

# Request

Let's add the manga Alma-Chan Wants to Be a Family to our Follows List.

manga_id = "a37d2a4a-6caa-4ff3-84fe-f137f97b207c"
session_token = "somesessiontoken"
import requests

base_url = "https://api.mangadex.org"

r = requests.post(
    f"{base_url}/manga/{manga_id}/follow",
    headers={
        "Authorization": f"Bearer {session_token}"
    },
)

print(r.json()["result"])
const mangaID = 'a37d2a4a-6caa-4ff3-84fe-f137f97b207c';
const sessionToken = 'somesessiontoken';
const axios = require('axios');

const baseUrl = 'https://api.mangadex.org';

const resp = await axios({
    method: 'POST',
    url: `${baseUrl}/manga/${mangaID}/follow`,
    headers: {
        'Authorization': `Bearer ${sessionToken}`
    }
});

console.log(resp.data.result);

# Adding Manga to a Custom List

To add a Manga into our Custom List, we first need to create that List.

# Creating and populating the Custom List

 POST /list

To create our Custom List, we need to decide on a name, and its visibility.

# Request

Our Custom List's name shall be "Hidden Gems" and it shall be visible to the public.

options = {
    "name": "Hidden Gems",
    "visibility": "public",
}
session_token = "somesessiontoken"
import requests

base_url = "https://api.mangadex.org"

r = requests.post(
    f"{base_url}/list",
    headers={
        "Authorization": f"Bearer {session_token}"
    },
    json=options,
)

print(
    "List created with ID:",
    r.json()["data"]["id"],
)
const options = {
    name: 'Hidden Gems',
    visibility: 'public'
};
const sessionToken = 'somesessiontoken';
const axios = require('axios');

const baseUrl = 'https://api.mangadex.org';

const resp = await axios({
    method: 'POST',
    url: `${baseUrl}/list`,
    headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${sessionToken}`
    },
    data: options
});

console.log('List created with ID:', resp.data.data.id);

# Updating the Manga in the Custom List

 PUT /list/{id}

Now that our Custom List has been created, and we have its ID, we can start updating what Manga it contains.

# Request

We start by fetching the List and storing the Manga it contains.

list_id = "e1d40cf9-33e9-4e80-a64c-7354d4c520d3"
session_token = "somesessiontoken"
import requests

base_url = "https://api.mangadex.org"

r = requests.get(
    f"{base_url}/list/{list_id}",
    headers={
        "Authorization": f"Bearer {session_token}"
    },
)

manga_ids = [
    relationship["id"]
    for relationship in r.json()["data"]["relationships"]
    if relationship["type"] == "manga"
]

version = r.json()["data"]["attributes"]["version"]

Then, we update the List locally.

manga_ids_to_add = [
    "bbdaa3a3-ea49-4f12-9e1c-baa452f0830d",
    "8c21fe3b-4fe6-4f11-b51b-ced00d8aec60",
]

manga_ids_to_remove = [
    "719f4514-76c1-4efd-b7a1-331fa1e42eb6"
]

new_manga_ids = [
                    manga
                    for manga in manga_ids
                    if manga
                       not in (manga_ids_to_add + manga_ids_to_remove)
                ] + manga_ids_to_add

Finally, we send the request to update the List.

r = requests.put(
    f"{base_url}/list/{list_id}",
    headers={
        "Authorization": f"Bearer {session_token}"
    },
    json={
        "manga": new_manga_ids,
        "version": version,
    },
)

print(r.json()["result"])

We start by fetching the List and storing the Manga it contains.

const listID = 'e1d40cf9-33e9-4e80-a64c-7354d4c520d3'
const sessionToken = 'somesessiontoken';
const axios = require('axios');

const baseUrl = 'https://api.mangadex.org';

const resp = await axios({
    method: 'GET',
    url: `${baseUrl}/list/${listID}`,
    headers: {
        'Authorization': `Bearer ${sessionToken}`
    }
});

const mangaIDs = resp.data.data.relationships
    .filter(item => item.type === 'manga')
    .map(manga => manga.id);

const version = resp.data.data.attributes.version;

Then, we update the List locally.

const mangaIDsToAdd = [
    'bbdaa3a3-ea49-4f12-9e1c-baa452f0830d',
    '8c21fe3b-4fe6-4f11-b51b-ced00d8aec60'
];

const mangaIDsToRemove = [
    '719f4514-76c1-4efd-b7a1-331fa1e42eb6'
];

const newMangaIDs = mangaIDs.filter(manga => !mangaIDsToAdd
    .concat(mangaIDsToRemove)
    .includes(manga)
).concat(mangaIDsToAdd);

Finally, we send the request to update the List.

const resp = await axios({
    method: 'PUT',
    url: `${baseUrl}/list/${listID}`,
    headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${sessionToken}`
    },
    data: {
        manga: newMangaIDs,
        version: version
    }
});

console.log(resp.data.result);