API
ListThingy has a small JSON API over HTTP and a WebSocket for live updates. The web app and the iPhone and Android apps all run on them, and your code can use them the same way. This page covers every endpoint.
The REST API is also described in OpenAPI 3.1, for code generators, API tools and AI assistants.
Base URL
Every path in this guide begins with /v1. On the hosted service the base URL is:
https://listthingy.sometimescode.com/v1
If you run your own server, use its address instead. See Installation.
Access
The API has no accounts and no logins. Anyone who knows a list's ID can read, change and delete the list. To share a list, send its link:
https://listthingy.sometimescode.com/list/9f86d081884c7d659a2feaa0c55ad015
Share a link only with people you trust. To guard a list further, give it a PIN. Then the link alone is not enough. See PIN-protected lists.
The server never lists every list. A client must remember the IDs of the lists it has created or opened.
Browsers may call the API from any origin. The server answers preflight OPTIONS requests with 204 and allows the Content-Type and X-List-Key headers.
Requests and responses
Send request bodies as JSON with the header Content-Type: application/json.
Every response except 204 carries a JSON body with a success field. A request that works returns its result in data:
{
"success": true,
"data": { "id": 1, "name": "Groceries" }
}
A request that fails returns a message in error:
{
"success": false,
"error": "List not found"
}
Error messages are always in English. The apps show their own translated text based on the status code.
Timestamps are UTC strings in the form YYYY-MM-DD HH:MM:SS.
Status codes
| Code | Meaning |
|---|---|
200 | The request worked. |
201 | The server created a list or an item. |
204 | The server deleted something. The body is empty. |
400 | A required field is missing, a PIN is too short or a request adds more than 100 items at once. |
401 | The list has a PIN and the request has no valid key, or an unlock sent the wrong PIN. |
403 | This address may no longer unlock this list. |
404 | The list, the item or the route does not exist. |
429 | Too many unlock attempts. Wait for the number of seconds in the Retry-After header. |
500 | The server failed. Try again later. |
Lists
A list has these fields:
| Field | Type | Notes |
|---|---|---|
id | integer | Internal number. Use uuid in URLs. |
uuid | string | 32 hex characters. This is the list's ID in every URL. |
name | string | |
protected | boolean | true when the list has a PIN. |
created_at | string | |
updated_at | string |
Create a list
POST /v1/lists
| Field | Required | Type | Default |
|---|---|---|---|
name | yes | string | |
pin | no | string | none |
A pin of 4 or more characters creates the list already locked. The response then carries this device's key in data.key. See PIN-protected lists.
curl -X POST https://listthingy.sometimescode.com/v1/lists \
-H "Content-Type: application/json" \
-d '{"name": "Groceries"}'
The server answers 201 with the new list:
{
"success": true,
"data": {
"id": 1,
"uuid": "9f86d081884c7d659a2feaa0c55ad015",
"name": "Groceries",
"protected": false,
"created_at": "2026-09-25 14:02:11",
"updated_at": "2026-09-25 14:02:11"
}
}
Save the uuid. You need it for every other call on this list.
Get a list
GET /v1/lists/{uuid}
Returns the list with its items in an items array. Done items stay in the array with the time they were checked off in checked_at. Deleted and cleared items are left out. Items are sorted by category and then newest first.
curl https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015
{
"success": true,
"data": {
"id": 1,
"uuid": "9f86d081884c7d659a2feaa0c55ad015",
"name": "Groceries",
"protected": false,
"created_at": "2026-09-25 14:02:11",
"updated_at": "2026-09-25 14:02:11",
"items": [
{
"id": 7,
"list_id": 1,
"uid": null,
"category": "Dairy",
"quantity": "2",
"name": "Milk",
"checked_at": null,
"created_at": "2026-09-25 14:03:40",
"updated_at": "2026-09-25 14:03:40",
"deleted_at": null
}
]
}
}
Rename a list
PATCH /v1/lists/{uuid}
Send a new name. The server answers 200 with the whole list, without its items.
curl -X PATCH https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015 \
-H "Content-Type: application/json" \
-d '{"name": "Weekend groceries"}'
An empty body returns 400.
Delete a list
DELETE /v1/lists/{uuid}
Deletes the list for good and answers 204. It cannot be undone.
curl -X DELETE https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015
Items
An item has these fields:
| Field | Type | Notes |
|---|---|---|
id | integer | Use this in item URLs. |
list_id | integer | The id of the list that holds the item. |
name | string | |
quantity | string or null | Free text of up to 32 characters, such as 12 oz or 6. null when nobody gave a quantity. |
category | string or null | Free text, such as Dairy. |
uid | string or null | An ID the client made for the item, or null. |
checked_at | string or null | When someone checked the item off. null while the item is still to do. |
created_at | string | |
updated_at | string | |
deleted_at | string or null | Always null in responses from GET /v1/lists/{uuid}. |
Add an item
POST /v1/lists/{uuid}/items
| Field | Required | Type | Default |
|---|---|---|---|
name | yes | string | |
quantity | no | string, up to 32 characters | null |
category | no | string | null |
uid | no | string, 1 to 64 characters | null |
curl -X POST https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/items \
-H "Content-Type: application/json" \
-d '{"name": "Milk", "quantity": "2", "category": "Dairy"}'
The server answers 201 with the new item.
A uid is an ID your client makes for the item, such as a random UUID. It makes a retry safe. If the list already has an item with the same uid, the server adds nothing and answers 201 with the existing item. A client that queues changes while offline can send them again without making duplicates.
Add several items at once
POST /v1/lists/{uuid}/items/bulk
This call adds up to 100 items in one request. Send either items or text in the body, not both.
items is an array. Each entry takes the same fields as a single item. name is required. quantity and category are optional.
curl -X POST https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/items/bulk \
-H "Content-Type: application/json" \
-d '{"items": [{"name": "Milk", "quantity": "2", "category": "Dairy"}, {"name": "Eggs", "quantity": "12"}]}'
text is plain text with one item per line. Use it for a list copied from a note, an email or an AI chat. The server reads each line this way:
- It skips blank lines.
- It removes a list marker at the start of the line, such as
-,*,•,1.,1)or a checkbox like[ ]or[x]. - It keeps the rest of the line as the item's name. It does not look for quantities, so
2 dozen eggsbecomes an item named2 dozen eggswith no quantity.
A category sent with text applies to every line.
curl -X POST https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/items/bulk \
-H "Content-Type: application/json" \
-d '{"text": "- Milk\n- Eggs\n- Bread", "category": "Groceries"}'
The server answers 201 with an array of the new items in the order they were sent. The request succeeds or fails as a whole. If an entry has no name, if the request holds more than 100 items or if it sends both items and text, the server answers 400 and adds nothing.
Change an item
PATCH /v1/lists/{uuid}/items/{id}
Send the fields to change: name, quantity, category, checked or any mix of them. The server answers 200 with the whole item.
curl -X PATCH https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/items/7 \
-H "Content-Type: application/json" \
-d '{"quantity": "3"}'
A field sent as null keeps its old value. An empty quantity or category removes it from the item. A number sent as quantity, such as 2, is stored as the text "2". An empty body returns 400.
Check off an item
Send {"checked": true} to the same PATCH call. The item stays on the list, and its checked_at shows when it was checked off. The apps cross out done items or hide them, as each person prefers.
curl -X PATCH https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/items/7 \
-H "Content-Type: application/json" \
-d '{"checked": true}'
Send {"checked": false} to put the item back on the list. Checking an item that is already done keeps its first checked_at.
Clear done items
DELETE /v1/lists/{uuid}/items/checked
Deletes every checked item on the list and answers 204. The items disappear for everyone who has the list open.
curl -X DELETE https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/items/checked
Delete an item
DELETE /v1/lists/{uuid}/items/{id}
Removes one item from the list, done or not, and answers 204.
curl -X DELETE https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/items/7
The server keeps the row and sets its deleted_at time. The item no longer appears in the list, and a second delete returns 404. The API has no call to restore it.
Item suggestions
GET /v1/lists/{uuid}/suggestions
Returns every item name the list has held, including items that were checked off, cleared or deleted. The apps use it to suggest names as someone types and to fill in the category that an item had last time.
curl https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/suggestions
{
"success": true,
"data": [
{
"name": "Milk",
"category": "Dairy",
"quantity": "2",
"uses": 5,
"last_used_at": "2026-09-25 14:03:40"
}
]
}
Names that differ only in capital letters count as one. Each entry carries the category and quantity from the latest time the name was added or changed, how often it was used in uses, and when in last_used_at. The most used names come first, and among those the most recent.
PIN-protected lists
A PIN locks a list. Without a valid key, every call on the list fails with 401 PIN required. That covers reading, changing, deleting and live updates. A PIN is any text of 4 or more characters, so a passphrase works too.
A device trades the PIN for a key once and sends the key from then on. The key lasts until someone changes or removes the PIN. Store the key on the device. Never store the PIN.
Send the key
Add the key to every request for a locked list:
curl https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015 \
-H "X-List-Key: 3q2-7wEAAAAB9u2xT0kz1w"
Lists without a PIN ignore the header.
Unlock a list
POST /v1/lists/{uuid}/unlock
| Field | Required | Type |
|---|---|---|
pin | yes | string |
curl -X POST https://listthingy.sometimescode.com/v1/lists/9f86d081884c7d659a2feaa0c55ad015/unlock \
-H "Content-Type: application/json" \
-d '{"pin": "blue tractor soup"}'
The right PIN returns 200 with a key:
{
"success": true,
"data": { "key": "3q2-7wEAAAAB9u2xT0kz1w" }
}
A wrong PIN returns 401 with the error Wrong PIN. A list without a PIN has nothing to unlock and returns 400.
Set or change a PIN
PUT /v1/lists/{uuid}/pin
| Field | Required | Type |
|---|---|---|
pin | yes | string, 4 or more characters |
Anyone who can open the list may set or change its PIN. To change a PIN, send the current key with the request. The server answers 200 with a new key for this device, like an unlock. Every other key stops working, and every other device must enter the new PIN.
A PIN shorter than 4 characters returns 400.
Remove a PIN
DELETE /v1/lists/{uuid}/pin
Send the current key. The server answers 204, and the list opens with its link alone again.
Wrong guesses
The server counts wrong PINs for each address on each list.
- An address may try once per second. A faster try returns
429. - After 3 wrong PINs, the address must wait 15 minutes. Tries during the wait return
429. - After 3 more, it must wait 30 minutes.
- After 3 more, it may never unlock that list again. Every try returns
403.
Every 429 carries a Retry-After header with the seconds left to wait. A right PIN resets the count. The block covers only the one list, so the same address can still open other lists.
Live updates
A WebSocket tells your client the moment someone changes a list. It carries news of changes, not the changes themselves. When a message arrives, fetch the list again with GET /v1/lists/{uuid}.
The WebSocket only listens. Every change still goes through the REST endpoints above.
Connect and join a list
Open a WebSocket to /ws/ on the same host as the API:
wss://listthingy.sometimescode.com/ws/
Then send a join message with the list's ID:
{"action": "join", "list_uuid": "9f86d081884c7d659a2feaa0c55ad015"}
For a list with a PIN, add the key:
{"action": "join", "list_uuid": "9f86d081884c7d659a2feaa0c55ad015", "key": "3q2-7wEAAAAB9u2xT0kz1w"}
The server confirms:
{"event": "joined", "list_uuid": "9f86d081884c7d659a2feaa0c55ad015"}
If the list has a PIN and the key is missing or stale, the server refuses:
{"event": "denied", "list_uuid": "9f86d081884c7d659a2feaa0c55ad015"}
The server ignores any message it does not understand.
Events
After you join, the server sends a message each time the list changes:
{"event": "item.created", "list_uuid": "9f86d081884c7d659a2feaa0c55ad015"}
| Event | Sent when someone |
|---|---|
item.created | adds an item |
item.updated | changes, checks off or unchecks an item |
item.deleted | deletes an item or clears done items |
list.updated | renames the list |
list.pin_changed | sets, changes or removes the PIN |
list.deleted | deletes the list |
Adding several items at once sends a single item.created event, however many items it adds.
Your own changes come back to you as events too. After list.deleted, stop showing the list; a fetch will return 404.
After list.pin_changed, the server drops every connection from the list. Fetch the list. If the fetch works, join again. If it returns 401, ask for the PIN.
Stay connected
The server pings each connection every 30 seconds and closes any that stop answering. Browsers and most WebSocket libraries answer pings on their own.
Connections drop when a phone sleeps or a network changes. When yours drops, reconnect, send join again and fetch the list. You may have missed events while you were away. Wait a little longer between each attempt so a down server is not flooded.
Example
const uuid = '9f86d081884c7d659a2feaa0c55ad015';
const key = localStorage.getItem(`key:${uuid}`);
let delay = 1000;
function connect() {
const ws = new WebSocket('wss://listthingy.sometimescode.com/ws/');
ws.onopen = () => {
delay = 1000;
ws.send(JSON.stringify({action: 'join', list_uuid: uuid, key}));
refresh();
};
ws.onmessage = (message) => {
const {event} = JSON.parse(message.data);
if (event !== 'joined') refresh();
};
ws.onclose = () => {
setTimeout(connect, delay);
delay = Math.min(delay * 2, 30000);
};
}
async function refresh() {
const headers = key ? {'X-List-Key': key} : {};
const res = await fetch(`https://listthingy.sometimescode.com/v1/lists/${uuid}`, {headers});
if (res.status === 401) {
// Ask for the PIN
return;
}
const {data} = await res.json();
// Draw data.items
}
connect();
When two people edit at once
The last change to reach the server wins. If two people rename the same item at the same moment, the item keeps whichever name arrived second. Both clients then fetch the list and show the same result.
Limits
Only unlocks are rate limited. See Wrong guesses. Please be kind to the hosted service anyway. Use live updates instead of fetching a list over and over.
A request to add several items at once takes at most 100 items. Split a longer list into several requests.