Account

<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

  • Base URL
    https://app.fynk.com/v1/api
  • URL
    https://app.fynk.com/v1/api/metadata
  • Auth
    HTTP bearer

Request body

value_type'bool' | 'date' | 'duration' | 'email' | 'number' | 'currency' | 'currency_duration' | 'clause' | 'select' | 'multi_select' | 'text' | 'textarea' | 'timestamp' required

Controls what kinds of values may be stored in the field. Cannot be changed after creation

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

{
  "value_type": "text",
  "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."
  }
}

Changes

    • breaking

      removed the enum value array of the request property

    • breaking

      removed the enum value enum of the request property

    • breaking

      removed the enum value id of the request property

    • breaking

      removed the enum value list of the request property

    • breaking

      removed the enum value uuid of the request property

    • info

      added the optional property to the response with the status