How to add a structure field entry programmatically

Hi all,

whats the api call to add an entry to a structure field?

THX!

I don’t think there is one, you’d have to create your own endpoint. What’s your use case?

users should add entries via frontend. form submit -> controller -> add entry

similar to $page->createChild / structure->createItem

There are examples here how to add items to a structure field. You don’t need an API endpoint.

https://forum.getkirby.com/search?q=addToStructure

thanks alot!