Skip to content

Uploads

Upload

Store PDF, DOCX, or PNG files in SignatureAPI and reference them as document sources in envelopes.

An upload is a file stored in SignatureAPI. You can use an upload as the source file for a document in an envelope. Uploads are the simplest way to supply document files when you do not want to host them yourself.

After uploading a file, pass the returned url value as the url property of a document.

The following file formats are supported:

FormatMedia Type
PDFapplication/pdf
DOCXapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
PNGimage/png

Retention

Uploads have one of two retention types, indicated by the retention property:

RetentionDescription
TemporaryCreated through the API. Automatically deleted 24 hours after creation. Use this for one-time document sends.
PermanentStored indefinitely and reusable across multiple envelopes. Identified by a unique key. Created by storing an upload through the API or uploading through the Library in your dashboard.
An API upload is temporary until you store it. A temporary upload, a permanent upload or a Library file can each be a document's url.
From your file to an envelope document4 parts: Your PDF or DOCX, Temporary upload, Permanent upload, Envelope document. Connections: Your PDF or DOCX to Temporary upload (Create Upload); Temporary upload to Permanent upload (Store Upload); Permanent upload to Envelope document (url).Your PDF or DOCXTemporary uploadPermanent uploadEnvelope documentCreate UploadStore Uploadurl
Your PDF or DOCXTemporary uploadPermanent uploadEnvelope documentCreate UploadStore Uploadurl
Diagram as text

Parts

  • Your PDF or DOCX: A file on your server, at most 4.5 MB.
  • Temporary upload: Deleted 24 hours after creation. Its url works as a document url until then.
  • Permanent upload: Has a unique key and never expires. Library files are permanent uploads too.
  • Envelope document: Set the document's url to the upload's url.

Connections

  • Your PDF or DOCX to Temporary upload: Create Upload
  • Temporary upload to Permanent upload: Store Upload
  • Permanent upload to Envelope document: url

To see the pages, placeholders and template fields SignatureAPI finds in an uploaded PDF or DOCX, call Retrieve upload structure.

The Upload resource replaces the File resource. The File resource is soft-deprecated but remains available for backward compatibility.

Attributes

idstring

The unique identifier of the upload.

The retention type of the upload.

ValueDescription
temporaryThe file is automatically deleted 24 hours after creation.
permanentThe file is stored indefinitely. Created by storing an upload or through the dashboard library.
keystring

A unique identifier for the upload within your account. Present only on permanent uploads (retention is permanent).

Only lowercase letters, numbers, hyphens, and underscores are allowed. Maximum 100 characters.

urlstring

The internal URL used to reference this upload in other API calls, such as document.url.

You cannot use this URL to download the file directly.

formatenum

The file format of the upload.

ValueDescription
pdfA PDF file (application/pdf).
docxA DOCX file (application/vnd.openxmlformats-officedocument.wordprocessingml.document).
pngA PNG image (image/png).
sha_256string

The SHA-256 hash of the uploaded file, in hexadecimal format.

sizeinteger

The size of the uploaded file in bytes. Maximum file size: 4.5 MB.

The date and time when the upload was created, in ISO 8601 format.

The date and time when the upload will be automatically deleted, in ISO 8601 format. Present only on temporary uploads (retention is temporary). The expiration is 24 hours after creation.