Update a contact custom field

Updates a custom field definition by its field id. Only the properties present in the request are changed, plus udate and updatedby on every call. perstag is normalised on save (uppercased, A-Z, 0-9 and only) and regenerated from the title when blank. Changing type does not convert stored values or remove existing options; switching to textarea sets rows to 5 and cols to 40 when they are 0. Options cannot be managed here: options and relations keys in the payload are silently ignored. Manage options with the fieldOptions endpoints and list relationships with the fieldRels endpoints. 404 if no field has this id; 422 if title is emptied, contains HTML or is already used by another field, or if perstag is already used by another field or by a system personalization tag. A field cannot be changed into or out of type lookup; other type changes are unaffected. field.lookup replaces a lookup field's configuration, and is refused on a field of another type. Only for an account the crm-lookup-fields feature is on for; otherwise any request naming the lookup type or carrying field.lookup fails with 400.

{
	"field": {
		"type": "textarea",
		"title": "Title",
		"descript": "Field  description",
		"perstag": "Personalized Tag",
		"defval": "Defaut Value",
		"show_in_list": 1,
		"rows": 2,
		"cols": 2,
		"visible": 1,
		"service": "google",
		"ordernum": 3
    }
}
{
    "field": {
        "title": "Title",
        "descript": "Field  description",
        "type": "textarea",
        "isrequired": 0,
        "perstag": "PERSONALIZEDTAG",
        "defval": "Defaut Value",
        "show_in_list": 1,
        "rows": 2,
        "cols": 2,
        "visible": 1,
        "service": "google",
        "ordernum": 3,
        "cdate": "2018-09-25T16:06:08-05:00",
        "udate": "2018-09-29T18:23:20-05:00",
        "links": {
            "options": "https://:account.api-us1.com/api/:version/fields/3/options",
            "relations": "https://:account.api-us1.com/api/:version/fields/3/relations"
        },
        "id": "3"
    }
}
Path Params
int32
required

ID of the custom field definition to update, from the fields array of GET /fields. This is not a field option id; to change one option use PUT /fieldOptions/{id}.

Body Params
field
object

The properties to change. Properties left out keep their current value.

Responses

404

No field with this id.

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json