Custom fields

Update a custom field definition

Changes parts of a custom field definition. Only the properties you send are written, so this is a genuine partial update. entityType cannot be changed.

PATCH
https://api.portal.magicdoor.com/company-app/custom-fields/{customFieldId}

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

customFieldIdstringrequired

The custom field definition to change. A Snowflake id sent as a decimal string.

example: 1830472847398418018

Body

application/json

namestring

New label, 1 to 100 characters.

descriptionstring

New help text, up to 500 characters.

publicboolean

Whether tenants, owners and vendors see the value.

filterableboolean

Whether the field can be filtered on.

listableboolean

Whether the field can be shown as a list column.

orderinteger

Where the field sits among the others.

optionsobject

Replacement type and validation rules. Sending this replaces the whole options object, so include type and every rule you want to keep.

activeboolean

Set to false to retire the field without deleting the values already stored against it.

Response

200 · The definition after the change.

idstring

The custom field definition. A Snowflake id sent as a decimal string.

entityTypeenum<string>

What kind of record this field can be set on.

leaseunitpropertyportfoliocompanytenantvendormaintenanceRequestworkOrderbilltransactionchatchatMessagepropertyManagerunknownrentalApplicationleaseTemplateleaseDocumentassociationViolationownerunitListingfileworkOrderGroup
namestring

Label shown next to the input.

descriptionstring

Help text. Absent when none was set.

publicboolean

Whether tenants, owners and vendors can see the value in their own portals.

filterableboolean

Whether the field can be filtered on in lists and reports.

listableboolean

Whether the field can be shown as a column in lists.

orderinteger

Where the field sits among the others. Lower sorts first.

optionsobject

The field's type and its validation rules.

activeboolean

Whether the field is still in use. A deactivated field keeps its stored values.

createdstring · date-time

When the field was created, in the company's timezone.

updatedstring · date-time

When it was last changed, in the company's timezone.

401 · The access token is missing, expired, or not valid for this company.

404 · No custom field definition with that id exists in the caller's company.

Changing options is a replacement

options is not merged. Whatever you send becomes the whole rule set, so read the definition first and send back every rule you still want, including type.

Changing the type strands existing values

Values already stored sit in the slot the old type used. Switching options.type does not move them, so a value written as stringValue stays there even after the field becomes a number.

options.typeWhich value slot the field usesRules you can set
stringstringValue, or stringArray when multiple is trueminLength, maxLength, values, rejectUnknown, multiline, multiple, default
numbernumberValuemin, max, step, default
booleanbooleanValuedefault
datetimedateTimeValuemin, max, default, dateOnly
referencereferenceValue, or referenceArray when multiple is truereferenceEntityType, multiple