Skip to main content

Quick start

This guide takes a document through its whole life in MobbSign Server: your backend uploads it, the signer signs it in the browser with the Web SDK, and your backend downloads the signed PDF. You need curl, your API_KEY and APP_ID, and a PDF.

How it works​

Your backendIntegratorWeb SDKBrowserMobbSign ServerAPIPREPARATION01 Upload the document and its signersPOST /documents02 documentIdSIGNATURE03 documentId04 Load and signload(documentId)05 Status changewebhookRESULT06 Download the signed PDFGET /documents/{id}/content
01
PreparationYour backend MobbSign ServerUpload the document and its signersPOST /documents
01 / 06
FigureYour backend manages the document; the Web SDK captures the signature in the browser.

1. Upload the document​

Send the PDF, base64-encoded, with its title, the type of signature and its signers:

curl -X POST 'https://mobbsign.mobbeel.com/api/v1/documents' \
-H 'API_KEY: YOUR_API_KEY' \
-H 'APP_ID: YOUR_APP_ID' \
-H 'Content-Type: application/json' \
-d '{
"title": "Service contract",
"content": "'"$(base64 -w0 contract.pdf)"'",
"signatureType": "HANDWRITTEN",
"signers": [
{"name": "Jane Doe", "rol": "Client",
"signaturePosition": {"x": 360, "y": 120, "width": 180, "height": 70, "numPage": 1}}
]
}'

The response contains the documentId and the identifier of each signer:

{
"documentId": "6f1c2d3e-4a5b-4c6d-8e7f-90a1b2c3d4e5",
"title": "Service contract",
"signatureType": "HANDWRITTEN",
"status": "PENDING",
"signers": [{"id": "4438", "name": "Jane Doe", "rol": "Client", "status": "PENDING"}]
}

2. Sign it in the browser​

Pass the documentId to your web page and load it in the Web SDK:

new MobbSign(options).then((mobbsign) => mobbsign.load(documentId));

The signer reads the document, signs it and taps Finish.

3. Follow the status​

Read the document to know its status (PENDING, IN_PROGRESS, SIGNED…):

curl 'https://mobbsign.mobbeel.com/api/v1/documents/6f1c2d3e-4a5b-4c6d-8e7f-90a1b2c3d4e5' \
-H 'API_KEY: YOUR_API_KEY' \
-H 'APP_ID: YOUR_APP_ID'

Instead of polling, register a webhook to be notified of every change.

4. Download the signed document​

curl 'https://mobbsign.mobbeel.com/api/v1/documents/6f1c2d3e-4a5b-4c6d-8e7f-90a1b2c3d4e5/content' \
-H 'API_KEY: YOUR_API_KEY' \
-H 'APP_ID: YOUR_APP_ID' \
| jq -r .content | base64 -d > contract-signed.pdf

Open contract-signed.pdf in any PDF reader: its signature panel shows the electronic signature and confirms that the document has not been modified.

Next step​

Learn the lifecycle of a document, the signature types and the webhooks in the Integration guide.