Create new items for a specific list and related lists. Items will be added to the item set associated with the list.
Take the list id from the url on the Make a List page for your list. Your topic id can be taken from the url on your lists page. It will look something like “oliver-user”.
curl -X POST "<https://unduel.com/api/v1/list/create-items?user=><user name>" \\
-H "X-API-Key: <api key>" \\
-H "Content-Type: application/json" \\
-d '{
"listId": "<list id>",
"topicId": "<topic id>",
"items": [
{
"id": "",
"name": "Item Name",
"subtitle": "Item Subtitle",
"nameRef": "",
"imageUrl": "<https://example.com/image.jpg>",
"imageWidth": 300,
"imageHeight": 300,
"pixelated": false,
"description": "Item description",
"tags": ["tag1", "tag2"],
"properties": {"key": "value"},
"source": "<https://source.com>",
"wikiUrl": "<https://wiki.com/item>",
"isEdited": false,
"isArchived": false,
"shouldDelete": false,
"shouldResetRankings": false
}
]
}'
interface CreateItemsRequestBody {
listId: string;
topicId: string;
items: EditableItem[];
}
interface EditableItem {
/** Item ID (can be empty string for new items) */
id: string;
/** Item name */
name: string;
/** Optional subtitle */
subtitle: string | null;
/** URL-safe slug (can be empty, will be auto-generated) */
nameRef: string;
/** Image URL */
imageUrl: string | null;
/** Image dimensions */
imageWidth: number | null;
imageHeight: number | null;
/** Is the image pixel art? */
pixelated: boolean | null;
/** Item description */
description: string | null;
/** Array of tag names to apply for filtering */
tags: string[];
/** Custom properties as key-value pairs */
properties: { [key: string]: string };
/** Source of information for item */
source: string | null;
/** Wiki url for more info on item */
wikiUrl: string | null;
/** Ignored during creation */
isEdited: boolean;
/** Set to true to archive item */
isArchived: boolean;
/** Ignored during creation */
shouldDelete: boolean;
/** Ignored during creation */
shouldResetRankings: boolean;
}
interface CreateItemsResponse {
success: boolean;
message?: string;
error?: string;
}