Update a custom field

SDK platic.customFields.update()

Change a field’s description, how AI fills it or the options of a select field. Send at least one field you want to update; other fields keep their values.

Example

await platic.customFields.update("plan", { description: "The plan the customer pays for" });

If your credential covers several workspaces, add ?workspace=<id> to say which one you work in (list workspaces); without it the answer is 400. A single-workspace credential never needs it.

URL parameters

ParameterTypeDescriptionRequired
fieldIdstringUnique identifier of the custom field✓

Request body

{
  "description": "Current membership type of the customer",
  "automatic": true,
  "overwritable": false
}

Body parameters

All parameters are optional, but the request must include at least one.

ParameterTypeDescription
descriptionstringField description (max 500 characters)
automaticbooleanWhether the AI should fill the field automatically from the conversation
overwritablebooleanWhether the AI can overwrite the field's existing value
optionsarrayselect only. Fully replaces the option catalog. At least one active (non-archived) option must remain. Up to 50 options.
orderedbooleanselect only. Whether the options are an ordered sequence (stages/steps).

Editing a select field's options

Send the full option catalog in options. Keep the id of existing options so you don't break values already stored on customers; options without an id are treated as new.

{
  "ordered": true,
  "options": [
    { "id": "new", "label": "New" },
    { "id": "contacted", "label": "Contacted" },
    { "id": "closed", "label": "Closed", "archived": true },
    { "label": "Won" }
  ]
}

Response

{
  "status": "success",
  "message": "Custom field updated successfully",
  "data": {
    "id": "membership_level"
  }
}

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTThe body is empty, description is longer than 500 characters, or a value does not have the expected type. details.issues says which field
400INVALID_REQUESTThe options of a select are not valid (repeated ids, no active option…). details.message says what happened
400INVALID_REQUESTYour credential covers several workspaces and you did not send ?workspace=, or you sent one it does not cover. details.available lists the ones you can use
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENThe credential does not have the Contacts module (Missing contacts permission), or it is an OAuth token without the platica:write scope
404CUSTOM_FIELD_NOT_FOUNDThe field does not exist in the workspace or was deleted
{
  "code": 400,
  "error": "Bad Request - The request has validation errors",
  "details": {
    "code": "INVALID_REQUEST",
    "message": "The request has validation errors",
    "issues": [
      {
        "code": "custom",
        "path": [],
        "message": "At least one of description, automatic, overwritable, options, or ordered must be provided"
      }
    ]
  }
}

The general error format is in Errors.

Notes

  • You cannot change name or type after creating the field. To change them, delete the field and create it again.
  • In a select field, to "remove" an option mark it as archived: true instead of dropping it from the array: this preserves historical values on customers while hiding the option from new assignments.
  • options and ordered only apply to select fields; they are ignored for other types.
  • If the field does not exist or has been deleted, the API returns 404.