Integration guide
This guide explains how MobbSign Server works and how to integrate it in your processes. For the details of each endpoint, see the API reference.
Credentials and environments
Every request carries two headers, API_KEY and APP_ID, provided by Mobbeel for each environment. Every resource — documents, certificates and webhooks — belongs to the APP_ID of the request: an application cannot read the resources of another.
| Environment | Base URL | Use |
|---|---|---|
| Stage | https://stage.mobbsign.mobbeel.com/api/v1 | Integration and testing. |
| Production | https://mobbsign.mobbeel.com/api/v1 | Real documents. |
Documents uploaded to an application that is not marked as production are signed with a watermark, so that test documents can never be mistaken for real ones.
The life of a document
| # | Step | Call |
|---|---|---|
| 1 | Upload | POST /documents |
| 2 | Sign | Web SDKOTPcertificate |
| 3 | Follow | GET /documents/{id}webhook |
| 4 | Download | GET /documents/{id}/content |
| 5 | Delete | DELETE /documents/{id} |
| Status | Meaning |
|---|---|
PENDING | The document is waiting for its signatures. |
IN_PROGRESS | Some of the signers have signed. |
SIGNED | All the signers have signed. |
REJECTED | The document has been rejected. |
DELETED | The document has been deleted. |
Once the document is signed, download it and keep it in your own systems: your organisation is responsible for its custody. Then you can delete it from MobbSign Server. Deleting a document cannot be undone.
Signers
Declare the signers of a document in the signers array when you upload it. For each signer you can set the name, which is written in the reason of their signature, the role and the position of the signature. The response returns the identifier and the status of each signer.
"signers": [
{"name": "Jane Doe", "rol": "Client",
"signaturePosition": {"x": 360, "y": 120, "width": 180, "height": 70, "numPage": 1}},
{"name": "John Smith", "rol": "Employee"}
]
If a document has no signers, it can be signed without restrictions. In the Web SDK, the signatures are assigned to the signers in order, or to the signers you name for each signing act. See Signers & positioning.
Signature positioning
signaturePosition places a signature on a page, in PDF points (1/72 of an inch; an A4 page measures 595 × 842 points). width and height are the maximum size of the signature: a larger signature is scaled down, keeping its proportions, and it can never go beyond the margins of the page.
Signature types
signatureType | How the document is signed |
|---|---|
HANDWRITTEN | The signer draws their handwritten signature in the Web SDK. Its biometric data is encrypted and embedded in the document. |
OTP | The signer confirms the signature with a one-time password. |
CERTIFICATE | The document is signed with a certificate stored in MobbSign Server. |
Handwritten biometric signatures can be sealed online with the electronic seal of the trust service provider configured for your application — the biometric signature with electronic seal. It is the default signature of the Web SDK since version 2.0.1. Check with Mobbeel how your application is configured.
The encryption key of the biometric data is configured for each application. See The signature package.
Certificate signature
| # | Step | Call |
|---|---|---|
| 1 | Store the certificate | POST /certificates |
| 2 | Upload the document | POST /documents |
| 3 | Sign | POST /sign/certificate/{documentId} |
- Add the certificate of the signer, as a PKCS #12 file. The response returns its
certificateIdand the credentials to use it. - Upload the document.
- Sign the document with the
certificateId, the password and the PIN of the certificate.
Disable a certificate to prevent it from signing, for example when the holder leaves your organisation, and enable it again if needed.
Webhooks
Register a webhook to be notified when the status of your documents changes, instead of polling them:
curl -X POST 'https://mobbsign.mobbeel.com/api/v1/webhooks' \
-H 'API_KEY: YOUR_API_KEY' \
-H 'APP_ID: YOUR_APP_ID' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://your-backend.example.com/mobbsign/webhook",
"events": ["ALL"],
"username": "mobbsign",
"password": "a-strong-password"
}'
ALLnotifies every change in the status of your documents.- If your endpoint requires HTTP basic authentication, set
usernameandpassword. - When you receive a notification, read the document with
GET /documents/{documentId}to get its current status.
Good practices
- Keep the credentials on the server. Store the
API_KEYin a secret manager, never in source code. - Use your own identifiers. Fill in
externalIdwith the identifier of the document in your systems, to relate both. - Declare the signers. Signers with names and positions make documents easier to follow and avoid unexpected signatures.
- Prefer webhooks to polling. Read the document only when you are notified of a change.
- Download and delete. Once the document is signed, keep it in your own systems and delete it from MobbSign Server.
- Test in stage. Documents of applications that are not production carry a watermark.