Skip to main content
POST
Create a custom field definition

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.

Body

application/json
label
string
required

Display label for the custom field. Must be unique across definitions.

Maximum string length: 255
Example:

"Industry"

type
enum<string>
required

Data type of the custom field

Available options:
number,
date,
string,
dropdown
Example:

"dropdown"

options
object | null

Optional configuration for the field. Required when type is dropdown (must include a non-empty choices array).

object_types
string[]

Entity types this custom field applies to. On update this field is required — pass an empty array to unlink all entity types. Accepted values include logical names like sales-orders, sales-order-items, invoices, products, companies, purchase-orders, etc. (matches the set accepted by the internal morph-type resolver).

Example:

Response

Custom field definition successfully created

data
object