Webhook Payloads
Each webhook delivery is an HTTP POST request with a JSON body. DocSpring waits
up to 30 seconds for your endpoint to respond, and treats any 2xx status code
as a successful delivery.
Request headers
Section titled “Request headers”Every request includes these headers:
| Header | Value |
|---|---|
Content-Type | application/json |
Accept | application/json |
User-Agent | DocSpring/Webhooks |
X-DocSpring-Event-Id | The event ID, the same as the body’s id (see Event IDs below) |
X-DocSpring-Signature | The signature used to verify the request (see below) |
Any custom Headers you configured on the webhook are added as well.
Submission events on a legacy v1/v2 webhook are sent without a signature or
event ID and with a DocSpring User-Agent — see Webhook versions
below.
Request body
Section titled “Request body”The body’s format depends on the webhook’s version. Webhooks
you create in the dashboard or with API v1 use version 3, described first.
Webhooks you create with API v2 use
version 4, where each event’s data is the resource exactly as API v2 returns
it (see Version 4).
A version 3 body is a JSON object with four top-level keys:
{ "id": "6f1c2e8a-3b4d-4c5e-9f60-7a8b9c0d1e2f", "event": "submission.processed", "timestamp": "2026-06-27T03:16:07Z", "data": { "resource": { "type": "Submission", "id": "sub_0XYZ..." }, "id": "sub_0XYZ...", "state": "processed", "test": false, "template_id": "tpl_0ABC...", "download_url": "https://downloads.docspring.com/store/...pdf?Expires=...&Signature=...&Key-Pair-Id=...&Hash-Algorithm=SHA256", "metadata": { "customer_id": "cus_123" }, "data": { "name": "Jane Doe", "amount": "1234.00" } }}| Field | Description |
|---|---|
id | The event ID. It stays the same when a delivery is retried. |
event | The event type, e.g. submission.processed. |
timestamp | UTC ISO 8601 time the event was sent. |
data | The event payload (see below). |
Every timestamp in the body — timestamp and any *_at field on the serialized
resource, such as processed_at or updated_at — is a UTC ISO 8601 string with
second precision, e.g. 2026-06-27T03:16:07Z. The same format is used for
timestamps in API responses.
The data object
Section titled “The data object”data contains:
resource— a small pointer to the resource that triggered the event, with itstype(e.g.Submission) andid(e.g.sub_0XYZ...).- The rest of
datais the serialized resource itself. For a submission this is the same object API v1 returns — including itsid,state,download_url,metadata, and so on.
The fields in data for each resource type (data.resource.type):
data.resource.type | Fields |
|---|---|
Submission | API v1’s submission object |
CombinedSubmission | API v1’s combined submission object |
SubmissionBatch | API v1’s submission batch object, without its submissions |
Template | API v1’s template object, as returned when listing templates |
SubmissionDataRequest | id, submission_id, name, email, completed_at, declined_at, fields |
Folder | id, name, path, parent_folder_id |
CustomFile | id, url |
APIToken | id, name, test, revoked_at, created_at |
User | id, name, email, created_at, invitation_sent_at, invitation_accepted_at |
AccountIntegration | id, service, enabled, created_at, updated_at |
Webhook | id |
See the API v1 reference for the fields of these objects. Version 4 payloads use API v2’s objects instead (below).
Version 4
Section titled “Version 4”A version 4 body has the same four parts, named as API v2 names things:
{ "id": "6f1c2e8a-3b4d-4c5e-9f60-7a8b9c0d1e2f", "event_type": "submission.processed", "created_at": "2026-06-27T03:16:07Z", "data": { "id": "sub_1234567890abcdef01", "state": "processed", "test": false, "template_id": "tpl_1234567890abcdef01", "files": { "pdf": { "state": "processed", "error_message": null, "download_url": "https://downloads.docspring.com/store/...pdf?Expires=...&Signature=...&Key-Pair-Id=...&Hash-Algorithm=SHA256", "permanent_url": "https://app.docspring.com/submissions/sub_1234567890abcdef01/files/pdf", "filename": "sub_1234567890abcdef01.pdf", "content_type": "application/pdf", "size": 48213, "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" } }, "metadata": { "customer_id": "cus_123" }, "data": { "name": "Jane Doe", "amount": "1234.00" } }}The data above is shortened: it has every field of the API’s
submission.
| Field | Description |
|---|---|
id | The event ID. It stays the same when a delivery is retried. |
event_type | The event type in API v2’s names, e.g. submission.processed. |
created_at | When the event happened (UTC, ISO 8601). It stays the same when it’s retried. |
data | The resource as API v2 returns it, the same object as GET on it would give you |
What data holds for each event:
| Events | data |
|---|---|
submission.* | The submission |
signature_request.* | The signature request |
combined_pdf.* | The combined PDF |
submission_batch.* | The submission batch, with its submissions’ data always null |
template.* | The template, without its embed_edit_token |
webhook.* | The webhook, without its secret and headers |
custom_file.* | The custom file |
folder.* | The folder |
Version 4 webhooks use API v2’s event names,
and can’t subscribe to API token, user and integration events, which API v2 has no
resources for. For a *.deleted event, data is the resource as it was just before
it was deleted.
When Include submission data is off, a submission’s and a signature request’s
data, a submission’s truncated_text, and each signature request’s ip_address and
user_agent are null instead of being left out. See
Include submission data.
Event IDs
Section titled “Event IDs”Every v3 and v4 delivery has an event ID, sent as the body’s top-level id and in the
X-DocSpring-Event-Id header. The ID stays the same when DocSpring
retries a delivery, so you can use it to
recognize an event you’ve already processed and ignore the repeat.
Each webhook gets its own event ID. If two of your webhooks receive the same event, their deliveries have different IDs.
Use the body’s id for deduplication. It’s covered by the
signature, so it can’t be changed without
breaking the signature. The header is a copy for convenience and isn’t signed.
Webhook versions
Section titled “Webhook versions”Every webhook has a version that controls the payload format used for
submission events — submission.processed, submission.failed, and the other
submission.* events:
| Version | Format |
|---|---|
| v4 (API v2) | id, event_type, created_at and data, with API v2’s resources and names. See Version 4. |
| v3 (current) | The event envelope shown above (id, event, timestamp, data). |
| v2 (legacy) | { "submission": { ... } } — the serialized submission as a JSON object. |
| v1 (legacy) | A form-encoded body with a single submission field holding the serialized submission as a JSON string. |
Webhooks you create with API v2 are v4, and webhooks you create in the dashboard or with API v1 default to v3. The v1 and v2 formats exist only so that endpoints created before the current webhook system keep receiving the exact payloads they were built for. A webhook’s version applies to every event it sends, except on v1 and v2 webhooks (see below).
Include submission data and strip fields still apply to legacy payloads; they
filter the serialized submission before it is wrapped in the v1/v2 envelope. Legacy
deliveries are sent with a DocSpring User-Agent and are not signed, matching
the original webhook behavior.
Controlling the payload
Section titled “Controlling the payload”Include submission data
Section titled “Include submission data”By default the submitted form values are included (under data.data). If you only
need to know that an event happened — and want to avoid sending field data to your
endpoint — turn Include submission data off. DocSpring then leaves out every form
value while keeping the rest of the event:
- The submission’s
datais left out (nullon a version 4 webhook), and itstruncated_textisnull. - For each data request (signature request) in the payload, the values its signer
entered (
data), and theip_addressanduser_agentthey signed from, arenull. Its name, email, state, timestamps and authentication details are kept. - For each email an email action sent, its
subjectand the addresses that came from the submission’s fields arenull. The addresses in the email action’s settings, and each recipient’s status, are kept.
Strip specific fields
Section titled “Strip specific fields”Use strip fields to remove individual fields from the payload — for example to keep sensitive values like SSNs or card numbers out of your logs.
List dot-separated paths from the root of the event’s data object. Form field
values live under its data key, so a form field is removed with data.<field name>.
A bare name removes a whole top-level key, such as metadata or password:
data.ssndata.card_numbermetadata.internal_notepasswordThe example above removes the ssn and card_number form fields, the
internal_note metadata value, and the submission’s password field. Entries that
don’t match anything are ignored.
Custom headers
Section titled “Custom headers”Add custom Headers to every request — for example a static bearer token or a routing header your endpoint expects. Note that custom headers are a convenience, not a security mechanism: always rely on the signature to authenticate requests.