API Reference

Fields API

Integrate with the Kantos REST API.

The Fields API lets you manage field definitions on your objects. List existing fields, create new ones, and configure validation rules programmatically.

List Fields

Retrieve all field definitions for an object:

GET /api/crm/objects/{object_id}

# The response includes a "fields" array with all field definitions
{
  "id": "obj_contacts",
  "name": "Contacts",
  "fields": [
    {
      "id": "fld_abc123",
      "name": "Full Name",
      "slug": "full_name",
      "type": "text",
      "required": true,
      "position": 0
    },
    {
      "id": "fld_def456",
      "name": "Email",
      "slug": "email",
      "type": "email",
      "required": true,
      "unique": true,
      "position": 1
    }
  ]
}

Field Types

Kantos supports a wide range of field types. Specify the type property when creating a field:

TypeDescriptionExample Value
textShort text input"John Doe"
long_textMulti-line text"Detailed notes..."
numberNumeric value42
currencyMonetary value10000.50
emailEmail address"john@example.com"
phonePhone number"+1 555-0100"
dateCalendar date"2024-01-15"
booleanTrue/false toggletrue
statusDropdown with stages"qualified"
referenceLink to another record"rec_abc123"
userTeam member assignment"user_789"
imageImage attachmentStorage URL

See Field Types Reference for detailed configuration options for each type.

Create Field

Add a new field to an existing object:

POST /api/crm/objects/{object_id}/fields
Content-Type: application/json

{
  "name": "Deal Value",
  "type": "currency",
  "required": false,
  "default_value": 0
}

Status Field with Options

POST /api/crm/objects/{object_id}/fields
Content-Type: application/json

{
  "name": "Lead Status",
  "type": "status",
  "required": true,
  "options": {
    "stages": [
      { "name": "New", "color": "#3b82f6" },
      { "name": "Contacted", "color": "#f59e0b" },
      { "name": "Qualified", "color": "#10b981" },
      { "name": "Closed", "color": "#6b7280" }
    ]
  }
}

Reference Field

POST /api/crm/objects/{object_id}/fields
Content-Type: application/json

{
  "name": "Company",
  "type": "reference",
  "options": {
    "related_object_id": "obj_companies"
  }
}

Admin Only

Field creation and modification are admin-only operations. Ensure your API key belongs to a user with admin privileges.

Next Steps

    Fields API - API Reference | Kantos Docs