Skip to content

API: PDF tools

Sign a PDF with your own certificate

Exactly two uploads: the PDF and a .p12 (or .pfx) bundle holding your certificate and private key, with the bundle's password in the options. The signature is an invisible, detached CMS signature (adbe.pkcs7.detached) with SHA-256, RSA or ECDSA, and any PDF reader can verify it. The key is used for this one signature and is not kept: the bundle is deleted with the other uploads when they expire. A self-signed certificate proves the document has not changed since signing, but a reader will not vouch for who signed it until it trusts that certificate; this is not a qualified electronic signature. An expired certificate, an encrypted document, and a document that is already signed are refused, because signing again would invalidate the first signature.

POST/api/v1/tools/pdf-sign

Authentication#

Send your API key as Authorization: Bearer <key>. The X-API-Key header works too, and Authorization wins when both are present. The key needs the pdf:security ability.

Request body#

Content type application/json.

NameTypeRequiredDescription
file_idsarray of stringyesExactly two uploads: the PDF and your .p12 certificate bundle, in either order. at least 2 items; at most 2 items
idempotency_keystringnoRepeat a submission safely: the same key returns the same conversion. max length 128
optionsPDFSignOptionsyesThe bundle's password and what to show beside the signature

Responses#

201 Created#

Content type application/json. Schema: ConversionView.

NameTypeRequiredDescription
bytes_ininteger (int64)-Size of the input in bytes
bytes_outinteger (int64)-Size of the result in bytes, 0 until it finishes
created_atstring (date-time)-When it was submitted
error_messagestring-What to tell the user, empty unless it failed
error_typestring-A code from the error taxonomy, empty unless it failed
expires_atstring (date-time)-When the result stops being downloadable
finished_atstring (date-time) or null-When it ended, or null
idstring-The conversion id, used to poll it, stream it or cancel it
notestring-What the conversion did, in its own words. Empty when the file says it all
phasestring-What it is doing now, empty once it has ended
progressinteger-Percentage from 0 to 100
started_atstring (date-time) or null-When a worker picked it up, or null
statusstring-One of pending, running, finished, error, cancelled
toolstring-Which conversion produced it

401 Unauthorized#

Content type application/problem+json. Error (RFC 9457 problem details). Schema: Problem.

The error follows RFC 9457. See Errors.

422 Unprocessable Content#

Content type application/problem+json. Validation failed; errors maps each field to its messages and issues lists each problem with its code, key and params. Schema: Problem.

The error follows RFC 9457. See Errors.

Any other status#

Content type application/problem+json. Error (RFC 9457 problem details). Schema: Problem.

The error follows RFC 9457. See Errors.

curl -X POST "http://localhost:3000/api/v1/tools/pdf-sign" \
  -H "Authorization: Bearer $VUKEM_TOOLS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "file_ids": [
    "01JQ8Z5X0K7M3N9P2R4T6V8W0Y",
    "01JQ8Z6A1M8N4P0R3T5V7X9Z1B"
  ],
  "idempotency_key": "contract-signature",
  "options": {
    "location": "Sao Paulo",
    "password": "example-bundle-password",
    "reason": "I approve this contract"
  }
}'

Response examples

{
  "bytes_in": 18452,
  "bytes_out": 0,
  "created_at": "2026-02-03T10:00:00Z",
  "error_message": "",
  "error_type": "",
  "expires_at": "2026-02-03T11:00:02Z",
  "finished_at": null,
  "id": "01JQ8Z5X0K7M3N9P2R4T6V8W0Y",
  "phase": "tracing",
  "progress": 60,
  "started_at": "2026-02-03T10:00:02Z",
  "status": "running",
  "tool": "pixels-to-svg"
}

The examples are built from the schemas, so every value is a placeholder of its type. The tables above hold the fields that carry the real values.