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

ParameterTypeDescriptionRequiredDefault
namestringField name (1-100 characters)
typestringField type. One of: text, textList, number, numberList, date, email, phone, imageUrl, imageUrlList, fileUrl, fileUrlList, select
descriptionstringField description (max 500 characters)""
automaticbooleanWhether the AI should fill the field automatically from the conversationfalse
overwritablebooleanWhether the AI can overwrite the field's existing valuefalse
optionsarrayselect 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
orderedbooleanselect 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 id is generated automatically from the name: 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 id already exists, the API returns 409. Use a different name or update the existing field.
  • Types ending in List (textList, numberList, imageUrlList, fileUrlList) store multiple values per contact.
  • For select fields, each option id is 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 select value to a customer, send the id or the label of an active option in customFields (see Create a Customer ).
  • name and type are immutable after the field is created. To change them, delete the field and create it again. A select field's options and ordered can be edited afterwards (see Update Custom Field ).