← Back to Home

How to Use DocSignerHub

A step-by-step guide to sending your first envelope and unlocking AI, blockchain, payments, and identity verification.

Getting Started

Register, create a merchant, and send your first envelope in under 5 minutes.

01

Create Your Account

Register at /register with your name, email, and password. Check your inbox for the verification email and click the link to activate your account.

POST /api/auth/register
{
  "firstName": "Alice",
  "lastName": "Smith",
  "email": "alice@example.com",
  "password": "Str0ngP@ss!"
}
02

Log In & Get Your JWT

Log in to receive a JWT Bearer token. Include this token in the Authorization header for all protected endpoints.

POST /api/auth/login
{ "email": "alice@example.com", "password": "Str0ngP@ss!" }

# Response → use token in header:
Authorization: Bearer eyJhbGci...
03

Create a Merchant

A Merchant is your isolated workspace — it has its own API key, usage limits, branding, and audit log. You must create one before sending envelopes.

POST /api/merchants
Authorization: Bearer eyJ...
{ "name": "Acme Legal Ltd", "email": "legal@acme.com" }

# Response → save merchantId and apiKey
04

Create an Envelope

Upload one or more documents (PDF, DOC, DOCX) and assign each one to a signer. Each signer receives a unique, secure link to sign only their document.

POST /api/envelopes
X-Api-Key: <your-merchant-api-key>
{
  "subject": "NDA for Project X",
  "signers": [
    { "name": "Bob Jones", "email": "bob@corp.com",
      "documentTitle": "NDA", "documentFileName": "nda.pdf",
      "documentContent": "<base64-encoded-pdf>" }
  ]
}
05

Signers Receive Secure Links

Each signer gets an email with a unique, expiring signing link. They open it on any device, review their document, draw or type their signature, and submit.

06

Track & Download

Monitor envelope status in the dashboard or via the API. Download the signed document (with embedded signature) once all signers have completed.

GET /api/envelopes/{envelopeId}
X-Api-Key: <your-api-key>
# → status: "Completed"

Phase 1 — AI & Automation Features

Unlock powerful AI analysis, blockchain notarisation, payments, and more.

01AI

AI Contract Summary

After uploading a document, call POST /summary to ask GPT-4o-mini to read the contract and return a plain-English summary of obligations, key dates, and risk areas. Results are cached — subsequent GET requests return instantly.

# Generate summary
POST /api/documents/{docId}/summary
X-Api-Key: <your-api-key>

# Retrieve cached summary
GET /api/documents/{docId}/summary
X-Api-Key: <your-api-key>
02AI

OCR & Field Detection

Run OCR on scanned image-PDFs to extract machine-readable text (for AI analysis). Then use field detection to automatically find where signature boxes, checkboxes, and initials lines appear — no manual placement needed.

# Run OCR on scanned doc
POST /api/documents/{docId}/ocr
X-Api-Key: <your-api-key>

# Detect signature field positions
POST /api/documents/{docId}/fields
GET  /api/documents/{docId}/fields
03Automation

Bulk CSV Send

Upload a CSV file (up to 1 000 rows) and a common document — DocSignerHub dispatches personalised envelopes for every recipient in one API call. Track the entire batch with a single batchId.

POST /api/envelopes/bulk
X-Api-Key: <your-api-key>
Content-Type: multipart/form-data

csvFile = recipients.csv
subject = "Please review and sign"
04Payments

Stripe Payment Gate

Require payment before or after signing. Create a PaymentIntent via the API, redirect the signer to Stripe Checkout, and handle the stripe-webhook to confirm payment. The envelope can complete only after payment succeeds.

POST /api/payments/intent
X-Api-Key: <your-api-key>
{
  "envelopeId": "env-uuid",
  "amountCents": 4999,
  "currency": "gbp"
}
# → clientSecret for Stripe Elements
05Security

Identity Verification

Require signers to upload a government-issued ID. The AI pipeline scores confidence 0–100. Scores ≥ 80 auto-approve; lower scores enter a review queue where an admin can approve or reject.

POST /api/verification/start
X-Api-Key: <your-api-key>
{
  "signingRequestId": "req-uuid",
  "documentType": "passport",
  "idImageBase64": "/9j/4AAQ..."
}
# → { status: "Approved", confidenceScore: 92 }
06Blockchain

Blockchain Notarisation

Write the SHA-256 hash of a completed envelope to Polygon. Anyone can independently verify authenticity by recomputing the hash and checking the transaction on Polygonscan — no trust in DocSignerHub required.

# Notarise a completed envelope
POST /api/envelopes/{envelopeId}/blockchain
X-Api-Key: <your-api-key>

# Returns: txHash, blockNumber, documentHash
GET /api/envelopes/{envelopeId}/blockchain
07Customisation

White-Label Branding

Replace the DocSignerHub branding with your own logo, primary colour, portal title, and email sender name. Signers see your brand throughout the entire signing experience.

PUT /api/merchants/{merchantId}/branding
X-Api-Key: <your-api-key>
{
  "primaryColor": "#7C3AED",
  "logoUrl": "https://cdn.example.com/logo.png",
  "portalTitle": "Acme Sign",
  "emailSenderName": "Acme Contracts"
}
08Admin

Per-Merchant Feature Flags

Enable or disable AI, blockchain, Stripe, and other Phase 1 features per merchant. Perfect for offering tiered plans — charge only for the capabilities each customer uses.

# Enable blockchain for one merchant
PUT /api/merchants/{merchantId}/features/blockchain
X-Api-Key: <your-api-key>
{ "enabled": true }

# List all flags
GET /api/merchants/{merchantId}/features

Ready to get started?

Create a free account and send your first envelope in minutes. No credit card required.