🍿 @lorenzopant/tmdb

Create

Create a new v4 list owned by the authenticated user.

Creates a new v4 list. The authenticated user becomes the owner. The returned id is required for all subsequent list operations.

async create(body: V4CreateListBody): Promise<V4CreateListResponse>

TMDB Reference: Create List

Parameters

NameTypeRequiredDescription
namestring✅Display name of the list.
iso_639_1string✅ISO 639-1 language code for the list (e.g. "en").
descriptionstring❌Optional description text.
publicboolean❌Whether the list is publicly visible. Defaults to true.

Returns

V4CreateListResponse

Errors

HTTPTMDB codeCause
4013Invalid or missing access token.
42222Invalid request body parameters.

Example

import { TMDB } from "@lorenzopant/tmdb";

const tmdb = new TMDB("your-access-token");

const { id, success } = await tmdb.v4.lists.create({
	name: "My Watchlist",
	iso_639_1: "en",
	description: "Movies and shows I want to watch",
	public: false,
});

console.log(id); // e.g. 8700 — use this for subsequent calls

On this page