Hello, I would like to use the CMS api endpoint to insert an item that has a multi-image field , image field, and multi-reference field (provided in screenshot) I’m using developers webflow playground: Create Collection Item and I have the below
const fetch = require('node-fetch');
const url = 'https://api.webflow.com/v2/collections/6674bb3aec3eac8c59a2152e/items';
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json',
authorization: 'Bearer token'
},
body: JSON.stringify({
isArchived: false,
isDraft: false,
fieldData: {
name: 'new post',
post: 'hello',
media: '[{ "url": "https://fastly.picsum.photos/id/331/200/300.jpg?hmac=p5C3371_uSYqznhNsddJ6h1t3gMS35ijqJoWBTuBRIQ"}]',
coverphoto: '{ "url": "https://fastly.picsum.photos/id/331/200/300.jpg?hmac=p5C3371_uSYqznhNsddJ6h1t3gMS35ijqJoWBTuBRIQ"}'
}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
I’m able to get back a 200 response but I don’t see the images/multi-images uploaded. I also don’t know how to populate the membership multi-reference field via an api endpoint