E-Signature
The signature object adds a cryptographic digital signature to the generated PDF and DOCX. Signatures provide non-repudiation and tamper detection: any modification to the signed file invalidates the signature.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
fieldName | string | "Signature" | Name of the signature form field, with no period (.) in it |
position | object | — | Fixed position on the page (see below) |
appearance | object | — | Visual appearance of the signature block |
signatureCreator | string | — | Application name recorded as the signature creator |
signingType | string | "PAdES" | Signing standard: PAdES or Detached |
certificate | string | — | The signing key: a PKCS#12 (.p12/.pfx) file by its path (certs/signer.p12), or the name of a key you keep in your own vault (contracts). Required |
password | string | — | Password for the certificate file; absent or empty is the empty password. A key in your own vault takes none |
contactInfo | string | — | Contact information for the signer |
timestampServer | string | — | The http or https URL of an RFC 3161 timestamp authority, which dates the signature independently of the signer's clock. Required to keep an a-4 claim (see Signature levels) |
visible | boolean | true | Whether the signature block is visible on the page |
claimedSignDate | string | build time | The signing time the signer asserts, as an ISO 8601 date and time (2026-09-01T14:30:00Z); a timestamp authority's time is separate. Another form, or a date naming no day, refuses the document |
digest | string | the key's own | The digest the signature is computed over: sha256, sha384, sha512, sha3256, sha3384 or sha3512 (see Keys and digests) |
certificationLevel | string | "noChanges" | What modifications are allowed after signing |
fieldLock | object | — | Lock specific form fields after signing |
Where the key is kept
Upload the PKCS#12 file to your workspace's certs folder, then name it by that path (certs/signer.p12):
POST /v1/{tenantId}/assets/certs
Content-Type: multipart/form-data
file: signer.p12
Signing keys are installed by a member with the Manager or Admin role, signed in to the app, as are the keys kept in your own vault below. An API key is answered 403 here, so a leaked one cannot install a key that signs in your name.
The folder takes .p12 and .pfx files up to 64 KB. A key is listed by name and can be replaced or deleted; it is never served back. A document whose signature cannot be applied is refused (SIGNATURE_NOT_APPLIED) and is neither stored nor counted.
The signed starter examples name certs/demo-signer.p12 with the password test-2026. The first time your workspace renders one without a file at that path, it is given a self-signed demonstration key of its own there, under the name "DocPayload demo signer (not trusted)": the example is signed, and every reader shows the signer as untrusted. No other workspace holds that key. Upload your own file under the same name to sign the examples with it, or name your own key in the document.
A key kept in your own vault
A signing key can stay in an Azure Key Vault or managed HSM of your own. The platform never holds it: for each signature it sends your vault a digest, and your vault returns the signature. You can take the access back at any time.
- In Settings, Signing keys, copy the platform's application (client) ID, or the command under it.
- In your Microsoft Entra directory, an administrator (Cloud Application Administrator or Application Administrator)
creates that application there, with
az ad sp create --idand the client ID. Give it only what the key needs: a custom role with thekeys/signandkeys/readactions on the key, or an access policy allowingsignandget. - On the key, in your vault, set the tag
docpayload-tenantto your workspace's ID, shown in Settings, Signing keys. The application is the same for every customer of the platform, so the tag is how you say which workspace signs with your key: a key without it, or bound to another workspace, is not registered. - Add the key: a name, the key's identifier with its version
(
https://{vault}.vault.azure.net/keys/{name}/{version}), your directory (tenant) ID, and the certificate chain as PEM, the signer's certificate first. Then Test connection.
The test runs five checks in order, each shown as passed, failed, warning or not run: the certificate (a signer's certificate valid today, its issuers in order, an RSA key of 2048 bits or more or a key on a curve ISO/TS 32002 lists, see Keys and digests), your directory's consent to the application, the vault and the key (told apart: no answer, a firewall, a missing right, no such key), the workspace tag, and a test digest your vault signs and the certificate verifies. A failed check says what to change and where, and the ones after it are not run. A certificate that ends within 30 days is a warning, not a failure. A vault limited to selected networks or to private endpoints cannot be reached from the platform: set its public network access to all networks.
Register is available once the test has passed, and runs the same checks again before it keeps the key, so a key is only registered once it is bound to your workspace, the platform can use it and the certificate is that key's. A document then names the key where it would name a file, with no password:
{
"document": {
"signature": {
"certificate": "contracts",
"appearance": { "signedBy": "Contracts" }
},
"content": [{ "p": "Signed in our own vault." }]
}
}
A name is lower-case letters, digits and hyphens, so it is never mistaken for a file's path. An RSA key signs over the
digest the document asks for; a key on a curve signs over the curve's own digest (P-256 over SHA-256, P-384 over
SHA-384, P-521 over SHA-512, a Brainpool curve likewise). If the
vault does not sign when a document is generated, or signs with another key than the certificate's, or the certificate
has expired, the document is refused (SIGNATURE_NOT_APPLIED).
Keys and digests
The key decides what a signature can be made with, and these rules follow ISO 32000-2 and its two extensions, ISO/TS 32001 (SHA-3) and ISO/TS 32002 (elliptic curves):
- An RSA key signs over the
digestthe document asks for, SHA-256 when it asks for none. - A key on an elliptic curve (ECDSA) must be on one of the curves ISO/TS 32002 lists, given by name in its
certificate: P-256, P-384, P-521, brainpoolP256r1, brainpoolP384r1 or brainpoolP512r1. Each curve is supported with
certain digests only; with no
digestwritten, the curve's own is used (P-384 signs over SHA-384, for example), and adigestthe curve does not support is refused, with the ones it does named, and the document is not signed (SIGNATURE_NOT_APPLIED). A Brainpool key is declared in the PDF, as ISO/TS 32002 asks; a P-curve needs no declaration, since PDF 2.0 signs with it already. In a DOCX, ISO/IEC 29500-2 recommends the P-curves for a package signature: a Brainpool key still signs it, Word verifies it, and the render notes the recommendation. - A SHA-3 digest (
sha3256,sha3384,sha3512) is computed by the operating system the renderer runs on. Where that system does not provide SHA-3, the document is not signed and the render says so; it is never signed over SHA-2 instead. A DOCX signed with an RSA key cannot use SHA-3, because no XML signature identifier exists for it: that DOCX is not signed, the PDF still is. An ECDSA key signs the DOCX over SHA-3. - An EdDSA key (Ed25519, Ed448) is not supported: the document is not signed, and the render says why.
An ECDSA key and a SHA-3 digest are defined for PDF 2.0, and a signature never changes the version of a file.
Either one signs a document that is PDF 2.0 by its own statement (pdfVersion: "2.0", or a
claim of a-4, ua-2 or a Well-Tagged PDF level). In any other document the PDF is left
unsigned, and the render names what to set. A DOCX of the same document is still signed with an ECDSA key: its
signature follows ISO/IEC 29500-2, which names ECDSA whatever the PDF version. The schema refuses a SHA-3 digest in such a document as it is written; an ECDSA key is
only known from its file, so the render is where it is refused. A PDF 2.0 file's archival default is PDF/A-4, which needs a timestamped
signature: set timestampServer. Without one, a document that names no PDF/A part goes out signed with no PDF/A claim,
and the render notes why; a document that claims a-4 itself has the claim withheld, with an error (see
Signature levels).
Signing types
| Type | Description |
|---|---|
PAdES | PDF Advanced Electronic Signature — embedded in the PDF per ETSI EN 319 142. Recommended for most use cases. |
Detached | A plain CMS signature, still embedded in the PDF (SubFilter adbe.pkcs7.detached), without the PAdES attributes. Refused under PDF/A-4; the DOCX ignores it and says so. |
Position
The position object places the visible signature block at a fixed location.
| Property | Type | Default | Description |
|---|---|---|---|
pageNumber | number | 1 | 1-based page number |
left | number | 100 | Distance from the left edge in points |
bottom | number | 150 | Distance from the bottom edge in points |
width | number | 160 | Width of the signature block in points |
height | number | 50 | Height of the signature block in points |
A pageNumber past the last page draws the signature on the last page, and the render reports it.
Appearance
The appearance object controls what is displayed in the visible signature block.
| Property | Type | Description |
|---|---|---|
signedBy | string | Name of the signer displayed in the block |
signDate | string | The date drawn in the block: a date or a date and time in UTC, with no offset (2026-09-01, 2026-09-01T14:30:00Z), or a $data token. Another form, or a date naming no day, refuses the document |
showSigner | boolean | true draws the signer's name from the certificate that signs, when no signedBy is given |
showSignDate | boolean | true draws the moment of signing, the time the signature itself records, when no signDate is given |
reason | string | Reason for signing (e.g., "Approved", "Reviewed") |
location | string | Location of the signer (e.g., "Portland, OR") |
image | object | A picture drawn in the block, such as a scanned signature: only its src, width and height are read (an alt, caption or style on it is reported and ignored) |
style | string | Named style of the signature block (see below) |
icon | string | Icon on the block's top right corner: lock or shield. None by default |
certificateFingerprint | boolean | true adds a line with the start of the signing certificate's SHA-256 fingerprint |
svg | object | An svg drawn at the right of the block: a seal placed with use, or any drawing (see below) |
An appearance sets at least one of signedBy, signDate, reason, location, image or svg, or turns on showSigner or showSignDate; one with none of them is refused.
Styling the block
With no style, the block is drawn in a thin dark frame, in 6pt text, the signer's name in bold. Name a style from styles to change it; the PDF and the DOCX draw the same block.
| Style key | What it sets |
|---|---|
fontSize | Size of the lines |
color | Colour of the lines |
fontWeight | bold sets every line in bold (the signer's name is always bold) |
border | The frame: its width and colour, the same on four sides. A style with no border draws no frame |
backgroundColor | Fill behind the lines; an icon is drawn in this colour |
padding | Space between the frame and what the block holds: one length for every side, or a side at a time with paddingTop, paddingRight, paddingBottom and paddingLeft |
{
"styles": {
"seal": { "fontSize": 9, "color": "#1D4ED8", "border": "1.5pt solid #1D4ED8", "backgroundColor": "#EFF6FF", "padding": 6 }
},
"signature": {
"certificate": "certs/signer.p12",
"password": "certPassword",
"appearance": { "signedBy": "Lisa Thompson", "style": "seal", "icon": "lock", "certificateFingerprint": true }
}
}
A line wider than the block is clipped and reported; widen position.width or lower fontSize.
A seal or any drawing
svg takes the same svg node a page's content takes, and draws it inside the block, at its right, as tall as the block allows; the lines keep the room to its left. Place a seal component with use, with its own parameters:
{
"signature": {
"certificate": "certs/signer.p12",
"password": "certPassword",
"position": { "pageNumber": 1, "left": 58, "bottom": 110, "width": 330, "height": 120 },
"appearance": {
"signedBy": "Verdania Certification B.V.",
"reason": "Sealed as issued",
"svg": {
"viewBox": [132, 132],
"children": [
{ "use": { "name": "digital-eseal", "x": 0, "y": 0, "width": 132, "height": 132,
"params": { "title": "VERDANIA REGISTRY", "caption": "ELECTRONICALLY SEALED", "docid": "VC-27001-2026-04417" } } }
]
}
}
}
}
An appearance with an svg and no lines draws the svg alone. In the PDF the drawing is part of the signature field itself; in the DOCX it is drawn at the same place on the page. Like the icon, it is a drawing and says nothing of whether the signature verifies. A link on one of its shapes is not made, and the report says so: the block is one drawing, the signature's own, and no part of it is a link.
Filled in at signing
showSigner and showSignDate let the signature supply its own lines, so one template signs correctly whoever signs it and whenever. showSigner draws the name in the certificate that signs: with a key your platform holds for a tenant, each tenant's documents show that tenant's signer. showSignDate draws the moment the signature records - claimedSignDate when you give one, otherwise the time the document is generated - and it is the same moment the signature states: the PDF's signing time and, in a DOCX, the XAdES signing time and Word's own date on the signature line. A drawn date can therefore never disagree with the signature.
{ "appearance": { "showSigner": true, "showSignDate": true, "reason": "Approval of $global.TITLE" } }
A signedBy or signDate you give still wins, for a flow that binds them from $data. The PDF writes no /Name for a name taken from the certificate: ISO 32000-2 Table 255 keeps that entry for a name the signature cannot supply, and this one it carries. $global tokens resolve in reason and location, which are free text, but not in signedBy or signDate: the document's author is not necessarily whoever's key signs, and the clock reading at generation is not a signing claim. Such a token is reported instead.
Icon and fingerprint
icon draws a lock or a shield on a small tab in the block's top right corner, in the frame's colour. It is decoration: it looks the same whether or not the signature verifies, and only the reader's signature panel tells you that.
certificateFingerprint adds a last line, Certificate SHA-256: followed by the first eight bytes of the signing certificate's fingerprint. A reader can compare it with the fingerprint the certificate's holder publishes. Like every line in the block it is drawn text, not proof: the signature panel is what verifies the document.
Signature levels
A PAdES signature reaches one of the four baseline levels of ETSI EN 319 142-1, each building on the one below it:
| Level | What the file carries | How it is reached |
|---|---|---|
| B-B | the signature, the signing certificate and its signed attributes | without timestampServer |
| B-T | a timestamp from an authority, proving the signature existed at that time | timestampServer set |
| B-LT | the certificates and revocation data a validator needs, kept in the file, so it can still be checked after the certificate expires | a timestamp, and revocation data the platform could fetch for the signer's chain |
| B-LTA | a document timestamp over all of it, so the evidence can be renewed long after | B-LT on an approval signature (certificationLevel: "unspecified"), the same authority then stamping the document |
The render report names the level reached. Revocation data with no timestamp leaves the signature at B-B, since nothing vouches for when that data was true. A certification signature (any other certificationLevel, noChanges by default) forbids the later revision a document timestamp is added in, so it stops at B-LT. A Detached signature is a plain CMS signature and claims no level.
Under a PDF/A-4 claim the signature must carry a timestamp (ISO 19005-4 6.5.2): without timestampServer the document is signed, but its PDF/A-4 claim is withheld and an ERROR names the key.
The DOCX's package signature climbs the same ladder in XAdES (ETSI EN 319 132-1): B-B, B-T with timestampServer, and B-LT when it carries revocation data. With no revocation data, a notice says the DOCX signature verifies only while the signer's certificate can still be checked.
Before a signed PDF is delivered, the renderer checks the signature it wrote: that it verifies, that it covers the whole file apart from the signature itself, and that it holds to the signature clauses of ISO 32000-2. A signature that fails is reported with the clause it fails, as a WARNING, and the render report names no level for it.
Certification levels
| Level | Description |
|---|---|
noChanges | Default: no modifications allowed after signing |
formFilling | Form filling and signing are allowed |
annotating | Form filling and annotations are allowed |
unspecified | No certification: an approval signature |
Field lock
The fieldLock object restricts form field modifications after signing.
| Property | Type | Description |
|---|---|---|
permissions | string | What may still change once the locked fields are signed: noChanges, formFilling (the default) or annotating, the words of certificationLevel |
action | string | all (the default) locks every field; include locks those in fields, exclude every field but those |
fields | string[] | The field names include locks or exclude leaves unlocked; required by both, refused beside all |
Empty signature fields for later signers
To leave a place for someone else to sign later (a countersignature, an approver), put an empty signature field in the content. It can lock fields once signed and carry seed values that tell the next signer's software what to use: see the signature field in Field types.
In a DOCX
A DOCX is signed from the same signature object, with the same key and digest: the whole file is signed as an Office Open XML package signature (XML Signature with XAdES), and timestampServer adds a timestamp to it. A visible signature is drawn in the same box, with the same signer, reason, location and date. claimedSignDate is the XAdES signing time, "the time at which the signer claims to have performed the signing process" (ETSI TS 101 903 7.2.1).
A package signature is broken by any change to the file, so some keys have no equivalent. Each one set is reported, and not applied:
| Key | Why |
|---|---|
certificationLevel other than noChanges, fieldLock | a package signature allows no later change at all |
signingType: "Detached" | the package is always signed in place |
contactInfo, signatureCreator | a package signature has no entry for them |
appearance.image | the visible signature is drawn as text |
a visible signature under conformance.docx: ["strict"] | Office Open XML Strict has no markup for it: the package is signed and the block is not drawn |
fieldName names the PDF's signature field; a package signature has none.
Examples
Basic visible signature
{
"document": {
"signature": {
"fieldName": "approval_sig",
"certificate": "certs/signer.p12",
"password": "certPassword",
"signingType": "PAdES",
"signatureCreator": "DocPayload",
"contactInfo": "legal@company.com",
"visible": true,
"position": {
"pageNumber": 1,
"left": 350,
"bottom": 50,
"width": 200,
"height": 60
},
"appearance": {
"signedBy": "Lisa Thompson",
"reason": "Approved",
"location": "Portland, OR"
}
},
"content": [
{ "p": "This document has been reviewed and approved." }
]
}
}
Invisible signature
{
"document": {
"signature": {
"fieldName": "integrity_sig",
"certificate": "certs/system.p12",
"password": "systemPass",
"signingType": "PAdES",
"signatureCreator": "DocPayload",
"visible": false,
"certificationLevel": "noChanges"
},
"content": [
{ "p": "This document is digitally signed for integrity verification." }
]
}
}
Signature with timestamp server
{
"document": {
"signature": {
"fieldName": "timestamped_sig",
"certificate": "certs/signer.p12",
"password": "certPassword",
"signingType": "PAdES",
"signatureCreator": "DocPayload",
"timestampServer": "http://timestamp.digicert.com",
"visible": true,
"position": {
"pageNumber": 1,
"left": 50,
"bottom": 50,
"width": 200,
"height": 60
},
"appearance": {
"signedBy": "Automated System",
"reason": "Generated and signed",
"location": "Cloud"
}
},
"content": [
{ "p": "Signed with a trusted timestamp for long-term validation." }
]
}
}
Signature with field locking
{
"document": {
"signature": {
"fieldName": "final_approval",
"certificate": "certs/approver.p12",
"password": "approverPass",
"signingType": "PAdES",
"signatureCreator": "DocPayload",
"certificationLevel": "formFilling",
"fieldLock": {
"permissions": "formFilling",
"action": "all"
},
"visible": true,
"position": {
"pageNumber": 1,
"left": 350,
"bottom": 50,
"width": 200,
"height": 60
},
"appearance": {
"signedBy": "Final Approver",
"reason": "Final approval — all fields locked",
"location": "Head Office"
}
},
"content": [
{ "p": "After signing, no form fields can be modified." }
]
}
}