Thank you @perry.swoboda, it was what I was after. I too often neglect looking at API constructors.
For a bit of context, yes you can open a document without any view opened. For instance, and my specific case, using doc.EditFamily(Family) will open the family document in the background. OpenDocumentFile() will do just that as well, API documentation says : "This method opens the document into memory but does not make it visible to the user in any way."
What my code does is from a family opened in UI, it goes through the tree of nested families, make changes to all of them and reloads them reversing the tree. I then need to Close these documents to release memory.
I just wanted to prevent closing of all documents but only close the ones opened by my script (without needing to log them in any way).
As for @TripleM-Dev.net fear (?), Close method returns an InvalidOperationException if you try to close a link, or any document you shouldn't close, like the active one, so we're safe here 😉
Regards,