v1

latestOpenAPI 3.1.02026-08-066378446.6 KB
Account

Create metadata

<small>Requires an API token with the Metadata Manager role.</small>

Creates a new account-level metadata field definition.

Note that the name and value_type sent in this request are fixed at the time of creation and cannot be changed later.

post/metadata

Request body

value_type'id' | 'uuid' | 'bool' | 'date' | 'duration' | 'email' | 'list' | 'number' | 'currency' | 'currency_duration' | 'clause' | 'select' | 'multi_select' | 'text' | 'textarea' | 'timestamp' | 'array' | 'enum' required
display_namestring required

The display name shown in the UI.

namestring required

The programmatic name. Cannot be changed after creation. Must be lowercase alphanumeric with underscores only. Must be unique within the account and must not conflict with system metadata names.

descriptionstring nullable

A description of the metadata field.

promptstring nullable

An AI prompt used for metadata extraction.

keywordsstring nullable

Keywords to help with metadata identification.

is_contract_valueboolean nullable

Whether this is a contract value field. Can only be true when value_type is currency or currency_duration.

select_valuesstring[] nullable

The possible values when value_type is select or multi_select.

relevant_document_type_uuidsstring[] nullable

UUIDs of document types this metadata is relevant for. null means not relevant to any document types. [] (empty array) means relevant to all document types.

Example request

{
  "display_name": "Discount Rate",
  "name": "discount_rate",
  "description": "The discount rate applied to the company valuation in a follow-on financing round.",
  "prompt": "Extract the discount rate percentage from the document.",
  "keywords": "discount, rate, valuation"
}

Response

MetadataResource

Example response

{
  "data": {
    "uuid": "7dae3dad-e56d-45e9-86e5-b69dc30597dc",
    "name": "discount_rate",
    "display_name": "Discount Rate",
    "settings": {
      "currencies": [
        "EUR",
        "USD"
      ]
    },
    "description": "The discount rate applied to the company valuation in a follow-on financing round.",
    "keywords": "discount, rate, valuation",
    "prompt": "Extract the discount rate percentage from the document."
  }
}