POST /api/v1/esign/nafath/sign — Hash Sign V1
Sign a document using Saudi Arabia's Nafath national digital identity platform (v1). The signer authenticates via the Nafath app using their national ID.
Authentication
ClientCert
Request Headers
- Content-Type (required)
- application/json
Request Body
Content-Type: application/json
- requestId (GUID, required)
- Signature request identifier.
- File (object, required)
- File to be signed (BaseFile).
- SignNafathSignatureAppearance (object, optional)
- Signature appearance configuration.
- config (object, optional)
- Signature configuration options.
{
"requestId": "9af7cb57-436f-40e9-b05c-75d05732db1c",
"signatureAppearance": {
"isVisible": true,
"pageNumber": 1,
"rect": {
"x1": 100,
"y1": 100,
"width": 200,
"height": 80
},
"appearanceImageBase64": "iVBORw0KGgoAAAANSUhEUgAAAAUA...",
"extraText": "Digitally signed via Nafath"
},
"file": {
"file": "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9BUDw8...",
"fileName": "contract.pdf",
"password": null
},
"config": {
"showAccountName": true,
"showRequestId": true,
"showSignDate": true,
"showPageNumber": false
}
}Responses
HTTP 200 — Nafath signing completed
{
"data": "JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9BUDw8L05hbWUv...",
"errorCode": 0,
"message": null,
"returnUrl": "/dashboard",
"stateValidationErrors": null,
"signature": ""
}HTTP 200 — Authenticate Nafath
{
"data": null,
"errorCode": 100,
"message": "users must authenticate them-self throw Nafath before signing the document",
"returnUrl": "/dashboard",
"stateValidationErrors": null,
"signature": ""
}