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:
| Type | Description | Example Value |
|---|---|---|
text | Short text input | "John Doe" |
long_text | Multi-line text | "Detailed notes..." |
number | Numeric value | 42 |
currency | Monetary value | 10000.50 |
email | Email address | "john@example.com" |
phone | Phone number | "+1 555-0100" |
date | Calendar date | "2024-01-15" |
boolean | True/false toggle | true |
status | Dropdown with stages | "qualified" |
reference | Link to another record | "rec_abc123" |
user | Team member assignment | "user_789" |
image | Image attachment | Storage 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
- Objects API — Create and manage objects
- Records API — Work with record data
- Field Types Guide — Detailed field configuration