LogoDOCS
OverviewAuthenticationRate LimitsErrors
Logo
Sign in →

The Envelope object

An Envelope object represents a signature request sent to one or more recipients. It bundles the documents to be signed, the recipients assigned to each document together with their form fields. The envelope's status tracks the request through its lifecycle, from creation and sending through completion, expiry, or voiding. Once a document has been signed by all of its recipients, the envelope references the final signed document and its audit log.

Attributes
idstring

Unique identifier for the envelope.

statusenum

The current status of the envelope.

Possible values:
draftcreatedin_progresscompletedexpiredvoided
documentsarray of objects

The documents included in this envelope.

createdAttimestamp

The date and time the envelope was created.

expiresAttimestamp

The date and time the envelope will expire if it is not completed.

completedAttimestamp

The date and time the envelope was completed, if applicable.

expiredAttimestamp

The date and time the envelope expired, if applicable.

voidedAttimestamp

The date and time the envelope was voided, if applicable.

voidReasonstring

The reason provided when the envelope was voided, if any.

metadataobject

Custom key-value data you set on the envelope at creation time.

1{2  "id": "69c0fa44f83ca6a7015f1c8c",3  "status": "completed",4  "documents": [5    {6      "sourceDocumentId": "69bd87a32da418e6c4d2azze",7      "signedDocumentId": "69bd87a32da418e6c4d2b100",8      "auditLogDocumentId": "69bd87a32da418e6c4d2b101",9      "recipients": [10        {11          "recipientId": "69d1a2b3c4d5e6f701234abc",12          "email": "[email protected]",13          "embedded": false,14          "status": "signed",15          "signedAt": "2024-02-14T09:12:03.000Z",16          "viewedAt": "2024-02-14T09:10:41.000Z",17          "fields": [18            { "name": "full_name", "type": "text", "value": "Anna Smith" },19            { "name": "signature", "type": "signature", "value": "..." }20          ]21        }22      ],23      "status": "completed",24      "completedAt": "2024-02-14T09:12:03.000Z"25    }26  ],27  "createdAt": "2024-02-13T15:56:12.607Z",28  "completedAt": "2024-02-14T09:12:03.000Z",29  "metadata": {30    "customerId": "cus_123",31    "department": "sales"32  }33}

Create Envelope

The Create Envelope endpoint creates a new envelope for one or more previously generated PDF documents.

Each document must include a sourceDocumentId: the ID of any PDFGate document that has fillable fields. This can be a PDF generated from HTML with form fields via the Generate PDF endpoint, a PDF with fields added through the Create PDF Fields endpoint, or a signing template set up with the dashboard's drag-and-drop designer. Each document must also include one or more recipients.

This endpoint creates the envelope in the created status. See Envelope Statuses for more details about the envelope lifecycle. After calling this endpoint, you should use the Send Envelope endpoint to email each recipient a link to the signing UI.

See the Getting Started guide for a complete example.

Request Body
documentsarray of objectsrequired

Array of documents to include in the envelope.

requesterNamestringrequired

Name of the user or system creating the envelope.

metadataobject

Sets custom data.

expiresInDaysinteger

Minimum: 1 day

Maximum: 90 days

Number of days until the envelope and its signing links expire, counted from the envelope creation date. If not provided, the account's default envelope expiration is used. The default setting can be changed in the dashboard under Settings > Signing.

POST/envelope
CURL
NODE.JS
PYTHON
GO
PHP
JAVA
C#
RUBY
1curl \2  -H "Content-Type: application/json" \3  -H "Authorization: Bearer YOUR_API_KEY" \4  --request POST \5  --data '{6    "requesterName":"John Doe",7    "documents":[8      {9        "sourceDocumentId":"6642381c5c61",10        "name":"Employment Agreement",11        "recipients":[12          {13            "email":"[email protected]",14            "name":"Anna Smith",15            "role":"signer",16            "reminderIntervalDays":3,17            "reminderAttempts":218          }19        ]20      }21    ]22  }' \23  https://api.pdfgate.com/envelope
JSON response - Envelope object
1{2  "id": "69c0fa44f83ca6a7015f1c8c",3  "status": "created",4  "documents": [5    {6      "sourceDocumentId": "69bd87a32da418e6c4d2azze",7      "recipients": [8        {9          "email": "[email protected]",10          "embedded": false,11          "status": "pending",12          "fields": []13        }14      ],15      "status": "pending"16    }17  ],18  "createdAt": "2024-02-13T15:56:12.607Z",19  "metadata": {20    "customerId": "cus_123",21    "department": "sales"22  }23}

Send Envelope

The Send Envelope endpoint sends an email to each recipient in the envelope with a secure link to access the signing UI and sign the document. The link remains valid until the envelope expires, after which it can no longer be used.

To ensure secure access, recipients must complete OTP (one-time password) verification before accessing the signing experience.

Embedded recipients receive no email. Sending activates the envelope for them, and their signing links are generated with the Create Embed Link endpoint.

Path parameters
idstringrequired

The envelope ID.

POST/envelope/{id}/send
CURL
NODE.JS
PYTHON
GO
PHP
JAVA
C#
RUBY
1curl \2  -H "Authorization: Bearer YOUR_API_KEY" \3  --request POST \4  https://api.pdfgate.com/envelope/{envelopeId}/send
JSON response - Envelope object
1{2  "id": "69c0fa44f83ca6a7015f1c8c",3  "status": "in_progress",4  "documents": [5    {6      "sourceDocumentId": "69bd87a32da418e6c4d2azze",7      "recipients": [8        {9          "email": "[email protected]",10          "embedded": false,11          "status": "pending",12          "fields": [],13          "signingLink": "https://api.pdfgate.com/sign/eyJhbGciOi..."14        }15      ],16      "status": "pending"17    }18  ],19  "createdAt": "2024-02-13T15:56:12.607Z",20  "metadata": {21    "customerId": "cus_123",22    "department": "sales"23  }24}

Get Envelope

The Get Envelope endpoint retrieves the current state of an envelope by its ID.

You can use this endpoint to track the envelope status, inspect document-level progress, and view recipient statuses.

Path parameters
idstringrequired

The envelope ID.

GET/envelope/{id}
CURL
NODE.JS
PYTHON
GO
PHP
JAVA
C#
RUBY
1curl \2  -H "Authorization: Bearer YOUR_API_KEY" \3  --request GET \4  https://api.pdfgate.com/envelope/{envelopeId}
JSON response - Envelope object
1{2  "id": "69c0fa44f83ca6a7015f1c8c",3  "status": "completed",4  "documents": [5    {6      "sourceDocumentId": "69bd87a32da418e6c4d2azze",7      "signedDocumentId": "69bd87a32da418e6c4d2b100",8      "auditLogDocumentId": "69bd87a32da418e6c4d2b101",9      "recipients": [10        {11          "email": "[email protected]",12          "embedded": false,13          "status": "signed",14          "signedAt": "2024-02-14T09:12:03.000Z",15          "viewedAt": "2024-02-14T09:10:41.000Z",16          "fields": []17        }18      ],19      "status": "completed",20      "completedAt": "2024-02-14T09:12:03.000Z"21    }22  ],23  "createdAt": "2024-02-13T15:56:12.607Z",24  "completedAt": "2024-02-14T09:12:03.000Z",25  "metadata": {26    "customerId": "cus_123",27    "department": "sales"28  }29}

Create Embed Link

The Create Embed Link endpoint generates a short-lived signing link for an embedded recipient, intended to be rendered inside your own application, for example in an iframe. The link expires 10 minutes after creation; generate a fresh one right before showing each signing session. The session itself keeps working after the link expires.

Only envelopes in the in_progress status are accepted: send the envelope first. The recipient must have been created with embedded set to true and must not have signed yet.

When the session ends, the iframe is redirected to the returnUrl with an event query parameter (signing_complete, voided, expired, or not_found) together with envelopeId, documentId, and recipientId. Existing query parameters on the URL are preserved. The redirect is a UI signal only. Confirm the result with the envelope.recipient.signed webhook event or by fetching the envelope.

For the full flow, read the embedded signing guide.

Path parameters
idstringrequired

The envelope ID.

Body parameters
documentIdstringrequired

ID of the envelope document the recipient signs.

recipientIdstringrequired

ID of the embedded recipient, as returned in the envelope response recipients.

returnUrlstringrequired

URL the signing session redirects to when it ends.

POST/envelope/{id}/embed-link
CURL
NODE.JS
PYTHON
GO
PHP
JAVA
C#
RUBY
1curl \2  -H "Authorization: Bearer YOUR_API_KEY" \3  -H "Content-Type: application/json" \4  --request POST \5  --data '{"documentId": "{documentId}", "recipientId": "{recipientId}", "returnUrl": "https://app.example.com/signed?flow=abc123"}' \6  https://api.pdfgate.com/envelope/{envelopeId}/embed-link
JSON response
1{2  "url": "https://document.pdfgate.com/embed/sign/eyJhbGciOi...",3  "expiresAt": "2024-02-13T16:06:12.607Z"4}

Void Envelope

The Void Envelope endpoint voids (cancels) an envelope in the created or in_progress status. Recipients who have not signed yet receive an email letting them know the signature request has been cancelled, and their signing links stop working immediately.

Documents that were already signed by all recipients are not affected: they remain signed and stay available to their recipients together with their audit logs. Documents that were still waiting for signatures become voided and can no longer be signed through this envelope.

Voiding is only possible while at least one signature is still outstanding. Once the last recipient signs, the envelope can no longer be voided, even if its status still shows in_progress for a short time while PDFGate finalizes the signed documents and audit logs.

Path parameters
idstringrequired

The envelope ID.

Body parameters
reasonstringoptional

The reason the envelope was voided, up to 500 characters. The reason is visible to recipients: it is included in the cancellation email sent to recipients who had not signed yet.

POST/envelope/{id}/void
CURL
NODE.JS
PYTHON
GO
PHP
JAVA
C#
RUBY
1curl \2  -H "Authorization: Bearer YOUR_API_KEY" \3  -H "Content-Type: application/json" \4  --request POST \5  --data '{"reason": "Contract terms changed"}' \6  https://api.pdfgate.com/envelope/{envelopeId}/void
JSON response - Envelope object
1{2  "id": "69c0fa44f83ca6a7015f1c8c",3  "status": "voided",4  "documents": [5    {6      "sourceDocumentId": "69bd87a32da418e6c4d2azze",7      "recipients": [8        {9          "email": "[email protected]",10          "embedded": false,11          "status": "voided",12          "fields": []13        }14      ],15      "status": "voided"16    }17  ],18  "createdAt": "2024-02-13T15:56:12.607Z",19  "voidedAt": "2024-02-20T09:12:45.101Z",20  "voidReason": "Contract terms changed",21  "metadata": {22    "customerId": "cus_123",23    "department": "sales"24  }25}

Delete Envelope

The Delete Envelope endpoint permanently deletes an envelope and the files it produced. This action can't be undone.

When an envelope is deleted:

  • The signed documents and audit log files produced by the envelope are permanently removed from storage.
  • Recipient personal data, form field values, and signatures stored on the envelope are anonymized.
  • Recipient preview links stop working.
  • The envelope is no longer accessible through the API.

The source documents the envelope was created from are not deleted. To remove those as well, use the Delete Document endpoint.

Only envelopes in draft, completed, expired, or voided status can be deleted. An envelope in created or in_progress status can't be deleted: void the envelope first, then delete it. If the envelope still has documents being finalized after signing, deletion is rejected until they complete.

Deleting an envelope does not affect charges for signatures that were already completed.

Path parameters
idstringrequired

The envelope ID.

DELETE/envelope/{id}
CURL
NODE.JS
PYTHON
GO
PHP
JAVA
C#
RUBY
1curl \2  -H "Authorization: Bearer YOUR_API_KEY" \3  --request DELETE \4  https://api.pdfgate.com/envelope/{envelopeId}
Empty response
1200 OK

Envelope Statuses

An envelope moves through different statuses during the signing process. The status shows whether the envelope has been created, sent for signing, completed, expired, voided, or deleted.

Lifecycle

Envelopes created through the dashboard start with the draft status while they are being configured. Once sent, the status moves to created and then immediately to in_progress.

Envelopes created through the API start directly with the created status.

After the envelope is sent using the Send Envelope endpoint, the status becomes in_progress.

When all required documents and signatures are completed, the envelope becomes completed.

If an envelope is not completed before its expiration date, it becomes expired. By default envelopes expire 30 days after creation; the default can be changed in the dashboard signing settings, and per envelope with the expiresInDays parameter of the Create Envelope endpoint (up to 90 days). Sandbox envelopes always expire after 5 days.

An envelope in created or in_progress can be cancelled at any time using the Void Envelope endpoint, moving it to voided. Recipients who have not signed yet are notified and their signing links stop working. Documents already signed by all recipients are not affected.

An envelope in draft, completed, expired, or voided status can be permanently deleted using the Delete Envelope endpoint.

Once an envelope expires or is voided, unsigned documents inside it can no longer be signed through the original envelope. To collect signatures for those documents, create a new envelope and resend the signature requests.

You are not charged for signatures that were not completed before the envelope expired or was voided.

Reminders

Reminder emails are sent only while the envelope is active. Reminders stop when:

  • the recipient signs,
  • the envelope is completed,
  • the envelope expires,
  • the envelope is voided,
  • or the configured reminder attempt limit is reached.
Status reference
draft

The envelope is being configured in the dashboard. Recipients and fields have not been finalized yet.

created

The envelope has been created but has not been sent for signing yet.

in_progress

The envelope has been sent to the recipients and is waiting for one or more required signatures.

completed

All required recipients have signed the assigned documents in the envelope.

expired

The envelope was not completed before its expiration date. Unsigned documents inside the envelope can no longer be signed through this envelope. To collect the remaining signatures, create a new envelope and resend the signature requests.

voided

The envelope was cancelled by the sender. Recipients who had not signed were notified and their signing links stopped working. Documents already signed by all recipients keep their signed status and remain available to their recipients.

deleted

The envelope was permanently deleted by the sender. The signed documents and audit logs it produced were removed from storage, recipient data was anonymized, and the envelope is no longer accessible.