Create Custom Field
Create a new custom field for the contacts in your workspace. The identifier (fieldId) is derived automatically from the name.
POST https://api.platica.mx/v1/custom-fields Request body
{
"name": "Nivel de membresía",
"type": "text",
"description": "Tipo de membresía actual del cliente",
"automatic": true,
"overwritable": false
} Body parameters
| Parameter | Type | Description | Required | Default |
|---|---|---|---|---|
name | string | Field name (1-100 characters) | ✓ | — |
type | string | Field type. One of: text, textList, number, numberList, date, email, phone, imageUrl, imageUrlList, fileUrl, fileUrlList, select | ✓ | — |
description | string | Field description (max 500 characters) | — | "" |
automatic | boolean | Whether the AI should fill the field automatically from the conversation | — | false |
overwritable | boolean | Whether the AI can overwrite the field's existing value | — | false |
options | array | select only. Option catalog (required and non-empty for select). Each option: { "label": string, "id"?: string, "color"?: string, "order"?: number, "archived"?: boolean }. Up to 50 options. | Conditional | — |
ordered | boolean | select only. Whether the options are an ordered sequence (stages/steps). Only affects display order; it does not restrict which option can be assigned. | — | false |
Response
{
"status": "success",
"message": "Custom field created successfully",
"data": {
"id": "nivel_de_membresia"
}
} Select fields (select)
A select field (selection/status) stores one option from a predefined catalog. The value saved on each customer is the option id (not the label).
{
"name": "Etapa de venta",
"type": "select",
"description": "Current stage of the customer in the funnel",
"ordered": true,
"options": [
{ "label": "Nuevo" },
{ "label": "Contactado" },
{ "label": "Cerrado" }
]
} In this example the options are created with ids nuevo, contactado, and cerrado. You can set your own id or a color (hex) per option; if you omit the id, it is derived from the label.
Notes
- The field
idis generated automatically from thename: lowercased, accents removed, and non-alphanumeric characters replaced with underscores_. - Each workspace can have up to 25 active custom fields. If the limit is reached, the API returns
400. - If a field with the same derived
idalready exists, the API returns409. Use a different name or update the existing field. - Types ending in
List(textList,numberList,imageUrlList,fileUrlList) store multiple values per contact. - For
selectfields, each optionidis a stable slug derived from its label and does not change when you rename it. Labels cannot be empty and ids must be unique within the field. - To assign a
selectvalue to a customer, send theidor the label of an active option incustomFields(see Create a Customer ). nameandtypeare immutable after the field is created. To change them, delete the field and create it again. Aselectfield'soptionsandorderedcan be edited afterwards (see Update Custom Field ).