Create Fields

Field Type Rules

Supported type and format combinations

  • text fields may use format.text values email, phone, uuid, url, or regex.
  • When format.text is regex, provide format.pattern with the validation pattern.
  • date and datetime fields may use format.iso_format to define the accepted incoming date format.
  • integer and boolean fields typically omit format.
  • json fields accept objects, arrays, or null on contacts and must omit format.
  • Field names must be unique within the workspace and may not use reserved names.
POST
/v1/fields

Create one or more custom fields

Request body

fieldsarray Required

Array of field definitions to create

Request
Create Fields
curl -X POST https://api.leadpush.io/v1/fields \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
  "fields": [
    {
      "name": "indications",
      "type": "json"
    }
  ]
}'
Response Example
{
"data": [
  {
    "uuid": "<field_uuid>",
    "name": "indications",
    "type": "json",
    "format": null,
    "created_at": "2021-01-01T00:00:00.000Z"
  }
]
}