Developers

Send a PDF. Get back one that holds up in court.

Mohor handles certificates, HSM keys, signer approval, timestamps and storage. Your code makes one call and listens for one webhook.

01 · Authenticate

One set of credentials per connected app.

Register the app in the console to get a client ID and secret, then exchange them for a bearer token with the OAuth client-credentials grant.

token.http
POST /v1/oauth/token
Host: api.emohor.com

{ "grant_type": "client_credentials",
  "client_id": "app_…", "client_secret": "…" }

→ { "access_token": "…", "expires_in": 3600 }

02 · Request a signature

Name the signer. Mohor does the rest.

Signers are identified by email or staff ID. Mohor notifies them, waits for approval, signs in the HSM and calls you back.

sign-request.http
POST /v1/sign-requests
Authorization: Bearer …

{
  "title": "Invoice INV-2026-0042",
  "signers": [{ "email": "aisyah@company.my" }],
  "document": { "mode": "managed", "pdf": "<base64>" },
  "approval": "any",
  "callback": "https://yourapp.my/hooks/mohor"
}

→ 202 { "id": "…", "ref": "MH-…", "status": "AWAITING" }

03 · Webhooks

Know the moment it is signed.

Events for signed, completed, rejected and failed. Each call carries an HMAC-SHA256 signature with a timestamp, and failed deliveries are retried with exponential backoff.

webhook.ts
import { verifyWebhook } from '@mohor/sdk';

app.post('/hooks/mohor', (req, res) => {
  if (!verifyWebhook(req.rawBody,
      req.headers['x-mohor-signature'], secret))
    return res.sendStatus(401);

  const { event, external_ref, document } = req.body;
  // request.completed → document.verify_url, signed_sha256
  res.sendStatus(200);
});

04 · Sign button

For signers outside your organisation.

Drop one script tag and a custom element into any web page. The signing screen opens over your page and fires an event when it is done.

checkout.html
<script src="https://app.emohor.com/widget.js" defer></script>

<mohor-sign-button href="{sign_url}" auto-close>
  Sign agreement
</mohor-sign-button>

<script>
  document.querySelector('mohor-sign-button')
    .addEventListener('signed', (e) => done(e.detail.ref));
</script>

Signing modes

Choose how much of the document leaves your servers.

ModeYour app sendsMohor keepsUse it when
managedThe PDF (or a URL to fetch it)Signed copy in the vaultYou want Mohor to handle storage and delivery
hashSHA-256 of the prepared PDFSigned copy, if you return itThe document must stay on your servers
evidenceHash, then the final hashHashes and the audit trail onlyStrictest data residency

REST API

JSON over HTTPS, bearer tokens, your own external references and clear statuses.

@mohor/sdk

Node SDK with signPdf, waitFor, downloadSignedPdf, hash-mode helpers and webhook verification.

Public verify API

Look up any signed document by its code or hash, from your own portals.

Get a sandbox and start integrating today.

The sandbox uses a test CA, so you can build the whole flow before your production certificates arrive.