Documentation Index
Fetch the complete documentation index at: https://docs.spitshake.io/llms.txt
Use this file to discover all available pages before exploring further.
Witness Signatures
Witness signatures add a layer of verification to the signing process. After a signer completes their portion of a document, they can invite a witness to co-sign. The witness receives a signing invitation and must complete their own signature fields before the submission is finalized.How it works
- A template defines a Witness submitter role with signature fields assigned to it.
- The primary signer completes their form (fills all their fields and submits).
- After completion, the signer is presented with an option to invite a witness.
- The signer enters the witness’s name and email address.
- DocuTrust sends the witness a signing invitation email.
- The witness opens the link, reviews the document, and completes their signature fields.
- Once the witness completes, the submission moves to the next step (or finishes if all roles are done).
API endpoint
Invite a witness
POST /s/:slug/invite_witness
After completing their form, a signer can invite a witness by calling this endpoint with the signer’s signing slug.
| Parameter | Type | Required | Description |
|---|---|---|---|
witness_name | string | Yes | Full name of the witness. |
witness_email | string | Yes | Email address where the witness invitation will be sent. Must differ from the signer’s email. |
message | string | No | Optional custom message included in the witness invitation email. |
Validation rules
The endpoint enforces the following rules. Violations return an HTTP422 response with a descriptive error message.
| Rule | Error message |
|---|---|
The signer must have completed their form (status = completed). | "Signer has not completed their form yet." |
| The witness email must differ from the signer’s email. | "Witness email cannot be the same as the signer's email." |
The template must define a Witness submitter role. | "Template does not have a Witness role defined." |
| A witness has not already been invited for this signer. | "A witness has already been invited for this submission." |
| The submission must not be completed, expired, or archived. | "Submission is no longer active." |
Audit events
Witness actions are recorded in the immutable audit trail:| Event | Description | Recorded data |
|---|---|---|
witness_invited | A signer invited a witness. | Signer ID, signer email, witness email, witness name, IP address, timestamp. |
witness_form_sent | The witness invitation email was sent. | Witness submitter ID, witness email, timestamp. |
witness_form_viewed | The witness opened the signing link. | Witness submitter ID, witness IP, user agent, timestamp. |
witness_completed | The witness completed their signature. | Witness submitter ID, witness email, witness IP, signed fields, timestamp. |
witness_declined | The witness declined to sign. | Witness submitter ID, witness email, decline reason, timestamp. |
Webhook events
When a witness is invited or completes signing, webhook events are dispatched to all configured endpoints:form.created (witness)
Fired when the witness signing form is created and the invitation is sent.form.completed (witness)
Fired when the witness completes their signature.Template setup
To enable witness signatures, your template must include a Witness submitter role. The Witness role should have at minimum a signature field assigned to it.The witness signing URL returned in
embed_src can be used to embed the witness form directly in your application, bypassing the email invitation flow entirely.