PDF Signatures
Appends an RFC 3161 document timestamp to a PDF.#
/lmkit/v1/pdf-timestampAppends a cryptographic document timestamp (subfilter ETSI.RFC3161): an authority proves the whole file existed at a point in time, without naming a signer. The timestamp is appended incrementally, so signatures already in the document stay intact. The authority comes from the request or from the server's configured 'DocumentSigning:TimestampAuthority'; the request fails when neither is available. The timestamped document is stored on the server and returned as a file ID together with an independent verification of the output. This is a pure document processing operation that does not require an AI model. Returns 422 Unprocessable Entity with an ErrorResponse body if the input file cannot be processed. The 'error' field contains one of: 'password_required' (encrypted PDF), 'invalid_format' (not a valid PDF), 'unsupported_security' (unsupported encryption), 'page_error' (content error).
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
inputrequired | string | The PDF document to timestamp (base64 or file identifier). |
input_format | How the input is provided. Defaults to 'Base64EncodedFile'. | |
password | string | Password used to open the document when it is encrypted. |
timestamp_authority | string | The RFC 3161 timestamp authority URL. Omitted, the server's configured authority applies ('DocumentSigning:TimestampAuthority'); the request fails when neither is available. |
field_name | string | Partial name of the new timestamp field; must be unique in the document. Default: 'DocTimeStamp1'. |
signature_capacity | object (int32) | Bytes reserved for the timestamp token. Range: 256-65536. Default: 8192. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | Accepted | |
| 422 | Unprocessable Entity | |
| 400 | Bad Request |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/pdf-timestamp" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "",
"input_format": "Base64EncodedFile",
"password": "string",
"timestamp_authority": "string",
"field_name": "DocTimeStamp1"
}'Signs a PDF with a digital signature (PAdES).#
/lmkit/v1/pdf-signApplies a PAdES (ETSI.CAdES.detached) digital signature to a PDF using a PKCS#12 (.p12/.pfx) identity: the one carried by the request, or the server's configured signing certificate when the request carries none. Signing is fully managed and in-process; keys never enter an OS store. The signature can be invisible (no 'field') or render a visible mark whose text is composed automatically (localized via 'appearance_language'), supplied as custom lines, or drawn from an uploaded image. An RFC 3161 authority can attest the signing time (PAdES B-T), and the signature can certify the document (DocMDP). The signed document is stored on the server and returned as a file ID together with an independent verification of the output. This is a pure document processing operation that does not require an AI model. Returns 422 Unprocessable Entity with an ErrorResponse body if the input file cannot be processed. The 'error' field contains one of: 'password_required' (encrypted PDF), 'invalid_format' (not a valid PDF), 'unsupported_security' (unsupported encryption), 'page_error' (content error).
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
inputrequired | string | The PDF document to sign (base64 or file identifier). |
input_format | How the input is provided. Defaults to 'Base64EncodedFile'. | |
password | string | Password used to open the document when it is encrypted. |
certificate | string | The signing identity as a base64-encoded PKCS#12 (.p12/.pfx) bundle carrying the certificate and its private key. Omitted, the server's configured identity signs ('DocumentSigning:CertificateFile'); the request fails when neither is available. The key is used in-process by the managed engine and never enters an OS key store. |
certificate_password | string | Password of the PKCS#12 bundle. Applies to 'certificate' when provided, otherwise to the server-configured identity. |
reason | string | The reason recorded in the signature dictionary, or null for none. |
field_name | string | Partial name of the new signature field; must be unique in the document. Default: 'Signature1'. |
field | Placement of a VISIBLE signature field. The field renders who signed, when, and why (localized through 'appearance_language'), or the custom 'appearance_lines'. Omitted, the signature is invisible: cryptographically identical, no mark on any page. | |
appearance_lines | string[] | Custom text lines for the visible field, replacing the automatic composition. Ignored for invisible signatures. |
appearance_language | string | Language of the automatic appearance text ('fr', 'de', 'ja', ...). Fourteen languages are built in; omitted, the server's UI culture applies. Scripts beyond the built-in Helvetica (Cyrillic, CJK, Arabic) compose in English unless 'appearance_font' supplies a font that carries them. |
appearance_image | string | A drawn mark (a handwritten signature stroke, a stamp) as a base64-encoded image (PNG keeps its transparency). It renders beside the text, or fills the field when 'appearance_lines' is a single empty string. Ignored for invisible signatures. |
appearance_font | string | A base64-encoded TrueType/OpenType font embedded for the appearance text, unlocking scripts beyond WinAnsi. |
certification | string | Makes this the document's certification (author) signature, declaring which later changes stay legal: 'none' (default, an ordinary approval signature), 'no_changes', 'form_filling', or 'form_filling_and_annotations'. A document carries at most one certification signature, applied first. |
timestamp_authority | string | An RFC 3161 timestamp authority URL that proves the signing time (PAdES B-T) instead of the signer claiming it. Omitted, the server's configured authority applies ('DocumentSigning:TimestampAuthority'); an empty string signs without a timestamp even when one is configured. |
signature_capacity | object (int32) | Bytes reserved for the signature container. The default fits a typical chain with a timestamp. Range: 256-65536. Default: 8192. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | Accepted | |
| 422 | Unprocessable Entity | |
| 400 | Bad Request |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/pdf-sign" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "",
"input_format": "Base64EncodedFile",
"password": "string",
"certificate": "string",
"certificate_password": "string"
}'Verifies the digital signatures of a PDF.#
/lmkit/v1/pdf-verify-signaturesValidates every digital signature and document timestamp in a PDF and reports each one's verdict on four independent axes: integrity (are the signed bytes untouched), identity (does the signer chain to a trust anchor), revocation, and timestamp. Trust anchors come from the server's configured trust directory ('DocumentSigning:TrustAnchorsDirectory'), the request's own 'trust_roots', and the OS root store when enabled. PAdES (ETSI.CAdES.detached), adbe.pkcs7.detached, and ETSI.RFC3161 document timestamps are supported. This is a pure document processing operation that does not require an AI model. Returns 422 Unprocessable Entity with an ErrorResponse body if the input file cannot be processed. The 'error' field contains one of: 'password_required' (encrypted PDF), 'invalid_format' (not a valid PDF), 'unsupported_security' (unsupported encryption), 'page_error' (content error).
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
inputrequired | string | The PDF document to verify (base64 or file identifier). |
input_format | How the input is provided. Defaults to 'Base64EncodedFile'. | |
password | string | Password used to open the document when it is encrypted. |
trust_roots | string[] | Additional trust anchors for THIS verification: base64-encoded certificates, DER or PEM. They join the anchors configured on the server ('DocumentSigning:TrustAnchorsDirectory'). A signer chaining to any anchor verifies as Trusted. |
trust_system_roots | boolean | Whether the operating system's root store also anchors identities. Omitted, the server's configured default applies ('DocumentSigning:TrustSystemRoots', true unless changed). |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | Accepted | |
| 422 | Unprocessable Entity | |
| 400 | Bad Request |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/pdf-verify-signatures" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "",
"input_format": "Base64EncodedFile",
"password": "string",
"trust_roots": [
"string"
],
"trust_system_roots": false
}'Embeds long-term validation (LTV) material into a signed PDF.#
/lmkit/v1/pdf-ltvEmbeds validation material (certificates, CRLs, OCSP responses) into the document security store (/DSS, PAdES B-LT), so signatures stay verifiable after their certificates expire or the issuing infrastructure disappears. By default the material already carried by the document's signatures is gathered automatically; the request can add more. The material is appended incrementally, so existing signatures stay intact. The extended document is stored on the server and returned as a file ID together with an independent verification of the output. This is a pure document processing operation that does not require an AI model. Returns 422 Unprocessable Entity with an ErrorResponse body if the input file cannot be processed. The 'error' field contains one of: 'password_required' (encrypted PDF), 'invalid_format' (not a valid PDF), 'unsupported_security' (unsupported encryption), 'page_error' (content error).
Request body
application/json ·
| Property | Type | Description |
|---|---|---|
inputrequired | string | The signed PDF document to extend (base64 or file identifier). |
input_format | How the input is provided. Defaults to 'Base64EncodedFile'. | |
password | string | Password used to open the document when it is encrypted. |
certificates | string[] | Additional certificates to embed in the document security store, base64-encoded, DER or PEM. |
crls | string[] | Certificate revocation lists to embed, base64-encoded DER. |
ocsp_responses | string[] | OCSP responses to embed, base64-encoded DER. |
include_signature_material | boolean | Whether the certificates and CRLs already carried by the document's signatures are also gathered into the security store. Default: true. |
Responses
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | Accepted | |
| 422 | Unprocessable Entity | |
| 400 | Bad Request |
curl -X POST "$LMKIT_ONE_URL/lmkit/v1/pdf-ltv" \
-H "Authorization: Bearer $LMKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "",
"input_format": "Base64EncodedFile",
"password": "string",
"certificates": [
"string"
],
"crls": [
"string"
]
}'