Streaming live at 10am (PST)

Update CMS Item Fields via API



I am trying to do a bulk change in one collection via API. This is the piece of code:

function updateItem(item) { return webflow .updateItem({ collectionId: guidesId, itemId:, fields: { name:, slug: item.slug, _archived: item.archived, _draft: item.draft, cta: '2' } }) .catch(err => console.error(err)); }

If I run it like this, I get the following error:

'Field \'slug\': Unique value is already in database: \'my-awesome-slug\''

However, if I dont submit slug, I get this:
'Field \'slug\': Field is required'

I don’t understand why I have to resubmit fields that are already filled. The only field I care about is “cta-1”. Can someone help me?