Lookup lists
Lookup lists live under /v1/lists and are shared by every extractor in the key’s project, across test and live keys. Reading needs extractors:read, changing needs extractors:write; both are on new keys by default. What lists are for, the CSV format and the lookup() rule function are in Lookup lists.
The list object
Section titled “The list object”{ "object": "lookup_list", "id": "lst_01JE4M2V7X8Y9Z0A1B2C3D4E5F", "name": "panel", "version": 2, "row_count": 1840, "columns": ["name", "city", "tier"], "key_column": "name", "size_bytes": 61233, "created_at": "2026-12-04T09:12:40.118Z", "updated_at": "2026-12-04T12:01:03.904Z"}| Field | Type | Description |
|---|---|---|
id |
string | lst_ followed by a ULID. Stable across replaces |
name |
string | Unique per project. ^[a-z][a-z0-9_-]{0,63}$; what rules pass to lookup() |
version |
integer | 1 on create, +1 on every replace |
row_count |
integer | Data rows (header and blank lines excluded) |
columns |
string[] | Header names, in file order |
key_column |
string | The column lookup() matches against |
size_bytes |
integer | Size of the stored CSV |
created_at, updated_at |
string | updated_at moves on replace |
List lists
Section titled “List lists”GET https://api.deskew.dev/v1/lists
Scope extractors:read. Ordered by name; not paginated.
curl https://api.deskew.dev/v1/lists -H "Authorization: Bearer $DESKEW_API_KEY"{ "object": "list", "data": [ { "object": "lookup_list", "name": "panel", "version": 2, "row_count": 1840, "...": "..." } ] }Create or replace a list
Section titled “Create or replace a list”PUT https://api.deskew.dev/v1/lists/{name}
Scope extractors:write. Send the CSV either as the raw request body with Content-Type: text/csv, or as multipart/form-data with a file field. Creates the list (201) or replaces it and bumps version (200). The first row must be a header.
| Query | Default | Description |
|---|---|---|
key |
the first column | Header name of the key column (case-insensitive) |
# raw bodycurl -X PUT "https://api.deskew.dev/v1/lists/panel?key=name" \ -H "Authorization: Bearer $DESKEW_API_KEY" \ -H "Content-Type: text/csv" \ --data-binary @panel.csv
# or multipartcurl -X PUT https://api.deskew.dev/v1/lists/panel \ -H "Authorization: Bearer $DESKEW_API_KEY" \ -F "file=@panel.csv;type=text/csv"with open("panel.csv", "rb") as f: r = requests.put( f"{API}/v1/lists/panel", headers={**HEADERS, "Content-Type": "text/csv"}, params={"key": "name"}, data=f.read(), )lst = r.json() # 201 on create, 200 on replaceprint(lst["version"], lst["row_count"])import { readFile } from "node:fs/promises";
const res = await fetch(`${API}/v1/lists/panel?key=name`, { method: "PUT", headers: { ...headers, "Content-Type": "text/csv" }, body: await readFile("panel.csv"),});const list = await res.json(); // 201 on create, 200 on replace201 Created (or 200 OK on replace):
{ "object": "lookup_list", "id": "lst_01JE4M2V7X8Y9Z0A1B2C3D4E5F", "name": "panel", "version": 1, "row_count": 1840, "columns": ["name", "city", "tier"], "key_column": "name", "size_bytes": 61233, "created_at": "2026-12-04T09:12:40.118Z", "updated_at": "2026-12-04T09:12:40.118Z"}Replacing is atomic from the caller’s point of view: runs that start after the response read the new version; the previous file is removed. The engine caches a parsed list per version, so a replace is picked up on the next run without a restart.
| Status | Code | When |
|---|---|---|
| 403 | plan_limit |
Creating a list on a plan without lookup lists (feature: "lookup_lists"). Replacing an existing list is always allowed |
| 403 | insufficient_scope |
The key lacks extractors:write |
| 413 | list_too_large |
More than 100,000 rows, 5 MB or 20 columns (limit in the error) |
| 422 | validation_error |
name malformed (param: "name"), or multipart without a file field (param: "file") |
| 422 | list_invalid |
Empty file, no header, empty or duplicate header names, key not in the header, binary or undecodable content, header but no rows |
Get a list
Section titled “Get a list”GET https://api.deskew.dev/v1/lists/{name}
Scope extractors:read. Returns the list object; with download=true, the stored CSV.
| Query | Description |
|---|---|
download |
true to receive the CSV (text/csv, Content-Disposition: attachment, X-List-Version header) instead of the object |
curl https://api.deskew.dev/v1/lists/panel -H "Authorization: Bearer $DESKEW_API_KEY"curl "https://api.deskew.dev/v1/lists/panel?download=true" -H "Authorization: Bearer $DESKEW_API_KEY" -o panel.csv| Status | Code | When |
|---|---|---|
| 404 | list_not_found |
No list with that name in the project |
| 404 | file_missing |
The object exists but its file is gone from storage; upload it again |
Delete a list
Section titled “Delete a list”DELETE https://api.deskew.dev/v1/lists/{name}
Scope extractors:write. 204 No Content. Rules that call lookup() on the name are skipped from the next run on, and each such run carries a warning naming the list. Definitions are not changed and publishing is not blocked.
curl -X DELETE https://api.deskew.dev/v1/lists/panel -H "Authorization: Bearer $DESKEW_API_KEY"| Status | Code | When |
|---|---|---|
| 404 | list_not_found |
No list with that name |
Audit log
Section titled “Audit log”Every change is recorded in the organization’s audit log as list.created, list.updated (with the new version and row_count) or list.deleted, with the API key id or the dashboard user as the actor. Reading is not logged.