Webhooks
Receive real-time notifications when case and flow events occur in NextSign.
Webhooks
NextSign webhooks let NextSign push case and flow events to your system in near real time. Use them when you want your backend to react to signing activity without polling the API.
Common Use Cases
- Update internal systems when a case is created, signed, or denied
- Start document archival or downstream processing after signing
- Keep CRM or ERP records in sync with NextSign activity
- React to reminder and expiry events in your own workflow engine
- Handle completed webflows without polling for status changes
Where to Configure Webhooks
Manage webhooks from the Webhooks page in the NextSign dashboard.
From there you can create, edit, enable or disable webhooks, configure custom headers, and inspect recent delivery runs.
You can also list and create webhooks with an API key. See Create Webhooks via API.
Creating a Webhook
Name
Use a descriptive internal name so the webhook is easy to identify in the dashboard.
Example: Signed case webhook
Triggers (Required)
Select one or more trigger values. Each selected trigger can independently deliver a webhook request to the same URL.
| Label | Trigger Value | Description |
|---|---|---|
| Case created | case_created | Sent when a case is created |
| Recipient signed | recipient_signed | Sent when a recipient signs |
| Recipient approved | recipient_approved | Sent when an approver (recipient with signingSchema: "approve") approves the documents |
| Recipient viewed | recipient_viewed | Sent the first time a recipient opens their signing page, whatever channel the link came through. Carries an event object, see Recipient Viewed Payload |
| Recipient name mismatch | recipient_name_mismatch | Sent when a recipient signs with an e-ID (such as MitID or BankID) whose name has nothing in common with the name the recipient was added with. Carries an event object, see Recipient Name Mismatch Payload |
| Case signed | case_signed | Sent when the case is fully signed |
| Case denied | case_denied | Sent when a recipient denies the case |
| Workflow completed | webflow.completed | Sent when a webflow completes |
| Webflow rejected | webflow.rejected | Sent when a recipient rejects a webflow on their form page, which forms can allow. Carries an event object, see Webflow Rejected Payload |
| Case reminder sent | case.reminder.sent | Sent when a reminder email is sent |
| Case expired | case.expiry.expired | Sent when a case expires |
| Case expiry 7 days | case.expiry.7days | Sent when a case is 7 days from expiry |
| Delivery failed | case.delivery.failed | Sent when a delivery to a recipient fails: an e-Boks delivery that is rejected, for example because the CPR is not registered for Digital Post, or a case email (invitation or reminder) that bounces. Carries an event object, see Delivery Failed Payload |
| e-Boks delivered | case.eboks.delivered | Sent when e-Boks has placed the message (invitation or reminder) in the recipient's e-Boks. Carries an event object, see e-Boks Delivered and Opened Payload |
| e-Boks opened | case.eboks.opened | Sent when the recipient has opened the message in e-Boks. Needs read receipts on the e-Boks template. Carries an event object, see e-Boks Delivered and Opened Payload |
You can attach multiple trigger values to a single webhook configuration.
URL (Required)
This is the public endpoint on your server that will receive webhook deliveries.
https://example.com/webhooks/nextsignLocalhost URLs will not receive webhook traffic unless you expose them with a tunneling service such as ngrok.
The URL can't contain #. Everything after # is never sent in an HTTP request, so the delivery would go to a different address. This usually happens when you copy the address bar of a request viewer instead of its endpoint: on webhook.site, use https://webhook.site/<id>, not https://webhook.site/#!/view/<id>.
Method
NextSign supports POST, GET, PUT, and DELETE delivery methods.
- Default:
POST - Recommended:
POST
If you do not configure a Content-Type header yourself, NextSign sends application/json.
Active
Use the active toggle to enable or pause delivery without deleting the webhook configuration.
- On: events are delivered
- Off: events are ignored for this webhook
Folders (Optional)
Limit the webhook to one or more folders. Then only cases and webflows in those folders send it, and cases in other folders do not. With no folder selected, the webhook gets every case and webflow, as before.
- A case counts by the folder it is in when the webhook is sent. A case moved to another folder follows the webhooks of its new folder from then on.
- Renaming a folder does not change which webhooks its cases send.
- If a folder the webhook is limited to is deleted, it no longer matches any case. The webhook then only gets the cases of its other folders, or none.
- Partner triggers (
partner.customer.*) do not belong to a folder and are always sent. - Send test sends the case you pick, whatever its folder.
Use it to send each department's cases to its own system, for example one webhook for the folder Sales and another for HR.
Headers (Optional)
Custom headers are sent exactly as configured in the dashboard.
Example:
| Key | Value |
|---|---|
X-Webhook-Secret | your-shared-secret |
X-API-Version | 2026-03 |
Common uses:
- Pass a shared secret your server can validate
- Add routing metadata for your integration
- Version your internal webhook consumer
NextSign does not generate an HMAC signature automatically for webhook requests. If you want to verify origin, configure a shared secret header such as X-Webhook-Secret and compare the exact header value in your handler.
Create Webhooks via API
You can list and create a company's webhooks with an API key instead of the dashboard, for example to set up webhooks for every customer account you integrate. A webhook created this way is the same as one created in the dashboard: it shows on the Webhooks page, where the customer can edit, pause or delete it, and it is delivered and retried in the same way.
Send an API key of the company the webhook belongs to as Authorization: Bearer. A key from any other company gets 401.
List webhooks
GET https://www.nextsign.dk/api/company/{companyId}/webhookscurl https://www.nextsign.dk/api/company/66263484e601d81006d1a132/webhooks \
-H "Authorization: Bearer $API_KEY"Returns 200 with an array of the company's webhooks, each a webhook object. A company without webhooks returns [].
Create a webhook
POST https://www.nextsign.dk/api/company/{companyId}/webhooks| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Internal name shown in the dashboard |
triggers | string[] | Yes | One or more trigger values, see below |
url | string | Yes | The endpoint that receives deliveries |
method | string | No | POST (default), GET, PUT or DELETE |
headers | object | No | Custom headers sent with every delivery, as header name to value |
active | boolean | No | true (default) delivers events. false creates the webhook paused |
folderIds | string[] | No | Folder IDs. Only cases and webflows in these folders send the webhook, see Folders. Left out or []: every case. A case's folder ID is folder.id in v3 case responses |
Valid triggers values:
case_created
case_signed
case_denied
case.reminder
case.reminder.sent
case.expiry.expired
case.expiry.7days
case.delivery.failed
case.eboks.delivered
case.eboks.opened
recipient_signed
recipient_approved
recipient_viewed
recipient_name_mismatch
webflow.completed
webflow.rejected
partner.customer.registered
partner.customer.credits_grantedMost of them are described under Triggers. The other three:
case.reminder: sent when a recipient on the case is due a reminder under the case's reminder settings, whether or not NextSign sends the reminder itself. With automatic reminders turned off, it is your cue to remind the recipient yourself.case.reminder.sentis sent when NextSign has sent one.partner.customer.registered: only for partners with the integration webhook enabled, see Partner Program. Any company can add it, but it only fires for those partners, and it is delivered once, without retries.partner.customer.credits_granted: only for partners that invoice their own customers. Sent for every credit grant to one of those customers, whoever made it: you through the API, NextSign, or the automatic top-up. Retried like case webhooks. See Grant Credits to Your Customers.
To verify that deliveries come from NextSign, set a shared secret in headers. It is sent with every delivery:
curl -X POST https://www.nextsign.dk/api/company/66263484e601d81006d1a132/webhooks \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Signed cases",
"triggers": ["case_signed", "recipient_signed"],
"url": "https://example.com/webhooks/nextsign",
"method": "POST",
"headers": { "X-Webhook-Secret": "your-shared-secret" },
"active": true
}'Returns 201 with the created webhook:
{
"name": "Signed cases",
"triggers": ["case_signed", "recipient_signed"],
"trigger": "case_signed",
"active": true,
"url": "https://example.com/webhooks/nextsign",
"method": "POST",
"headers": { "X-Webhook-Secret": "your-shared-secret" },
"_id": "6ae1f46c2fe4f57976ab1b29"
}- Every call creates a new webhook, even for a URL and triggers that already have one, and each of them is delivered. List the webhooks first if your setup can run more than once.
- NextSign does not call or check the URL when the webhook is created. The first request it gets is a real delivery.
Webhook object
| Field | Type | Description |
|---|---|---|
_id | string | The webhook's ID |
name | string | The name. Left out when the webhook has none |
triggers | string[] | The trigger values the webhook listens to |
trigger | string | The first value of triggers, kept for older integrations |
active | boolean | Whether events are delivered |
url | string | The endpoint |
method | string | The HTTP method of deliveries |
headers | object | The custom headers, values included. Left out when there are none |
folderIds | string[] | The folder IDs the webhook is limited to. Left out when it gets every case |
Webhooks created in the dashboard long ago can carry other fields. Ignore any you do not use.
Errors
| Status | Body | When |
|---|---|---|
400 | { "error": "Triggers and url are required" } | triggers is missing or empty, or url is missing |
400 | { "error": "The webhook URL can't contain '#'. …", "code": "webhook-url-fragment" } | url contains #. For a webhook.site viewer link the body also has suggestedUrl, the endpoint to use instead |
400 | { "error": "<validation message>" } | A value in triggers, or method, is not one of the valid values. The message names the value |
400 | { "error": "Unknown folder: <id>" } | A value in folderIds is not the ID of one of the company's folders |
400 | { "error": "folderIds must be an array of folder ids" } | folderIds is not an array |
401 | { "message": "Unauthorized: No bearer token or no access" } | No API key, a revoked or unknown key, or a key from another company |
404 | { "error": "Company not found" } | No company has that ID |
405 | { "error": "Method PUT Not Allowed" } | Another method on this path, such as PUT or DELETE |
Delivery Behavior
When a selected trigger fires, NextSign sends an HTTP request to the configured URL. The request body contains the machine-readable trigger name plus either a case object or a flow object, depending on what caused the webhook.
Expected Response
Your endpoint should:
- Return a
2xxHTTP status code to acknowledge successful delivery - Respond quickly and offload slow work to background jobs or queues
- Treat retries as possible duplicate deliveries
Retry Logic
If delivery fails or your endpoint returns a non-2xx response, NextSign retries using exponential backoff.
- First retry: about 2 minutes after the failed attempt
- Then approximately: 4, 8, 16, 32 minutes, and so on
- Retries continue until delivery succeeds or the retry limit is reached
- The current retry limit is up to 14 total delivery attempts
Webhook deliveries can be repeated when retries happen. Make your webhook handler idempotent.
For a focused guide, see Webhook Retry Logic.
Payload Structure
Case Event Payload
Case-related triggers send a case object:
{
"trigger": "case_signed",
"case": {
"_id": "66263484e601d81006d1a132",
"title": "Contract Agreement",
"updatedAt": "2024-01-15T14:30:00.000Z",
"recipients": [
{
"name": "Andreas Lauridsen",
"email": "al@example.com"
}
],
"signedDocuments": [
{
"name": "Contract.pdf",
"file": "https://nextsign.hel1.your-objectstorage.com/..."
}
]
}
}Flow Event Payload
Flow-related triggers send a flow object:
{
"trigger": "webflow.completed",
"flow": {
"_id": "66a3c3bdb42398dff0d10123",
"title": "Lead Intake",
"updatedAt": "2024-01-15T14:30:00.000Z"
}
}Webflow Rejected Payload
webflow.rejected fires when a recipient rejects a webflow on their form page with a reason. A form allows this when Recipients can reject the webflow is turned on in the form builder, for every role that fills in or only the roles picked there; it is off by default. The whole webflow then waits for you: its links take no answers, no reminders go out and no case is created. Every answer is kept. Fix what the recipient points out and send it again from the dashboard, or with Resend, which opens it again.
Next to the usual flow object, the event object says who rejected it and why:
{
"trigger": "webflow.rejected",
"flow": {
"_id": "66a3c3bdb42398dff0d10123",
"title": "Lead Intake",
"updatedAt": "2024-01-15T14:30:00.000Z"
},
"event": {
"reason": "The address of the lease is wrong",
"rejectedAt": "2024-01-15T14:30:00.000Z",
"recipient": {
"id": "3f1c2b9e-5a7d-4c1e-9b2a-6d8e0f1a2b3c",
"name": "Alex Example",
"role": "Customer"
}
}
}recipient.id is the recipient's recipients[].id in Get. Treat it like the personal form link it belongs to.
Delivery Failed Payload
case.delivery.failed fires once per failed delivery to a recipient, next to the usual case (or flow) object. The event object says who it was, through which channel, and why. channel is eboks or email.
e-Boks
{
"trigger": "case.delivery.failed",
"case": { "_id": "66263484e601d81006d1a132", "title": "Contract Agreement" },
"event": {
"channel": "eboks",
"recipientId": "66263484e601d81006d1a133",
"recipientName": "Example ApS",
"errorMessage": "eboks-not-subscribed",
"eboksError": {
"code": 6003,
"text": "The end user is not subscribed to the content type",
"identifier": "2026-10-20-15.48.29.604795",
"httpStatus": 400
}
}
}errorMessage is a stable code: eboks-not-subscribed (e-Boks 6003, the recipient has not signed up for messages from your company), eboks-recipient-unknown (e-Boks 4007, no e-Boks mailbox for that CPR, CVR or address), eboks-recipient-type-not-allowed (e-Boks 4130), eboks-error-<code> for any other e-Boks code, or one of our own checks such as invalid-cpr, invalid-address or invalid-integration. eboksError is present when e-Boks itself rejected the message: e-Boks' own code, text and reference (identifier, which support asks for). The full list, with what to do about each, is in e-Boks errors.
A delivery that fell back to a physical letter was delivered, so it does not fire this trigger.
Fires when a case email to a recipient bounces. That is the invitation or a reminder.
{
"trigger": "case.delivery.failed",
"case": { "_id": "66263484e601d81006d1a132", "title": "Contract Agreement" },
"event": {
"channel": "email",
"recipientId": "66263484e601d81006d1a133",
"recipientName": "Andreas Lauridsen",
"email": "andreas@exampel.dk",
"bounceType": "hard",
"errorMessage": "Host or domain name not found"
}
}| Field | Description |
|---|---|
email | The address that bounced. Compare it with the recipient's current address: if the address was corrected in the meantime, this bounce is about the old one |
bounceType | hard: the address does not exist, or the receiving server refused it permanently. soft: a temporary problem, such as a full mailbox, that did not clear while our email provider kept retrying. Either way, that email will not arrive |
errorMessage | The receiving server's reason when it gave one, otherwise email-bounced |
fallbackChannel | Only present when the recipient was part of a mass sending with a fallback order, and the case was resent to them through this channel (sms or eboks). A failure on that channel is reported on its own |
The same bounce also shows on the case itself, as recipients[].emailStatus in Retrieve a Case.
There is no webhook for an email being opened. Opens are recorded in emailStatus, but they are too unreliable to act on, see the note there.
e-Boks Delivered and Opened Payload
Together with case.delivery.failed, these two triggers tell you where each e-Boks recipient stands: failed, delivered, or opened. recipient_viewed adds that the recipient opened the case itself. Each fires once per recipient and message, next to the usual case (or flow) object.
Delivered
case.eboks.delivered fires when e-Boks has accepted the message and placed it in the recipient's e-Boks. That happens for the invitation and for each reminder sent through e-Boks.
{
"trigger": "case.eboks.delivered",
"case": { "_id": "66263484e601d81006d1a132", "title": "Contract Agreement" },
"event": {
"channel": "eboks",
"recipientId": "66263484e601d81006d1a133",
"recipientName": "Example ApS",
"kind": "invitation",
"deliveredAt": "2026-11-06T09:00:12.000Z",
"readReceipt": "required"
}
}| Field | Description |
|---|---|
kind | invitation or reminder |
deliveredAt | When e-Boks accepted the message |
readReceipt | required or optional when the message asked for a read receipt, so case.eboks.opened can follow. null when it did not |
It does not fire for a message that fell back to a physical letter, or for the "all signed" message with the signed documents.
Opened
case.eboks.opened fires when the recipient opens the invitation in e-Boks. It depends on read receipts, which e-Boks has to set up for your company and which you turn on per e-Boks template (Read receipt: Optional or Required). Without read receipts NextSign cannot know that a message was opened, and this trigger never fires.
{
"trigger": "case.eboks.opened",
"case": { "_id": "66263484e601d81006d1a132", "title": "Contract Agreement" },
"event": {
"channel": "eboks",
"recipientId": "66263484e601d81006d1a133",
"recipientName": "Example ApS",
"openedAt": "2026-11-06T09:31:40.000Z",
"readReceipt": "required"
}
}| Field | Description |
|---|---|
openedAt | When the recipient opened the message, as e-Boks reports it |
readReceipt | required: the recipient had to confirm before reading, so every opening is reported. optional: the recipient could read without confirming, so an opened message may never fire this trigger |
Only the invitation asks for a read receipt, not reminders. NextSign collects receipts from e-Boks every few minutes, so this webhook can arrive a few minutes after the recipient opened the message. The opening is also written to the case log.
Recipient Viewed Payload
recipient_viewed fires the first time a recipient opens their signing page, next to the usual case object. It works for every channel (email, SMS, e-Boks), needs no read receipts, and goes out within seconds.
{
"trigger": "recipient_viewed",
"case": { "_id": "66263484e601d81006d1a132", "title": "Contract Agreement" },
"event": {
"recipientId": "66263484e601d81006d1a133",
"recipientName": "Bo Modtager",
"viewedAt": "2026-11-06T09:35:02.000Z"
}
}| Field | Description |
|---|---|
viewedAt | When the recipient first opened the signing page |
It fires once per recipient, however often they open the page. Someone signed in to your NextSign account who opens a recipient's link (you checking it yourself) does not count as the recipient.
It is not the same as case.eboks.opened: a recipient can read the e-Boks message without clicking through to the case, and an e-Boks letter sent without a button has no signing page to open. Subscribe to both if you want to know that a recipient has seen what you sent, whichever comes first.
Recipient Name Mismatch Payload
recipient_name_mismatch fires when a recipient signs with an e-ID whose name has nothing in common with the name the recipient was added with on the case. It is sent next to recipient_signed for the same signature, within seconds. The case page shows the same warning on the recipient.
{
"trigger": "recipient_name_mismatch",
"case": { "_id": "66263484e601d81006d1a132", "title": "Contract Agreement" },
"event": {
"recipientId": "66263484e601d81006d1a133",
"recipientName": "Bo Modtager",
"legalName": "Karsten Holm"
}
}| Field | Description |
|---|---|
recipientName | The name the recipient was added with |
legalName | The name the recipient's e-ID returned when they signed |
The comparison is lenient. A middle name, an initial, a short form (Chris for Christian), a typo or another spelling (ø, o or oe) still counts as the same person, and so does a changed surname as long as one of the names matches. It only fires when no name matches at all, for example Bo Modtager signing as Karsten Holm.
It never fires when there is nothing to compare: a recipient added with an email address or a company name (ApS, A/S, GmbH and similar) as the name, a person with name and address protection, or a method without an e-ID name (approval, drawn signature, SMS and email code). A company name without a company form, such as Acme, is compared like a person's name, so a person signing for it fires the trigger.
It fires once per recipient, when they sign.
Payload Fields
| Field | Type | Description |
|---|---|---|
trigger | string | Machine-readable trigger value such as case_signed |
case | object | Present for case-related triggers |
flow | object | Present for flow-related triggers |
case._id | string | Case identifier, when case is present |
flow._id | string | Flow identifier, when flow is present |
The case or flow object contains the current resource data at delivery time. Exact fields can vary depending on the trigger and the resource state.
Implementing a Webhook Endpoint
Node.js / Express
const express = require('express');
const app = express();
app.use(express.json());
app.post('/webhooks/nextsign', (req, res) => {
if (req.headers['x-webhook-secret'] !== process.env.NEXTSIGN_WEBHOOK_SECRET) {
return res.status(401).send('Unauthorized');
}
const { trigger, case: webhookCase, flow } = req.body;
const entity = webhookCase || flow;
switch (trigger) {
case 'case_signed':
console.log(`Case signed: ${entity?._id}`);
break;
case 'case_denied':
console.log(`Case denied: ${entity?._id}`);
break;
case 'webflow.completed':
console.log(`Flow completed: ${entity?._id}`);
break;
default:
console.log(`Unhandled trigger: ${trigger}`);
}
res.status(200).send('OK');
});
app.listen(3000);Python / Flask
from flask import Flask, request, jsonify
import os
app = Flask(__name__)
@app.route('/webhooks/nextsign', methods=['POST'])
def webhook():
if request.headers.get('X-Webhook-Secret') != os.getenv('NEXTSIGN_WEBHOOK_SECRET'):
return jsonify({'error': 'Unauthorized'}), 401
payload = request.json or {}
trigger = payload.get('trigger')
entity = payload.get('case') or payload.get('flow')
if trigger == 'case_signed':
print(f"Case signed: {entity.get('_id')}")
elif trigger == 'case_denied':
print(f"Case denied: {entity.get('_id')}")
elif trigger == 'webflow.completed':
print(f"Flow completed: {entity.get('_id')}")
else:
print(f"Unhandled trigger: {trigger}")
return jsonify({'status': 'ok'}), 200
if __name__ == '__main__':
app.run(port=3000)Best Practices
Use HTTPS
Serve your webhook endpoint over HTTPS so request data stays encrypted in transit.
Validate a Shared Secret Header
If you configure a header such as X-Webhook-Secret, compare it directly against a secret stored in your environment.
Process Asynchronously
Return a success response quickly, then hand off heavier work such as document downloads, CRM sync, or notifications to background processing.
Implement Idempotency
A practical idempotency key can be built from the trigger plus the resource ID and update timestamp.
function getIdempotencyKey(payload) {
const entity = payload.case || payload.flow;
return [payload.trigger, entity?._id, entity?.updatedAt].filter(Boolean).join(':');
}See Idempotency for request-side guidance as well.
Testing Webhooks
Local Development with ngrok
Expose your local server:
ngrok http 3000Then configure the generated HTTPS URL in the NextSign dashboard.
Manual Test Request
curl -X POST https://your-domain.com/webhooks/nextsign \
-H "Content-Type: application/json" \
-H "X-Webhook-Secret: your-shared-secret" \
-d '{
"trigger": "case_signed",
"case": {
"_id": "test-case-123",
"title": "Test Agreement",
"updatedAt": "2024-01-15T14:30:00.000Z"
}
}'Troubleshooting
No Webhooks Arrive
- Verify the webhook is active in the dashboard
- Confirm the URL is public and reachable
- Confirm the correct trigger values are selected
- Review webhook runs in the dashboard to see failed attempts
401 or 403 Responses
- Verify the shared secret header name matches exactly
- Verify the expected header value matches the configured value
- Check for proxy or load balancer rules stripping custom headers
Duplicate Deliveries
- Expect retries after failures or timeouts
- Use idempotency keys when storing or processing events
Timeouts
- Return
200 OKquickly - Move slow processing to workers or queues
- Avoid downloading large files inline before acknowledging the webhook
Use the webhook runs view in the dashboard to inspect recent deliveries, statuses, and retry behavior.