Skip to main content

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.

EnvironmentBase URLUse
Stagehttps://stage.mobbsign.mobbeel.com/api/v1Integration and testing.
Productionhttps://mobbsign.mobbeel.com/api/v1Real 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​

#StepCall
1UploadPOST /documents
2SignWeb SDKOTPcertificate
3FollowGET /documents/{id}webhook
4DownloadGET /documents/{id}/content
5DeleteDELETE /documents/{id}
StatusMeaning
PENDINGThe document is waiting for its signatures.
IN_PROGRESSSome of the signers have signed.
SIGNEDAll the signers have signed.
REJECTEDThe document has been rejected.
DELETEDThe 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​

signatureTypeHow the document is signed
HANDWRITTENThe signer draws their handwritten signature in the Web SDK. Its biometric data is encrypted and embedded in the document.
OTPThe signer confirms the signature with a one-time password.
CERTIFICATEThe 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​

#StepCall
1Store the certificatePOST /certificates
2Upload the documentPOST /documents
3SignPOST /sign/certificate/{documentId}
  1. Add the certificate of the signer, as a PKCS #12 file. The response returns its certificateId and the credentials to use it.
  2. Upload the document.
  3. 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"
}'
  • ALL notifies every change in the status of your documents.
  • If your endpoint requires HTTP basic authentication, set username and password.
  • 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_KEY in a secret manager, never in source code.
  • Use your own identifiers. Fill in externalId with 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.