API: How to insert to the top of the document?

Hi,

I can add new nodes with POST https://dynalist.io/api/v1/doc/edit with “action”: “insert”. But I have to set the parent_id.

Is there a way to add nodes to the top level of the document?

In this case there is no parent_id. If I don’t set the parent_id then the error message is “Can’t find node with id null”. If I set the file_id as the parent_id then “Can’t find node with id abc”.

Thanks,
Norbert

Should be just root. Could you try if that works?

The "parent_id": "root" works perfectly, thanks!

1 Like

Great! Sorry for not documenting that.