Custom Fields
Custom Fields Object
Custom Fields are represented as JSON objects with the following properties
id
integer
The ID of the custom field.
name
string
The name of the custom field.
version
string
Version of current data, increments each time we update the custom field object.
type
enum
Denotes the type of the custom field.
config
object
created_at
string
The creation timestamp of the request
updated_at
string
The update timestamp of the request
Config Object
Config is represented as a JSON object with the following properties. It will hold different properties for different types of custom Fields.
Config Object for Select Custom Field
type
literal
Must be exactly: 'select'
options
object array
Array of selection options with the following structure:
The order of elements in the array determines the sequence in which they are displayed across various user interfaces.
last_option_id
number
Represents the highest ID number used for options.
Config Object for Multi-Select Custom Field
type
literal
Must be exactly: 'multi_select'
options
object array
Array of selection options with the following structure:
The order of elements in the array determines the sequence in which they are displayed across various user interfaces.
last_option_id
number
Represents the highest ID number used for options.
Config Object for Text Custom Field
type
literal
Must be exactly: 'text'
max_length
number
Optional. Maximum number of characters allowed in the text field. Defaults 255
single_line
boolean
Optional. If true, the text field will be displayed as a single-line text field in various user interfaces. If false it will be displayed as a multi-line text field. Default value:
Config Object for Date
type
literal
Must be exactly: 'date'
Config Object for Number
type
literal
Must be exactly: 'number'
Get All Custom Fields
GET
https://api.clearfeed.app/v1/rest/custom-fields
Get all custom fields in an account
Create Custom Field
POST
https://api.clearfeed.app/v1/rest/custom-fields
Create a custom field to use them in forms.
Request Body
name*
string
Name of the custom field
type*
enum
Type of the custom field. Must be one of: select
, multi_select
, text
, date
, number
config
object
Example request body:
Update Custom Field
PUT
https://api.clearfeed.app/v1/rest/custom-fields/:id
Update an existing custom field.
Request Parameters
id*
integer
The ID of the custom field to update
Request Body
name*
string
Name of the custom field
type*
enum
Type of the custom field. Must be one of: select
, multi_select
, text
, date
, number
config
object
Important: Once created, a custom field's type cannot be modified. However, you can:
For
select
andmulti_select
fields: add, remove, or modify the available optionsFor
text
fields: adjust the character limit
Example request body:
Delete Custom Field
DELETE
https://api.clearfeed.app/v1/rest/custom-fields/:id
Delete a custom field.
Request Parameters
id*
integer
The ID of the custom field to delete
Last updated