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
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Display name of the list. |
iso_639_1 | string | ✅ | ISO 639-1 language code for the list (e.g. "en"). |
description | string | ❌ | Optional description text. |
public | boolean | ❌ | Whether the list is publicly visible. Defaults to true. |
Returns
Errors
| HTTP | TMDB code | Cause |
|---|---|---|
| 401 | 3 | Invalid or missing access token. |
| 422 | 22 | Invalid 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