LogoDOCS
OverviewAuthenticationRate LimitsErrors
Logo
Sign in →

The Webhook object

The Create Webhook and Get Webhook endpoints return a Webhook object describing the endpoint, its subscribed event types, and its status.

Attributes
idstring

Unique identifier for the webhook.

urlstring

The URL PDFGate sends event payloads to.

eventTypesarray of enums

The event types this webhook is subscribed to.

Possible values:
envelope.sentenvelope.completedenvelope.expiredenvelope.document.completed
statusenum
Possible values:
activedisabled
descriptionstring

A description you set for identifying the webhook.

secretstring

The signing secret used to verify incoming webhook payloads. Only included in the response when the webhook is first created.

createdAttimestamp

The date and time the webhook was created.

updatedAttimestamp

The date and time the webhook was last updated.

1{2  "id": "69f5b65d131aa112dbjja",3  "url": "https://example.com/webhooks/pdfgate",4  "eventTypes": ["envelope.sent", "envelope.completed"],5  "status": "active",6  "description": "Production envelope events",7  "secret": "whsec_...",8  "createdAt": "2026-05-31T08:20:00.000Z",9  "updatedAt": "2026-05-31T09:15:00.000Z"10}

Create Webhook

A webhook endpoint must have a url and a list of enabled eventTypes.

You can also set up webhook endpoints in the Dashboard from Settings > Webhooks.

To get started with receiving and verifying events, follow the webhooks guide.

The webhook signing secret is returned in the create response and can also be found in the Dashboard. Store it securely and use it to verify incoming webhook signatures.

Request Body
urlstringrequired

The URL of the webhook endpoint.

descriptionstring

Optional description for identifying the webhook.

eventTypesarray of stringsrequired

List of event types to subscribe to. See Webhook Events for the supported events.

Acceptable values:
envelope.sentenvelope.completedenvelope.expiredenvelope.document.completed
POST/webhook
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    "url": "https://example.com/webhooks/pdfgate",7    "description": "Production envelope events",8    "eventTypes": ["envelope.sent", "envelope.completed"]9  }' \10  https://api.pdfgate.com/webhook
JSON response - Webhook object
1{2  "id": "69f5b65d131aa112dbjja",3  "url": "https://example.com/webhooks/pdfgate",4  "eventTypes": ["envelope.sent", "envelope.completed"],5  "description": "Envelope events",6  "status": "active",7  "secret": "whsec_...",8  "createdAt": "2026-05-31T08:20:00.000Z"9}

Get Webhook

Retrieve a webhook by ID.

Path parameters
idstringrequired

The webhook ID.

GET/webhook/{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/webhook/{webhookId}
JSON response - Webhook object
1{2  "id": "69f5b65d131aa112dbjja",3  "url": "https://example.com/webhooks/pdfgate",4  "eventTypes": ["envelope.sent", "envelope.completed"],5  "description": "Production envelope events",6  "status": "active",7  "createdAt": "2026-05-31T08:20:00.000Z",8  "updatedAt": "2026-05-31T09:15:00.000Z"9}

Delete Webhook

Delete a webhook endpoint by ID. Deleting a webhook stops future event deliveries for that endpoint.

Path parameters
idstringrequired

The webhook ID.

DELETE/webhook/{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/webhook/{webhookId}
No Content response
1204 No Content

Webhook Events

Webhook events describe the changes that PDFGate can send to your configured webhook endpoints.

Event types
envelope.sent

Occurs when PDFGate sends signing request emails to recipients so they can start signing the envelope documents.

envelope.completed

Occurs when all required documents in an envelope are signed.

envelope.expired

Occurs when an envelope expires because not all documents in the envelope were signed within one month of envelope creation.

envelope.document.completed

Occurs when a single document inside an envelope is signed by all recipients.

Sample payload - envelope.sent / envelope.completed / envelope.expired
1{2  "eventId": "69f5b65d131aa112dbjja",3  "event": "envelope.completed",4  "timestamp": "2024-02-14T09:12:03.000Z",5  "resource": {6    "kind": "envelope",7    "id": "69f5b65d131aa112dbssa"8  },9  "data": {10    "envelope": {11      "id": "69f5b65d131aa112dbssa",12      "status": "completed",13      "documents": [14        {15          "sourceDocumentId": "69f5b65d131aa112dbzzd",16          "signedDocumentId": "ddsds9sdhds9s9dsa",17          "auditLogDocumentId": "6sd8ds5d131aa112dda",18          "name": "Sample Agreement.pdf",19          "status": "completed",20          "recipients": [21            {22              "email": "[email protected]",23              "name": "Sample Recipient",24              "status": "signed",25              "previewLink": "https://document.pdfgate.com/preview/dfbdfbdbfjbfbdfbsdsfdsfdsfsdssd"26            }27          ]28        }29      ],30      "createdAt": "2024-02-13T15:56:12.607Z",31      "completedAt": "2024-02-14T09:12:03.000Z"32    }33  }34}
Sample payload - envelope.document.completed
1{2  "eventId": "69f5b65d131aa112dbjja",3  "event": "envelope.document.completed",4  "timestamp": "2024-02-14T09:12:03.000Z",5  "resource": {6    "kind": "envelope",7    "id": "69f5b65d131aa112dbssa"8  },9  "data": {10    "envelopeId": "69f5b65d131aa112dbssa",11    "sourceDocumentId": "69f5b65d131aa112dbzzd",12    "signedDocumentId": "ddsds9sdhds9s9dsa",13    "auditLogDocumentId": "6sd8ds5d131aa112dda",14    "documentStatus": "completed"15  }16}