https://chatloka.net/api/v1/contacts/custom-fields
Create a custom field definition.
contacts:write
1. Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
Required | Display name |
key |
string |
Required | Unique key (lowercase alphanumeric + underscores) |
field_type |
string |
Required | text | number | email | phone | url | date | textarea | select | multi_select |
options |
array |
Optional | Options for select/multi_select fields (required when field_type is select or multi_select) |
is_required |
boolean |
Optional | Whether field is required |
max_length |
integer |
Optional | Max length (1-10000) |
sort_order |
integer |
Optional | Sort order (min 0) |
description |
string |
Optional | Field description |
placeholder |
string |
Optional | Placeholder text |
is_active |
boolean |
Optional | Whether field is active |
{ "name": "Company", "key": "company", "field_type": "text", "is_required": false }
curl -X POST 'https://chatloka.net/api/v1/contacts/custom-fields' \
-H 'Authorization: Bearer $API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{ "name": "Company", "key": "company", "field_type": "text", "is_required": false }'
{ "success": true, "data": { "id": 1, "name": "Company", "key": "company", "field_type": "text", "options": null, "is_required": false, "max_length": null, "sort_order": 0, "description": null, "placeholder": null, "is_active": true, "created_at": "2026-07-14T10:30:00+00:00", "updated_at": "2026-07-14T10:30:00+00:00" }, "message": "Custom field created successfully" }
UNAUTHORIZED
{ "success": false, "error": { "code": "UNAUTHORIZED", "message": "Invalid or revoked API key" } }
FORBIDDEN
{ "success": false, "error": { "code": "FORBIDDEN", "message": "You do not have permission to access this resource." } }
VALIDATION_ERROR
{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "The given data was invalid.", "details": { "field": ["The field is required."] } } }
RATE_LIMIT_EXCEEDED
{ "success": false, "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Too many requests. Please slow down.", "retry_after": 60 } }
Every minute you wait is revenue walking out the door. Join hundreds of businesses who transformed their customer communication with ChatOn.
β 30-day money-back guarantee
We use cookies and similar technologies to improve your experience, analyze traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies. Privacy Policy & Cookie Policy.
Choose which cookies you want to allow. Essential cookies are always required for the website to function.
Essential Cookies
Required for the website to function. Cannot be disabled.
Analytics Cookies
Help us understand how visitors interact with our website by collecting anonymous data.
Marketing Cookies
Used to track visitors across websites to display relevant advertisements.