Rapid guide
That guide will take you step by step to create your first electronic signature with JAAK SignaIn less than 5 minutes you have a signed document.
Prior requirements
Do you need credentials to have access to API of SignaIf you haven't got them yet, contact with sales To get them.
Step 1: Authentication
Get an access token using your credentials.
/api/v1/sign-inlogin and get a JWT token
curl -X POST https://signa.sandbox.jaak.ai/api/v1/sign-in \
-H "Content-Type: application/json" \
-d '{
"email": "tu-email@empresa.com",
"password": "Your password"
}'
Answer:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600
}
Tip
Save the refreshToken That's how you'll be required to have your session renewed without re-entering credentials.
Step 2: Creating a template
It uploads a PDF document and defines where the signatures will go.
/api/v1/templatesBearer TokenCreating a document template to sign
curl -X POST https://signa.sandbox.jaak.ai/api/v1/templates \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: multipart/form-data" \
-F "file=@contrato.pdf" \
-F 'data={
"name": "Service contract",
"signatureFields": [
{
"page": 1,
"x": 100,
"y": 700,
"width": 200,
"height": 50,
"signerId": "firmante_1"
}
]
}'
Answer:
{
"id": "tpl_abc123",
"name": "Service contract",
"status": "active",
"signatureFields": [
{
"id": "sf_xyz789",
"page": 1,
"x": 100,
"y": 700,
"width": 200,
"height": 50,
"signerId": "firmante_1"
}
],
"createdAt": "2024-01-15T10:30:00Z"
}
Step 3: Create a send (submission)
It generates a sign link for the signatory with the specific data.
/api/v1/submissionsBearer TokenCreating a sign from a template
curl -X POST https://signa.sandbox.jaak.ai/api/v1/submissions \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"templateId": "tpl_abc123",
"signatureType": "biometric",
"signers": [
{
"id": "firmante_1",
"name": "Juan Pérez García",
"email": "juan.perez@ejemplo.com",
"phone": "+525512345678"
}
],
"metadata": {
"externalId": "contrato-2024-001"
}
}'
Answer:
{
"id": "sub_def456",
"templateId": "tpl_abc123",
"status": "pending",
"signatureType": "biometric",
"signers": [
{
"id": "firmante_1",
"name": "Juan Pérez García",
"email": "juan.perez@ejemplo.com",
"status": "pending",
"signUrl": "https://signa.sandbox.jaak.ai/sign/sub_def456?signer=firmante_1"
}
],
"expiresAt": "2024-01-22T10:30:00Z",
"createdAt": "2024-01-15T10:30:00Z"
}
Signature link
The signUrl That's the link you have to send to the firmer. It can be signed from any device with a camera.
Step 4: Download signed document
Once the sign complete the process, download the document with the signature.
/api/v1/submissions/:id/downloadBearer TokenDownload signed document to PDF
curl -X GET https://signa.sandbox.jaak.ai/api/v1/submissions/sub_def456/download \
-H "Authorization: Bearer $TOKEN" \
-o documento_firmado.pdf
The document downloaded includes:
- Visual sign at defined position
- document sign certificate with hash
- Identification checks
- Stamp of time (tirestamp)
Check sending status
You can check the status of the dispatch at any time.
/api/v1/submissions/:idBearer TokenGet details of a send
curl -X GET https://signa.sandbox.jaak.ai/api/v1/submissions/sub_def456 \
-H "Authorization: Bearer $TOKEN"
Possible States:
| State | Description |
|---|---|
pending | Waiting for the sign to complete the sign |
in_progress | The signatory is currently undergoing verification |
completed | Successful signed document |
expired | The signing link expires |
rejected | The sign refused to sign |
failed | Identification check error |
Following
- Type of signature - Know the signature options available
- Authentication - Full authentication details
- Webhooks - He gets automatic notifications