---
title: "Create a lookup table in the draft"
method: POST
path: "/api/policy_version/draft/lookup_tables"
tags: ["Policy Versions"]
---

# Create a lookup table in the draft

`POST /api/policy_version/draft/lookup_tables`

## Request

- Base URL: `https://app.herondata.io`
- URL: `https://app.herondata.io/api/policy_version/draft/lookup_tables`
- Auth: API key in header `x-api-key`

Create a lookup table and pin its first version in the draft policy version.

## Query parameters

- `user_id` integer

## Request body

- LookupTableCreateSchema
  - `change_description` string, nullable
  - `definition` object, required
  - `name` string, required

## Response `201`

Created

- object
  - `lookup_table` LookupTableSchema
    - `definition` unknown
    - `heron_id` string, required: Heron ID of the lookup table
    - `is_draft` boolean, required: True while the version can still be edited
    - `name` string, required
    - `version` integer, required: The table version this policy version pins

## Other responses

- `404`: No draft policy version
- `422`: The table is invalid. `errors` lists every problem with the path of the field it belongs to, a stable code and a message.

## Changes

- **2026-11-03** `bd8008e49534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/herondata/apis/heron-data-api/changes/api/policy_version/draft/lookup_tables/post.md)

---

[API](https://skmtc.dev/herondata/apis/heron-data-api.md) - [All operations](https://skmtc.dev/herondata/apis/heron-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/herondata/apis/heron-data-api/revisions/1ec936e17fef?raw)
