---
title: "Create LookupTableRevision"
method: POST
path: "/organizations/{orgId}/lookuptables/{lookupTableId}/revisions"
tags: ["LookupTableRevision"]
---

# Create LookupTableRevision

`POST /organizations/{orgId}/lookuptables/{lookupTableId}/revisions`

## Request

- Base URL: `https://api.m3ter.com`
- URL: `https://api.m3ter.com/organizations/{orgId}/lookuptables/{lookupTableId}/revisions`
- Auth: OAuth 2
  - Authorization code: `https://m3ter.auth.us-east-1.amazoncognito.com/oauth2/authorize`, token URL `https://m3ter.auth.us-east-1.amazoncognito.com/oauth2/token`
  - Client credentials, token URL `/oauth/token`
- TypeScript: <https://skmtc.dev/m3ter-com/apis/m3ter-api/docs/organizations/:orgId/lookuptables/:lookupTableId/revisions/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new Revision for a Lookup Table.

Fields and Keys for Revision schema: Use the `fields` parameter to define a Revision schema containing up to 10 number or string fields. Use the `keys` parameter to specify which are the key fields:
* At least one field must be a non-key field and at least one a key field.
* Up to 5 key fields can be defined.
* Using multiple key fields: ensure that the order in which they are defined matches the order in which you want to use them in any Lookup functions that reference the Revision's Lookup Table, because this is the order in which they will be passed into the function. The order of non-key fields is not constrained in this way.

Revision status: when you first create a Lookup Table Revision it has DRAFT status. Use the [Update LookupTableRevision Status](https://docs.m3ter.com/api/lookuptablerevision/update-lookuptablerevision-status) call to change a Revision's status.

## Path parameters

- `orgId` string, required
- `lookupTableId` string, required

## Request body

- LookupTableRevisionRequest
  - `name` string, required: Descriptive name for the Lookup Table Revision.
  - `startDate` string, date-time: The start date of the Lookup Table Revision.
  - `fields` LookupTableRevisionField[], required: The list of fields of the Lookup Table Revision.
    - `name` string: The name of the field
    - `type` 'STRING' | 'NUMBER', required: Type of a Lookup Table Revision Field
  - `keys` string[], required: The ordered keys of the Lookup Table Revision.
  - `version` integer: The version number of the entity: - **Create entity:** Not valid for initial insertion of new entity - *do not use for Create*. On initial Create, version is set at 1 and listed in the response. - **Update Entity:** On Update, version is required and must match the existing version because a check is performed to ensure sequential versioning is preserved. Version is incremented by 1 and listed in the response.
  - `customFields` object: User defined fields enabling you to attach custom data. The value for a custom field can be either a string or a number. If `customFields` can also be defined for this entity at the Organizational level, `customField` values defined at individual level override values of `customFields` with the same name defined at Organization level. See [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields) in the m3ter documentation for more information.

## Response `200`

Returns the created Lookup Table Revision

- LookupTableRevisionResponse
  - `name` string: The name of the Lookup Table Revision.
  - `status` 'DRAFT' | 'PUBLISHED' | 'ARCHIVED': Status of a Lookup Table Revision
  - `startDate` string, date-time: The start date of the Lookup Table Revision
  - `fields` LookupTableRevisionField[]: The list of fields of the Lookup Table Revision.
    - `name` string: The name of the field
    - `type` 'STRING' | 'NUMBER', required: Type of a Lookup Table Revision Field
  - `keys` string[]: The ordered keys of the Lookup Table Revision
  - `dtCreated` string, date-time: The DateTime when the Lookup Table Revision was created.
  - `dtLastModified` string, date-time: The DateTime when the Lookup Table Revision was last modified.
  - `createdBy` string: The id of the user who created the Lookup Table Revision.
  - `lastModifiedBy` string: The id of the user who last modified the Lookup Table Revision.
  - `itemCount` integer
  - `lookupTableId` string: The lookup table id associated with this revision
  - `id` string, required: The UUID of the entity.
  - `version` integer: The version number: - **Create:** On initial Create to insert a new entity, the version is set at 1 in the response. - **Update:** On successful Update, the version is incremented by 1 in the response.
  - `customFields` object: User defined fields enabling you to attach custom data. The value for a custom field can be either a string or a number. If `customFields` can also be defined for this entity at the Organizational level,`customField` values defined at individual level override values of `customFields` with the same name defined at Organization level. See [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields) in the m3ter documentation for more information.

## Other responses

- `4XX`: Error message
- `5XX`: Error message

## Changes

- **2026-10-16** `85c514abc692`: 3 breaking, 1 warning, 3 info
  - added `subschema #1, subschema #2` to the `allOf[#/components/schemas/AbstractRequestWithCustomFields]/allOf[subschema #2]/customFields` request property `allOf` list
  - the `allOf[#/components/schemas/AbstractRequestWithCustomFields]/allOf[subschema #2]/` request property type changed from no type to `object`
  - the `allOf[#/components/schemas/AbstractResponseWithCustomFields]/allOf[subschema #2]/` response's property type changed from no type to `object` for status `200`
  - removed `subschema #2` from the `fields/items/type` request property `allOf` list
  - …3 more
- **2025-12-03** `ac93d1a9e6d9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/m3ter-com/apis/m3ter-api/changes/organizations/:orgId/lookuptables/:lookupTableId/revisions/post.md)

---

[API](https://skmtc.dev/m3ter-com/apis/m3ter-api.md) - [All operations](https://skmtc.dev/m3ter-com/apis/m3ter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/m3ter-com/apis/m3ter-api/revisions/85c514abc692?raw)
