Custom Fields

Within the Front UI, a custom field defines the name and type for an extra field of an API resource such as a contact, conversation, or account. Only listing all fields and updating the name and/or value of a custom field is allowed. If you need a custom field to change its type, you need to create a new one with the correct type in UI, as the API validates the value of a custom field based on its type.

Each custom field has a specified data type when created in the UI. Ensure the data you submit when updating a custom field's value is formatted correctly:

TypeExample nameExample valuesDescription
StringCity"London, UK"String values
BooleanVIP?trueBoolean true/false
DatetimeRenewal date1525417200Epoch Timestamps
NumberLoyalty points90Integers
TeammateAdvocate[email protected]Email address of a teammate
InboxAssigned inbox"inb_55c8c149"Inbox id
EnumJob title[{"value": "firefighter", "label": "Firefighter"},...]Array of values objects listing the possible enums

Example Custom Field Object

{
  "_links": {
    "self": "https://api2.frontapp.com/conversations/fld_55c8c149"
  },
  "id": "fld_55c8c149",
  "name": "job_title",
  "description": "Job title",
  "type": "string"
}

Example Custom Field Object of type enum

{
  "_links": {
    "self": "https://api2.frontapp.com/conversations/fld_55c8c149"
  },
  "id": "fld_55c8c149",
  "name": "job_title",
  "description": "Job title",
  "type": "enum",
  "values": [
        {
          "value": "firefighter",
          "label": "Firefighter"
        },
    		{
          "value": "doctor",
          "label": "Doctor"
        },
    		{
          "value": "airline_pilot",
          "label": "Airline pilot"
        },
      ]
}

Example of custom field object returned in API responses

{
  "custom_fields": {
    "City": "Austin, TX",
    "Country": "US"
  }
}