API for send to inbox should return the ID of document


#1

Or is there a way to get the document ID of inbox?

After inserting an item with inbox/add, I can’t insert an subitems to new item.
Because I can get new item id from inbox/add but do not have document id.
So I can’t use doc/edit.


#2

Maybe a broader approach would be an API endpoint that returns the document ID of the document that is defined as the inbox target.

Something like POST https://dynalist.io/api/v1/inbox/get and the response could be

{
  "_code": "OK",
  "_msg": "",
  "file_id": "<file id of inbox document>"
}

#3

That is a good idea.

I want POST https://dynalist.io/api/v1/inbox/get too.

OR

POST https://dynalist.io/api/v1/inbox/add response could include file_id:

{
  "_code": "OK",
  "_msg": "",
  "file_id": "<file id of inbox document>",  // add this
  "node_id": "<new node ID>",
  "index": 0 
}