Create a custom field

POST
/custom-fields

Creates a custom field on the company. Set type to the kind of value the field captures (one of text, textarea, select, checkbox, date, datetime, integer, phone) and entity to what it attaches to (guest, booking, enquiry_form, recommendation); both are fixed for the life of the field. Most types need only name, type, and entity.

A select field must also supply options — an array of at least one object, each with a value. Created options are returned with opt_-prefixed ids. Supplying options for any other type is rejected.

Header Parameters

Idempotency-Key?string

Client-generated key for idempotent writes; the server deduplicates retries within a 24-hour window.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string

The field's question or prompt as shown to customers when they fill it in.

label?string | null

Optional internal name used to identify the field in the dashboard; not shown to customers.

hint?string | null

Helper text shown alongside the field.

entity*string

What the field is attached to.

Value in"guest" | "booking" | "enquiry_form" | "recommendation"
type*string

Must be select.

Value in"select"
options?array<object>

Choices for the field. At least one is required.

Items1 <= items
object
value*string

The option's display value.

name*string

The field's question or prompt as shown to customers when they fill it in.

label?string | null

Optional internal name used to identify the field in the dashboard; not shown to customers.

hint?string | null

Helper text shown alongside the field.

entity*string

What the field is attached to.

Value in"guest" | "booking" | "enquiry_form" | "recommendation"
type*string

The kind of value the field captures.

Value in"text" | "textarea" | "checkbox" | "date" | "datetime" | "integer" | "phone"

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/custom-fields" \  -H "Easol-API-Version: 2026-11-01" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "entity": "guest",    "type": "select"  }'
{
  "object": "custom_field",
  "id": "fld_aBcDeFgHiJ",
  "name": "string",
  "label": "string",
  "hint": "string",
  "type": "text",
  "entity": "guest",
  "options": [
    {
      "id": "string",
      "value": "string"
    }
  ]
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}