Printago API
POST
/v1/custom-metadata-definitions
Define a custom field
Request Body
CreateCustomMetadataDefinitionRequest
clearIncompatibleValuesoptional
boolean
Drop values that cannot be represented as `valueType` instead of
refusing to define the field. The client shows the offending rows first.
defaultToNowoptional
boolean
defaultValueoptional
string | number | boolean
entityTyperequired
any
enumValuesrequired
string[]
keyrequired
string
labelrequired
string
unitrequired
string
valueTyperequired
any
Example Request
application/json
{
"label": "string",
"key": "string",
"defaultToNow": true,
"clearIncompatibleValues": true
}
Response Schema
CustomMetadataDefinition
createdAtrequired
string
format: date-time
defaultToNowrequired
boolean
Date/time fields only, and the only default they can carry: the value is
the moment the record was created. A fixed date is almost never the right
default, and there is no way to express "now" as a literal.
defaultValuerequired
string | number | boolean
Written into a record's `customMetadata` when that record is created, so
the field is on every new record of its type. This is the only way a
definition puts itself on a record: a field with no value is not listed,
because a row the record does not carry is a row that lies about it.
Never applied to records that already exist.
entityTyperequired
any
enumValuesrequired
string[]
idrequired
string
pattern: ^[a-z0-9]{24}$
keyrequired
string
labelrequired
string
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
unitrequired
string
updatedAtrequired
string
format: date-time
valueTyperequired
any
Example Response
201 OK — application/json
{
"key": "string",
"label": "string",
"defaultToNow": true,
"id": "string",
"storeId": "string",
"createdAt": "2026-09-13T00:32:48.537Z",
"updatedAt": "2026-09-13T00:32:48.537Z"
}