Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom fields

Extra fields on every customer's profile.

Custom field definitions are read-only through the API; a customer's values are read and set on the customer.

Fields: The custom field object.

List custom fields

get

Every custom field defined for customers, in display order, with select options. A workspace has at most 20. Definitions are managed in the app's Settings.

Returns a list of custom field objects.

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

A workspace API token. Each operation lists the scopes it needs; write implies read, and send/complete are never implied.

Responses
200

Success.

application/json
get/v1/custom-fields
curl https://api.shortcutco.com/v1/custom-fields \
  -H "Authorization: Bearer $SHORTCUT_TOKEN"
{
  "data": [
    {
      "id": "3ba6bad1-37f0-4618-843b-315f30856ca6",
      "object": "custom_field",
      "name": "Gate code",
      "type": "text",
      "options": [
        {
          "id": "front_gate",
          "label": "Front gate"
        }
      ]
    }
  ]
}

Get a customer's custom-field values

get

The customer's stored custom-field values. A select field's value is the id of the chosen option; GET /v1/custom-fields has the labels.

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

A workspace API token. Each operation lists the scopes it needs; write implies read, and send/complete are never implied.

Path parameters
idstring · uuidRequired

The object's id.

Responses
200

Success.

application/json
get/v1/customers/{id}/custom-fields
curl https://api.shortcutco.com/v1/customers/7eed1b38-7b37-467f-8781-91c673cbcd0d/custom-fields \
  -H "Authorization: Bearer $SHORTCUT_TOKEN"
{
  "data": [
    {
      "definitionId": "0cf17864-093b-43ab-8585-eef201d02a39",
      "value": "4417"
    }
  ]
}

Set a customer's custom-field values

put

Sets the listed custom-field values on the customer; fields you leave out are unchanged, and null or empty clears a value. Each value must fit its field's type (see GET /v1/custom-fields); one bad value rejects the whole request. A real change counts as a change to the customer for updatedSince. If the token has automations:trigger, automations that start on a field change run as they do for changes in the app.

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired

A workspace API token. Each operation lists the scopes it needs; write implies read, and send/complete are never implied.

Path parameters
idstring · uuidRequired

The object's id.

Header parameters
Idempotency-Keystring · max: 255Optional

Any string up to 255 characters. Retrying with the same key returns the first response instead of repeating the write, for 24 hours.

Body
Responses
200

Success.

application/json
put/v1/customers/{id}/custom-fields
curl https://api.shortcutco.com/v1/customers/7eed1b38-7b37-467f-8781-91c673cbcd0d/custom-fields \
  -X PUT \
  -H "Authorization: Bearer $SHORTCUT_TOKEN" \
  -H "Idempotency-Key: 459ef31d-41e9-4e64-8e33-69ab3a7da4f2" \
  -H "Content-Type: application/json" \
  -d '{"values":[{"definitionId":"3bdb7eee-3825-4a35-846f-f57c30ba30c3","value":"4417"}]}'
{
  "data": [
    {
      "definitionId": "3bdb7eee-3825-4a35-846f-f57c30ba30c3",
      "value": "4417"
    }
  ]
}

Last updated