Update Field

Rename Behavior

What happens when you change the field name

  • The field path parameter accepts the field UUID.
  • Renaming a field updates the stored field definition and renames the matching attribute on existing contacts in the workspace.
  • Duplicate field names are rejected with 422 Unprocessable Entity.
  • The same type and format rules used during creation also apply when updating a field.
POST
/v1/workspaces/:workspace/fields/:field

Update a custom field by UUID

Path parameters

workspacestring Required

ID of your workspace

fieldstring Required

Field UUID

Request body

namestring Required

Updated field name in snake_case

typestring Required

Field type. Supported values are `text`, `integer`, `date`, `datetime`, and `boolean`.

formatobject

Optional format configuration based on the selected field type

Rename Field
curl -X POST https://api.leadpush.io/v1/workspaces/:workspace/fields/:field \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
  "name": "company_website",
  "type": "text",
  "format": {
    "text": "url"
  }
}'
Response Example
{
"data": {
  "uuid": "<field_uuid>",
  "name": "company_website",
  "type": "text",
  "format": {
    "text": "url",
    "pattern": null,
    "iso_format": null
  },
  "created_at": "2021-01-01T00:00:00.000Z"
}
}