Skip to content

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.

Every request includes these headers:

HeaderValue
Content-Typeapplication/json
Acceptapplication/json
User-AgentDocSpring/Webhooks
X-DocSpring-SignatureThe signature used to verify the request (see below)

Any custom Headers you configured on the webhook are added as well.

Legacy v1/v2 webhooks are sent without a signature and with a DocSpring User-Agent — see Webhook versions below.

The body is a JSON object with three top-level keys:

{
"event": "submission.processed",
"timestamp": "2026-06-27T03:16:07Z",
"data": {
"resource": {
"type": "Submission",
"id": 1234567
},
"id": "sub_0XYZ...",
"state": "processed",
"test": false,
"template_id": "tpl_0ABC...",
"download_url": "https://api.docspring.com/...",
"metadata": { "customer_id": "cus_123" },
"data": {
"name": "Jane Doe",
"amount": "1234.00"
}
}
}
FieldDescription
eventThe event type, e.g. submission.processed.
timestampISO 8601 time the event was sent.
dataThe event payload (see below).

data contains:

  • resource — a small pointer to the resource that triggered the event, with its type (e.g. Submission) and internal numeric id.
  • The rest of data is the serialized resource itself. For a submission this is the same object the API returns — including its public id (the sub_… UID), state, download_url, metadata, and so on. See the API Reference for the full list of fields on each resource.

Every webhook has a version that controls the payload format used for submission eventssubmission.processed, submission.failed, and the other submission.* events:

VersionFormat
v3 (current)The event envelope shown above (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.

New webhooks default to v3, which we recommend for all new integrations. 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.

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.

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 omits the data.data object from the payload while keeping the rest of the event.

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.ssn
data.card_number
metadata.internal_note
password

The 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.

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.