Contentful logo

Contentful Community

Do a POST request to add a content entry along with its nested children from one space to another sapce

Hi guys,

I am able to create a entry in a space using this:

client.getSpace('<space_id>')
.then((space) => space.createEntry('<content_type_id>', {
 fields: {
  title: {
  'en-US': 'Entry title'
 }
}
}))
.then((entry) => console.log(entry))
.catch(console.error)

which is fine.

But what I want is to make a GET request to one space to get an entry and do a POST request to another space to create the new entry. I made sure that both spaces having similar content-types.

My question is the above approach even possible? Does your content-management-api allow that?

can someone guide me the correct direction please?