Skip to content

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.

{
"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

GET https://api.deskew.dev/v1/lists

Scope extractors:read. Ordered by name; not paginated.

Terminal window
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, "...": "..." } ] }

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)
Terminal window
# raw body
curl -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 multipart
curl -X PUT https://api.deskew.dev/v1/lists/panel \
-H "Authorization: Bearer $DESKEW_API_KEY" \
-F "file=@panel.csv;type=text/csv"

201 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 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
Terminal window
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 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.

Terminal window
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

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.