1. Get the Field ID You Want to Update
To update a custom attribute, you first need its Field ID. Here’s how to find it:- Navigate to Person or Company Settings in your Breakcold workspace settings
- Locate the field you want to update.
- Click on the three dots next to the field and select Copy attribute ID.
Special Note for Select, MultiSelect, Location,Date, or Relation Attribute Types
Custom attributes can have special behaviors depending on their types. Here are some key points to remember:
-
Select,MultiSelectAttributes: The value can be a single option ID or an array of option IDs. The backend will handle the conversion automatically. -
LocationAttributes: The value should be an object with the following properties: -
DateAttributes: The value must be in ISO 8601 format. -
RelationAttributes: The value must be the ID of the related lead.
2. Create or Update a Lead with Custom Attributes
When creating or updating a lead, include the attributes you want to modify in the body of the API request. Here’s an example:Important Notes:
-
Ensure that all
SelectorMultiSelectattribute values are valid IDs. Incorrect or unrecognized IDs will result in an error. -
LocationAttributes: The backend expects latitude, longitude, and address values to be present in the object. -
RelationAttributes: The value must be the ID of the related lead. -
DateAttributes: The value must be in ISO 8601 format.
Error Handling
- Unrecognized IDs or invalid values for
Select,RelationorMultiSelectattributes will return an error. - Ensure proper data structure for
Locationattributes.