Before you begin
- An uploaded file. The document is built on a file identifier — Upload and download files shows how to obtain one.
- Attaching files needs the
add_file_attachmentsright. Without it, a create call that carriesattachmentsis rejected with403; creating documents without them is unaffected.
Step 1: Create the document
A title and the file are all a document needs:Request
Response
- The document renames its main file after itself:
mainFile.fileNamematchestitle, not the name the file was uploaded with. metadataDefinitionwas not given, so the document was created withd_default. The definition decides which structured fields the document can carry — Store structured data on a document covers them.foldersplaces the document at the root of your personal tree, andtransactionisnot-started: nothing has been sent to anyone yet.webUrlis a ready-made link to the document in the Circularo web app, for people who have an account there.
id. Every later call — sending the document, reading it, downloading its file — addresses the document by it.
Step 2: Create a document with more than the minimum
The same call accepts more than a title and a file. This one creates a second document from a separately uploaded agreement, and gives it a category and a supporting file alongside the main one:Request
Response
- Each attachment references a file you have already uploaded.
fileNameis how the attachment is presented, andisPublicdecides whether external recipients of the document may see it. - Attachments are supplied while the document is being created, together with everything else it is made of.
categorygroups documents by a label your environment has configured.GET /mereturns the available ones insettings.documentCategories.
Step 3: Read the document back
A document is retrieved by its identifier, and the response is the same representation the create call returned:Request
Response
transaction.status is not-started until you send it to someone, folders lists the folder trees it sits in, and trashed tells you whether it has been moved to the trash.
Complete example
Uploading two files and creating a document with an attachment, as a Node.js script. Error handling is minimal for brevity — in production, inspect the error envelope of non-2xx responses.Next steps
- Fill the document’s structured fields — Store structured data on a document.
- Send the document for signature or approval — Signing & approvals.
- Retry a create safely after a timeout — Retry requests safely.