Update Contact
Nested custom-field value policy
When the request contains linked parent and child custom fields, use invalid_linked_custom_field_value_policy to control what happens when a child value is hidden by, or does not match, its effective parent value.
| Value | Behaviour |
|---|---|
keep | Preserves invalid child values. This is the default when the property is omitted. |
clear | Stores invalid non-file child values as null. File values are always retained. |
The operation completes successfully under either policy. A child-only update is evaluated against the parent value already stored on the record. A parent update also re-evaluates its descendants.
JSON example
{
"invalid_linked_custom_field_value_policy": "clear",
"custom_fields": [
{ "id": 12, "value": "EMEA" },
{ "id": 13, "value": "Germany" }
]
}Custom-field request IDs are the public IDs returned as id by GET /v1/custom-field. Use that endpoint to discover each child field's dependency, including the parent field's public parent_field_id, the visible_when values that make the child visible, and any allowed_child_options for dropdown or multiselect child fields.
The response envelope and entity response fields are unchanged; only the resulting child value may be retained or returned as null according to the selected policy.
Update the details of an existing contact by their unique slug.
Request
Put
PUT /v1/contact/:slug
Path Parameter
- slug
stringReplace
:slugwith the contact's unique slug in the request URL.
BODY
- first_name
string>= 1 characters (required)
- last_name
string>= 1 characters
- organization_slug
string>= 1 characters (slug of the organization )
- email
string>= 1 characters
- phone
string>= 1 characters
- designation
string>= 1 characters
- stage_id
integer(required)
- owner_id
integer(required)
- description
string>= 1 characters
- created_by
integer - city
string>= 1 characters
- address
string>= 1 characters
- xing_url
string>= 1 characters
- linkedin_url
string>= 1 characters
- tags
stringAllowed Comma-separated values:- [Java,Leadership]
- custom fields:
Array[object]For Example:
"id": 1,
"value": "textfeild"
Response
201
Body
- id
numberExample: 28
- first_name
stringExample: Anjali
- last_name
stringExample: Kotwani
- slug
stringExample: contact_68ba678fcd2a83f4640c
- full_name
stringExample: Anjali Kotwani
- email
stringExample: anjali@gmail.com
- tags
stringExample: [frontend, developer, javascript]
- phone
stringExample: +917489011449
- profile_picture
stringExample: image.jpg
- designation
stringExample: intern
- address
stringExample: rau bypass
- city
stringExample: indore
- stage
objectExample:
"id": 1,
"label": "lost" - description
stringExample: Experienced software engineer with a focus on frontend development.
- organization
objectExample:
"id": 1 - created_at
string (ISO 8601 date)Example: 2015-05-15T00:00:00Z
- updated_at
string (ISO 8601 date)Example: 2015-05-15T00:00:00Z
- created_by
objectExample:
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null - updated_by
objectExample:
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null - owner
objectExample:
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null - socials
objectExample:
"linkedin": "anjalilinkedin.com",
"xing": "anjali.com" - custom fields:
objectExample:
"id": 1,
"field_name": "textfeild",
"field_type": "string",
"value": "anjali" - invalid_linked_custom_field_value_policy
stringOptional. Allowed values:
keep,clear. Default:keep. Controls whether invalid linked child custom-field values are retained or cleared.
401
Body
- unauthorised
422
Body
- Unprocessable Entity
Response Example
{
"id": 28,
"first_name": "Anjali",
"last_name": "Kotwani",
"slug": "contact_68ba678fcd2a83f4640c",
"full_name": "Anjali Kotwani",
"email": "anjali@gmail.com",
"tags": null,
"phone": "+917489011449",
"profile_picture": "",
"designation": "",
"address": "",
"city": "",
"stage": {
"id": 1,
"label": "Prospect"
},
"description": "",
"organization": null,
"created_at": "2024-08-10T17:57:52.000Z",
"updated_at": "2024-08-11T11:49:27.000Z",
"created_by": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"updated_by": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"owner": {
"id": 1,
"email": "Rohan@abc.com",
"first_name": "Rohan",
"last_name": "Sharma",
"full_name": "Rohan Sharma",
"role": "Admin",
"phone": null
},
"socials": {
"linkedin": "",
"xing": ""
},
"custom_fields": [
{
"id": 7,
"field_name": "Drop",
"field_type": "dropdown",
"value": ""
},
{
"id": 8,
"field_name": "Multi",
"field_type": "multiselect",
"value": ""
},
{
"id": 2,
"field_name": "Percentage",
"field_type": "percentage",
"value": "0"
}
]
}