# Update custom fields "List" value via API

**URL:** <https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280>\
**Category:** API Q&A\
**Tags:** custom-fields, api\
**Created:** [August 25, 2023, 2:57pm UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280 "2023-08-25T14:57:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabrizio\_Marino](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@Fabrizio\_Marino](https://integration.keap.com/u/Fabrizio_Marino)\
**Post date:** [August 25, 2023, 2:57pm UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280/1 "2023-08-25T14:57:05Z")

</div>

Hi everyone,  
i’m struggling updating a company custom field value via API JSON.  
The custom field is a listBox where there are many pre determined choices and i’m trying to update those value via zapier.

 ![Screenshot 2023-08-25 alle 16.50.08](https://us1.discourse-cdn.com/flex019/uploads/infusionsoft1/original/2X/8/8fe2e95eff560588ae4eaca8a84bfbdcf84d99d0.png)

i’m using this input:

```auto
{
  "custom_fields": [{
"content": {
"_Settoreincuiopera": "Bellico"
},
"id": 25,
"content": 123,
"id": 143
    }]
}

```

where id 25 is the listBox field. The problem is that is updating only the field 143, which is a whole number field but it does knothing to the field 25. Here’s the output  
"  
custom\_fields

1

id

25

content

2

id

27

content

3

id

143

content

123  
"  
As you can see it only PATCHES the field 143 but it doesn’t touch the listbox field 25. Of course the value “Bellico” is part of the choices you can select.

i also tried this variation

```auto
{
  "custom_fields": [{
"content": ["Bellico"],
"id": 25,
"content": 123,
"id": 143
    }]
}

```

but nothing happens. Can please someone help me with this?

---

<div class="post-metadata">

**Author:** ![Pav](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/pav/32/124_2.png) [@Pav](https://integration.keap.com/u/Pav)\
**Post date:** [August 25, 2023, 3:39pm UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280/2 "2023-08-25T15:39:02Z")

</div>

Hi Fabrizio,

Firstly, I recommend that you back up the List Values before you attempt to update them, just in case something goes wrong and the values are wiped out.

Taking a quick look at the documentation and your code, it has not been set up properly.

_ **DO NOT USE THIS BELOW, AS REST USES THE ID NUMBER, AS OPPOSE TO XML-RPC WHICH USES THE NAME.** _

```auto
“custom_fields”: 
[
    {
        “content”: { "<CUSTOM FIELD NAME>": “Bellico” },
        “id”: 25
    },
    {
        “content”: { "<CUSTOM FIELD NAME>": 123 },
        “id”: 143
    }
]

```

You will have to experiment with this, as updating Lists is not something I have done, so I cannot comment what is needed here.

The REST API Documentation needs to be clearer on these things.

---

<div class="post-metadata">

**Author:** ![Fabrizio\_Marino](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@Fabrizio\_Marino](https://integration.keap.com/u/Fabrizio_Marino)\
**Post date:** [August 25, 2023, 3:49pm UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280/3 "2023-08-25T15:49:46Z")

</div>

Hi Pav, thank you very much for the quick reply!

I’m tring to use this code

```auto
{
  "custom_fields": [
{
"content": { "Settoreincuiopera": "Bellico" },
"id": 25
}, 
{
"content": { "Fatturato20202021inMLN": 123 },
"id": 143}
    }
]
}

```

But no luck i have error 400  
Failed to create a request in Webhooks by Zapier

Input could not be converted to a valid request (HTTP Status Code: 400)

I also tried with the \_ before the name of the field.  
I’ve tried to use { } before but it seems like syntax is not good…

I completely agree that docs are quite difficult to understand, i’ve seen more clear exapmples with other softwares’ API!

---

<div class="post-metadata">

**Author:** ![Fabrizio\_Marino](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@Fabrizio\_Marino](https://integration.keap.com/u/Fabrizio_Marino)\
**Post date:** [August 25, 2023, 3:52pm UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280/4 "2023-08-25T15:52:34Z")

</div>

i also tried this code

```auto
{
  "custom_fields": [
{
"content": "Bellico",
"id": 25
}, 
{
"content": 123,
"id": 143}
    }
]
}

```

but same error!

---

<div class="post-metadata">

**Author:** ![Pav](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/pav/32/124_2.png) [@Pav](https://integration.keap.com/u/Pav)\
**Post date:** [August 25, 2023, 8:27pm UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280/5 "2023-08-25T20:27:27Z")

</div>

Tagging @Jeff_Arnold, as he has got experience with Zapier.

---

<div class="post-metadata">

**Author:** ![Jeff\_Arnold](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/jeff_arnold/32/14802_2.png) [@Jeff\_Arnold](https://integration.keap.com/u/Jeff_Arnold)\
**Post date:** [August 26, 2023, 5:31pm UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280/6 "2023-08-26T17:31:53Z")

</div>

Try this:

 ![zapier code](https://us1.discourse-cdn.com/flex019/uploads/infusionsoft1/original/2X/6/67f6b9ff5ec839e1b2fdfb4b2dafbd1007ef7c51.png)

Jeff

---

<div class="post-metadata">

**Author:** ![Fabrizio\_Marino](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@Fabrizio\_Marino](https://integration.keap.com/u/Fabrizio_Marino)\
**Post date:** [August 28, 2023, 8:45am UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280/7 "2023-08-28T08:45:30Z")

</div>

Thanks Jeff!! It Worked! And what if i want to add also a second choice to the field 25, let’s say “Manifattura meccanica”? Do i only need to add a comma and the value inside brackets?  
Does the same principle work for radio button? so {["Value], id}?  
Thank you very much!

---

<div class="post-metadata">

**Author:** ![Jeff\_Arnold](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/jeff_arnold/32/14802_2.png) [@Jeff\_Arnold](https://integration.keap.com/u/Jeff_Arnold)\
**Post date:** [September 1, 2023, 8:38pm UTC](https://integration.keap.com/t/update-custom-fields-list-value-via-api/91280/8 "2023-09-01T20:38:41Z")

</div>

{  
“custom\_fields”: [  
{  
“content”: [  
“Bellico”,  
“Manifattura meccanica”  
],  
“id”: 25, },  
{  
“content”: 123,  
“id”: 143  
}  
]  
}

This should be the code.

Thanks,  
Jeff
