Sadq Signature Lite
POST
https://test.api.neotek.sa/digital-signature-lite/v1/sign-documentsSandbox URL · in Production call https://api.neotek.sa
Signs a PDF through Sadq and returns it base64-encoded.
Body — everything sits under a top-level Data object.
Data.KYCInformation identifies the signatory and the organisation vouching for them:
| Parameter | Required | Description |
|---|---|---|
UserConsentObtained | Required | must be true. You are legally undertaking that you informed the user and took explicit consent |
RKAName | Required | legal name of the organisation acting as Reliable KYC Agency |
KYCId | Required | the signatory's unique id in the RKA database |
ArabicName | Required | name in Arabic, up to 100 characters |
RegionProvince | Required | up to 25 characters |
Country | Required | ISO 3166 alpha-2, for example SA |
EnglishName | Optional | up to 100 characters |
MobileNumber | Optional | up to 15 characters |
Email | Optional | valid format, up to 100 characters |
Address | Optional | up to 100 characters |
Data.DocumentDetails is an array, one entry per document:
| Parameter | Required | Description |
|---|---|---|
Document | Required | the PDF as a base64 string |
SignerInformation.SignedBy | Required | name of the signer |
SignerInformation.AllowMultipleSignings | Required | whether the document can be signed more than once |
SignerInformation.Location | Optional | — |
SignerInformation.Reason | Optional | — |
SigningFormat | Optional | omit the whole block to accept the defaults below |
SigningFormat — every field is optional:
| Field | Default | Values |
|---|---|---|
PageSigningMode | All | All, Even, Odd, Last, First, PageLevel, Specify |
SigningPosition | BottomRight | Nine positions, TopLeft through BottomRight |
PagesToBeSigned | — | Comma-separated. Only used with PageSigningMode: Specify |
SigningCoordinatesPerPage | — | page,x1,y1,x2,y2, semicolon-separated for several pages |
SignatureHasImage | NoImage | NoImage, CustomLogo, EmdhaLogo |
SignatureImage | — | Base64. Only used with CustomLogo |
SignatureImagePosition | LeftOfText | LeftOfText, RightOfText. Only with CustomLogo |
SignatureContent | Digitally Signed. Name: Date: | Overrides the default signature text |
SignatureFontSize | 8 | Positive integers only |
Headers:
| Parameter | Required | Description |
|---|---|---|
authorization | Required | Bearer <ACCESS_TOKEN>, with scope digital_signature |
content-type | Required | application/json |
x-request-id | Optional | an RFC 4122 UUID you generate; quote it when raising a support ticket |
sub-client | Optional | identifies the downstream consumer when one client fronts several |
cURL
curl -X POST 'https://test.api.neotek.sa/digital-signature-lite/v1/sign-documents' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "Data": { "KYCInformation": { "UserConsentObtained": true, "RKAName": "<organisation legal name>", "KYCId": "<signatory id>", "EnglishName": "<name in English>", "ArabicName": "<name in Arabic>", "MobileNumber": "<mobile>", "Email": "<email>", "Address": null, "RegionProvince": "Central Region", "Country": "SA" }, "DocumentDetails": [ { "Document": "<base64 PDF>", "SignerInformation": { "SignedBy": "<signer name>", "Location": null, "Reason": null, "AllowMultipleSignings": false }, "SigningFormat": { "PageSigningMode": "All", "SigningPosition": "BottomRight", "PagesToBeSigned": null, "SigningCoordinatesPerPage": null, "SignatureHasImage": "EmdhaLogo", "SignatureImage": null, "SignatureImagePosition": "LeftOfText", "SignatureContent": null, "SignatureFontSize": 8 } } ] }}'Response (Document truncated — the real value is the full base64-encoded signed PDF)
JSON
{ "Data": { "DocumentDetails": [ { "Document": "JVBERi0xLjUNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuZyhlbi1VUykgL1N0cnVjdFRyZWVSb290IDE2IDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4+Pg…", "SignerInformation": { "SignedBy": "<signer name>", "AllowMultipleSignings": false } } ] }}Errors
| Code | Status | Cause and Action |
|---|---|---|
400 | Bad Request | Missing required field, or a value that fails validation — check Code and Path in the body |
401 | Unauthorized | Bearer token missing, expired, or invalid |
403 | Forbidden | Token doesn't carry the digital_signature scope |
404 | Not Found | No resource matches the identifier provided |
405 | Method Not Allowed | HTTP verb not supported on that path |
406 | Not Acceptable | Accept header doesn't match a supported representation |
415 | Unsupported Media Type | Content-Type missing or wrong |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server error — retry with backoff, quote your x-request-id |