Accounts

Update custom field configurations

Changed on

Replace the account's custom field definitions. The customFields array you send replaces the entire existing set, so any field you omit is removed from the account. Every field must carry a fieldId — new fields cannot be added here — and a field's key, type, object and displayName are fixed at creation and cannot be changed. Returns the account's complete custom field list.

put/accounts/{id}/custom-fields

Request

  • Base URL
    https://open-api.guesty.com/v1
  • URL
    https://open-api.guesty.com/v1/accounts/{id}/custom-fields
  • Auth
    API key in header authorization

Path parameters

idstring required

Guesty account ID or me

Request body

Example request

{
  "customFields": [
    {
      "isPublic": true,
      "key": "Special requests",
      "object": "reservation",
      "options": [
        "Welcome package A",
        "Welcome package B",
        "Welcome package C"
      ],
      "fieldId": "5dc03b42e28baf001e2b35d0"
    }
  ]
}

Response

Custom Fields Array

displayNamestring

The internal variable name of the custom field. Read-only: it is derived by the server from key (trimmed, whitespace replaced with underscores, lowercased), so a value sent by the client is ignored.

isPublicboolean

Indicates whether the custom field is visible to all users or only those with custom field permissions.

isRequiredboolean

Whether a value must be supplied for this field. Applies to reservation custom fields only — it is ignored for listing custom fields, which the Guesty UI always creates with isRequired: false.

keystring

The plain text display name of the custom field

object'listing' | 'reservation'

Whether the custom field is for listings or reservations

optionsstring[]

Your custom list of options, for the enum field type. For type: user the system populates the options internally with the account's users, but this property is still returned as an empty array — an empty array here does not mean the account has no users.

type'boolean' | 'contact' | 'date' | 'dayofweek' | 'enum' | 'longtext' | 'number' | 'text' | 'time' | 'user'

The data type of the custom field. Indicates the type of content that can be input into the field. The "Team member" option in the Guesty UI creates a field of type user — there is no separate team_member type, and both produce the same result.

fieldIdstring

The unique identifier of the custom field

Example response

[
  {
    "fieldId": "5dc03b42e28baf001e2b35d0"
  }
]

Changes