JavaScript · Integration
Add E-Signatures to Express.js
Send documents for legally binding e-signature from your Express.js application. One endpoint, no SDK required.
Quick start
- Get an API key from signb.ee (free, no credit card)
- Set
SIGNBEE_API_KEYin your environment - Add the code below to your app
Express.js example
const express = require("express");
const app = express();
app.use(express.json());
app.post("/send-contract", async (req, res) => {
const response = await fetch("https://signb.ee/api/send", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SIGNBEE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(req.body),
});
res.json(await response.json());
});
app.listen(3000);What happens
- Your app sends markdown or a PDF URL to Signbee
- Signbee generates a PDF (if markdown) and emails the recipient a signing link
- Recipient signs — both parties receive the signed PDF with SHA-256 certificate
Also works with AI agents
Install the MCP server to let Claude, Cursor, or Windsurf send documents directly:
npx -y signbee-mcp
Integration details
Express.js is the most widely used Node.js web framework with over 30 million weekly npm downloads. Adding e-signatures to Express requires just a single route handler — no middleware, no SDK, no additional dependencies.
Middleware considerations: For production Express apps, add authentication middleware to protect your contract-sending endpoint. Use express-rate-limit to prevent abuse, and helmet for security headers. The Signbee API has its own rate limiting, but protecting your endpoint reduces unnecessary API calls.
Request validation: Validate incoming requests before forwarding to Signbee. Check that content, senderName, senderEmail, recipientName, and recipientEmail are present and correctly formatted. Use express-validator or Joi for structured validation.
Async error handling: The example uses async/await. In Express 4, unhandled promise rejections don't trigger error middleware automatically. Wrap handlers in a try/catch or use express-async-errors. Express 5 handles this natively.
Webhook integration: For tracking signing status, set up a webhook endpoint in your Express app to receive Signbee callbacks when documents are signed. This lets you update your database, trigger follow-up emails, or advance workflow states automatically.
FAQs
How do I add e-signatures to Express.js?
Get an API key from signb.ee (free, no credit card), set SIGNBEE_API_KEY in your environment, and add a single POST request to your Express.js application. The recipient receives a signing link by email, signs on any device, and both parties get a SHA-256 certified PDF.
Does Signbee work with Express.js?
Yes. Signbee is a REST API that works with any language or framework including Express.js. Send a POST request with your document content, sender and recipient details, and Signbee handles the entire signing ceremony. No SDK required.
Do I need any additional npm packages for Express integration?
No. The integration uses the built-in fetch API (Node.js 18+) or you can use node-fetch for older versions. No Signbee SDK or client library is required — it's a single HTTP POST request.
How do I handle errors in Express when sending contracts?
Wrap the fetch call in try/catch and check the response status. Handle 401 (invalid API key), 400 (missing required fields), and 429 (rate limited) responses. Return appropriate HTTP status codes to your client.
Can I use Express middleware to protect the contract endpoint?
Yes. Add authentication middleware (JWT, session-based, or API key) to protect your /send-contract route. Also consider express-rate-limit to prevent abuse and helmet for security headers.
Related resources
Try Signbee — free, no credit card.