Skip to main content
Answered

API Returns Cannot submit an array as a custom attribute value

  • March 27, 2025
  • 1 reply
  • 12 views

Hello,

 

We created a custom attribute with the list type called `Channel Networks`. When we try to update it via the API we get back the following error:

```

{
  type: 'error.list',
  request_id: 'REDACTED',
  errors: [
    {
      code: 'nested_custom_attributes',
      message: 'Cannot submit an array as a custom attribute value'
    }
  ]
}

```

Other custom attributes work fine, just list/array type ones fail.

```

const respIntercom = await fetch(

`https://api.intercom.io/contacts/${contact_id}`,

{

method: 'PUT',

headers: {

'Content-Type': 'application/json',

'Intercom-Version': '2.12',

Authorization: `Bearer ${process.env.INTERCOM_ACCESS_TOKEN}`

},

body: JSON.stringify({

"name": userData.user.name + " TEST",

"phone": userData.user.phone,

"last_seen_at": userData.user.last_online,

"signed_up_at": userData.user.created_at,

"custom_attributes": {

"ACME": userData.user.acme,

"Channel Networks": ["Channel 1", "Channel 2"],

}

})

}

);

```

Best answer by Jacques Reynolds

Hey ​@paulmwatson 👋 Jacques here from Intercom Support. I hope all is well today!

This issue is due to the fact that the Intercom API does not support updating custom attributes of the list type with an array. This is a known limitation, as the API can create or edit list-type custom attributes but does not allow updating them with an array of values. Instead, you need to use the list item ID to select the option, and only one option can be selected at a time.

Hope this is clear!

View original
Did this topic help you find an answer to your question?

1 reply

Jacques Reynolds
Intercom Team
Forum|alt.badge.img+4

Hey ​@paulmwatson 👋 Jacques here from Intercom Support. I hope all is well today!

This issue is due to the fact that the Intercom API does not support updating custom attributes of the list type with an array. This is a known limitation, as the API can create or edit list-type custom attributes but does not allow updating them with an array of values. Instead, you need to use the list item ID to select the option, and only one option can be selected at a time.

Hope this is clear!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings