Skip to main content
Every document Circularo manages is built on a file, and every signed result comes back as one. This guide uploads a PDF, looks its metadata up again, and downloads its content — three calls that cover the whole file surface.

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 as multipart/form-data, in the file part:
Request
The same upload with curl:
Response
A few things to notice:
  • fileName is the name Circularo stores, without an extension. Omit it and the uploaded file’s own name is used, with its extension dropped.
  • checksum is the SHA-512 hash of the stored content. Hash your local file and compare the two to be certain the upload arrived intact.
  • anchorPositions is empty because this upload asked for nothing to be located in the document.
Keep the 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.
When the file is a PDF, the upload can also locate text in it and return the positions where signature fields belong, ready to be used as placed fields — see Position fields with anchor text.

Step 2: Look up the file later

The file’s metadata is read back by its identifier:
Request
Response
This is the same metadata the upload returned, without the anchor positions — those belong to the upload alone.

Step 3: Download the content

The content sub-resource streams the bytes themselves:
Request
Response
The body is the file, not JSON: the response carries the file’s own media type and a 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