Before you begin
- A file to upload. Any file works; the examples use a one-page PDF named
employment-agreement.pdf.
Step 1: Upload the file
A file is stored on its own and takes on a role only once something references it — as a document’s main file, as an attachment, or as an image placed on a page. Send the content asmultipart/form-data, in the file part:
Request
Response
fileNameis the name Circularo stores, without an extension. Omit it and the uploaded file’s own name is used, with its extension dropped.checksumis the SHA-512 hash of the stored content. Hash your local file and compare the two to be certain the upload arrived intact.anchorPositionsis empty because this upload asked for nothing to be located in the document.
id. It is the value later requests use to point at this file, wherever one is expected.
You do not have to upload separately.
POST /transactions also accepts the content inline and sends a document in a single call — see Quickstart: send your first document for signature. Upload first when you want to reuse the same file for several documents, or when you want the file identifier before you decide what to do with it.Step 2: Look up the file later
The file’s metadata is read back by its identifier:Request
Response
Step 3: Download the content
Thecontent sub-resource streams the bytes themselves:
Request
Response
Content-Disposition header naming it, so a browser or HTTP client treats it as a download. Read it as a byte stream and write it wherever your process keeps documents.
Complete example
Uploading a file, verifying it arrived intact, and downloading it again, as a Node.js script. Error handling is minimal for brevity — in production, inspect the error envelope of non-2xx responses.Next steps
- Turn the file into a document Circularo manages — Create a document from a file.
- Send it for signature straight away — Signing & approvals.