Delete either a document or an empty folder by making API calls to the following endpoints in their listed order. See each endpoint's listed reference section for more information.
- To create a new document or folder, call POST /api/documents/path[docPath] (see Create a Document in a Folder with the Specified Path).
- To return the existing document or folder, call GET /api/documents/path[docPath] (see Return the Document with the Specified Path).
- Call one of the following endpoints:
- To delete the document or folder, call DELETE /api/documents/path[docPath] (see Delete the Document with the Specified Path).
- To delete the document or folder by its ID, call DELETE /api/documents/[docId] (see Delete the Document with the Specified ID).