Most PDFGate endpoints that generate, transform, or store a file return a Document object describing the result. This is the shape returned by jsonResponse: true requests, and by the Get Document endpoint.
Unique identifier for the document.
The current status of the document.
Indicates which operation produced this document.
A temporary, pre-signed URL from which the file can be downloaded. Only present when a preSignedUrlExpiresIn value was provided on the request that returned this object; otherwise omitted. The URL expires after the requested duration.
The file size in bytes.
Custom key-value data you set on the document at creation time.
The ID of the source document this file was generated from, if any. Present when the document was produced by an operation that transforms an existing file, such as Flatten, Compress, Protect, or Watermark.
The date and time the document was created.
The date and time the underlying file is scheduled to be removed from storage, based on your account's storage retention setting. Absent if no retention duration applies.
Retrieves a Document object containing metadata and file details for a previously generated or uploaded document.
The ID of the document to retrieve.
Minimum: 60 seconds
Maximum: 86400 seconds (24 hours)
Requests a temporary authorized URL for the file. After this duration, the URL automatically expires and can no longer be used to download the PDF. The value must be provided in seconds.
Deletes a document. This performs a soft delete to preserve internal records and maintain audit integrity.
When a document is deleted:
Note: Documents used as a source in an envelope with in_progress status cannot be deleted. A document can only be deleted once all associated envelopes are in created, completed, or expired status.
The ID of the document to delete.
Retrieves a raw PDF file previously generated or uploaded.
Note: To access a generated file, you must enable file storage in your PDFGate dashboard under Settings → Storage. Files are retained only for the configured storage duration. By default, file storage is disabled.
The ID of the document whose file should be downloaded.
Uploads a PDF document. The document can be provided either as a file upload or by specifying a publicly accessible URL where the PDF is hosted.
File type: .pdf
Maximum size: 500 mb
The PDF file to be uploaded.
Use this parameter if you want to upload a PDF file accessible at a public URL.
Minimum: 60 seconds
Maximum: 86400 seconds (24 hours)
Use this to control temporary authorized access to files. After this duration, the URL automatically expires and can no longer be used to download the PDF. The value must be provided in seconds.
If you need to generate a new pre-signed URL for an existing document, use the Get Document endpoint.
Sets custom data to your document record.