New Value to deafield list

Hello, can someone help me?
I have a dealfield type List or “list options” and I would like to add a value to that list, how should I do?
thanks in advance.

Hi @cyberpolito

If I got it right, you are asking about Multiple options custom field for a Deal, something like this

In this case, you have two options to add new options to the field:

Via UI

Via API

Step 1. Find custom field id from a list of fields GET /dealFields
Step 2. Update custom field options PUT /dealFields/<custom field id> https://developers.pipedrive.com/docs/api/v1/#!/DealFields/put_dealFields_id

So request body, might look like this

{
    "options": [
       {
         "label": "option1"
       }
     ]
}

Keep in mind that “options” will be re-written for that field, meaning in case if you want to keep old options and add a new one, you need to send them all in update request, otherwise, only options specified in the request body will be set to that field.

Thanks mykhailo!,
One more,
to rename a “option”?
Thanks in advance

@cyberpolito to rename an option you would need to do the same, meaning you can not update/delete only one specific option, instead call PUT /dealFields/<id> with options you need.

In order to keep IDs for your existing options, you need to send them as well, for example

{
   "options": [
       { "label": "my existing option but it has a new label", "id": "28" },
       { "label": "my new option" }
   ]
}