Leases

Set a lease custom-field value

Sets this lease's value for one custom field. Send only the value key that matches the field's type — a text field takes stringValue, a number field numberValue, and so on.

PUT
https://api.portal.magicdoor.com/company-app/leases/{leaseId}/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

leaseIdstringrequired

The lease to set the value on. A Snowflake id, sent as a decimal string.

example: 1830472847398404096
customFieldIdstringrequired

The custom field to set. A Snowflake id, sent as a decimal string.

example: 1851019384756201984

Body

application/json

Fill in the one key that matches the field's type; leave the rest out.

stringValuestring

Value for a single-valued text field.

stringArraystring[]

Values for a multi-valued text field.

numberValuenumber

Value for a number field.

booleanValueboolean

Value for a yes/no field.

dateTimeValuestring · date-time

Value for a date field, in the company's timezone.

referenceValuestring

Id for a single reference field. A Snowflake id, sent as a decimal string.

referenceArraystring[]

Ids for a multi reference field.

referenceFileUploadSessionIdstring

Upload session id for a single file reference field. A Snowflake id, sent as a decimal string.

referenceFileUploadSessionIdsstring[]

Upload session ids to add to a file reference field. Append-only — existing files stay.

Response

200 · The stored value.

customFieldIdstring

The custom field this value belongs to. A Snowflake id, sent as a decimal string.

entityTypeenum<string>

Always lease here.

lease
entityIdstring

The lease the value is on. A Snowflake id, sent as a decimal string.

stringValuestring

Value of a single-valued text field.

stringArraystring[]

Values of a multi-valued text field.

numberValuenumber

Value of a number field.

booleanValueboolean

Value of a yes/no field.

dateTimeValuestring · date-time

Value of a date field, in the company's timezone.

referenceValuestring

Id the field points at, for a single reference field. A Snowflake id, sent as a decimal string.

referenceArraystring[]

Ids the field points at, for a multi reference field.

createdstring · date-time

When the value was first set.

updatedstring · date-time

When the value was last changed.

referenceFilesFile[]

The files a reference field points at, resolved.

400 · The request failed validation. `errors` maps each field name to what was wrong with it.

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

404 · No lease or custom field matched the id, or it belongs to another company.