Upload modular content through Ruby API

Hello,

I’m a bit stuck on how to upload modular content when I’m creating a new record. I can’t see any docs on how to structure the JSON I’m sending. I have a piece of modular content called “Body” which has 3 modular blocks and I need to send them as an array.

Would anybody be able to help by providing a quick example of the structure?

Many thanks,
Jeff

I’ve managed to sort it but thought I’d put a note in here in case anyone else gets stuck.

So for each modular piece of content, use the Ruby client to create them as individual items and then pass the ids of those items into the modular content field (in my case “body”) so you have an array of ids.

Thank you @jeff.knox for the follow up!

We are working to upgrade our CM API docs and provide more examples for the JS and Ruby libraries, sorry for not having more examples already :frowning:

1 Like