/digitalSign
Description
The PDF Sign service allows you to add digital signatures and globally trusted timestamps to your documents without the need for special hardware like USB tokens or HSMs. Certificates and signing keys are securely stored in cloud-based FIPS-compliant hardware devices.
Request:
curl --location '{IDENTITY_API_BASE_URL}/services/digitalSign' \
--header 'x-api-key: {API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"endUserContactInfo": "{CONTACT_EMAIL}",
"file": "{BASE64_ENCODED_PDF}",
"signingData": {
"facialAuthenticationHash": "{FACIAL_HASH}",
"serviceTransactionId": "{TRANSACTION_ID}"
},
"signingLocation": {
"city": "{CITY}",
"country": "{COUNTRY_ISO_ALPHA_3}",
"geoLocationPosition": "null",
"ipAddress": "null"
},
"signingType": "1",
"signatureData": {
"handSignature": "{BASE64_ENCODED_IMAGE}",
"pageNumber": 0,
"signatureFieldPosition": "100,160,50,50"
}
}'
Request parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| endUserContactInfo | String | Yes | Email address for contacting the end user. |
| file | String | Yes | Base64 encoded PDF file to be signed. |
| signingData | Object | Yes | Information about the signature, including facial authentication hash and transaction ID. |
| signingLocation | Object | Yes | Location data including city, country (ISO Alpha-3), geolocation (optional), and IP address (optional). |
| signingType | String | Yes | Type of signature being performed. 1 for default signing. |
| signatureData | Object | No | Optional object for including a hand-drawn signature image, page number, and field position. |
Example request:
{
"endUserContactInfo": "[email protected]",
"file": "JVBERi0xLjUKJbXtrvsKNCAwIG9iag...",
"signingData": {
"facialAuthenticationHash": "facialAuthenticationHash",
"serviceTransactionId": "serviceTransactionId"
},
"signingLocation": {
"city": "City",
"country": "ISO Alfa-3",
"geoLocationPosition": "null",
"ipAddress": "null"
},
"signingType": "1",
"signatureData": {
"handSignature": "iVBORw0KGgoAAAANSUhEUgAAAEoAAABKCAYAA...",
"pageNumber": 0,
"signatureFieldPosition": "100,160,50,50"
}
}
Response fields:
| Identifier | Type | Description |
|---|---|---|
| serviceTransactionId | String | Unique transaction ID for tracking the signing operation. |
| serviceResultCode | Integer | Result code indicating the status of the operation. 0 means success. |
| serviceResultLog | String | Log message related to the result of the operation. |
| timestamp | String | Date and time when the signing operation was completed. |
| serviceDocument | String | Base64 encoded signed PDF document. |
Example response:
{
"serviceTransactionId": "19624424-018c-4e48-b0d6-498c3a497792",
"serviceResultCode": 0,
"serviceResultLog": "Executed OK",
"timestamp": "2025-02-11T11:46:32.190Z",
"serviceDocument": "JVBERi0xLjUKJbXtrvsK...."
}
precaución
PDF Sign is fully compatible with Adobe products (including Acrobat) and Microsoft Office products (including Word) across platforms like Windows and Linux. Digital signatures use PKI-based certificates, ensuring:
- Authentication: The signer’s identity is validated by a trusted public certificate authority (CA).
- Integrity: The document has not been altered after being signed.
- Non-repudiation: The signer cannot plausibly deny having signed the document.
- Long-Term Validation (LTV): The signatures include long-term validation, ensuring they remain valid even after the certificate expires or is revoked.