Post nested json api action (front end)

This should be really simple but I can’t see how to do it.

I need to post to an API from the front end using the API action. The API requires JSON including some nested data e.g.
“personalizations”: [
{
“to”: [
{
“email”: “email@email1.com
},
{
“email”: “email@email2.com
}
],
“dynamic_template_data”: {
“first_name”: “{{firstname}}”,
“last_name”: “{{lastname}}”,
}
}
],

On the server side when I select JSON data for an API, I have the option to enter the JSON directly. On the front end API, it doesn’t seem to have that option. I can only enter data via the GUI which doesn’t appear to support nested data.

Is there a way to do this?

Thanks,

Paul

In case others need this in future, I worked it out. You need to do the api action as part of a page flow. Then the JSON editor becomes available

2 Likes