April 2026 · Tutorial

How to Automate Contract Signing in Your App

You have an app. Users need to sign something. Here's how to add contract signing in under 10 minutes, with code you can copy today.

Code editor flowing to a signed contract — automating contract signing

What we're building

By the end of this tutorial, your app will be able to:

  1. Accept contract content (text, markdown, or a PDF URL)
  2. Send it to a recipient for legally binding e-signature
  3. Receive confirmation when the document is signed
  4. Deliver a signed PDF with a tamper-proof SHA-256 certificate

No SDK installations. No webhook servers. No template builders. One HTTP request.

Step 1: Get an API key

Sign up at signb.ee and grab your API key from the dashboard. Free tier gives you 5 documents per month — enough to build and test the integration.

Don't want to create an account? Skip the API key entirely. The API works without it — the sender just verifies via a one-time email code. Good enough for prototyping.

Step 2: Send your first document

Here's the core API call in three languages. Pick yours.

curl
curl -X POST https://signb.ee/api/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "# Service Agreement\n\nThis agreement is between **Acme Corp** and **Jane Doe** for design consulting services at $150/hour.\n\n## Scope\n\n- Brand identity design\n- Website mockups (3 rounds)\n- Final asset delivery in Figma\n\n## Terms\n\n- Net 30 payment terms\n- Valid for 6 months from signing",
    "senderName": "Michael Chen",
    "senderEmail": "michael@acmecorp.com",
    "recipientName": "Jane Doe",
    "recipientEmail": "jane@studio.com"
  }'
JavaScript (Node.js / fetch)
const response = await fetch('https://signb.ee/api/send', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    content: `# Service Agreement

This agreement is between **Acme Corp** and **Jane Doe**
for design consulting at $150/hour.

## Scope
- Brand identity design
- Website mockups (3 rounds)
- Final asset delivery in Figma

## Terms
- Net 30 payment terms
- Valid for 6 months`,
    senderName: 'Michael Chen',
    senderEmail: 'michael@acmecorp.com',
    recipientName: 'Jane Doe',
    recipientEmail: 'jane@studio.com',
  }),
});

const result = await response.json();
// { id: "doc_abc123", status: "pending" }
Python (requests)
import requests

response = requests.post(
    'https://signb.ee/api/send',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json',
    },
    json={
        'content': '# Service Agreement\n\nThis agreement...',
        'senderName': 'Michael Chen',
        'senderEmail': 'michael@acmecorp.com',
        'recipientName': 'Jane Doe',
        'recipientEmail': 'jane@studio.com',
    }
)

print(response.json())

That's it. One request. The recipient gets an email with a signing link, signs the document, and both parties receive the signed PDF with a SHA-256 audit certificate.

Step 3: Use existing PDFs

Already have a contract template as a PDF? Use the PDF endpoint instead:

Send an existing PDF
const response = await fetch('https://signb.ee/api/send', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    pdf_url: 'https://your-app.com/contracts/template-v2.pdf',
    senderName: 'Michael Chen',
    senderEmail: 'michael@acmecorp.com',
    recipientName: 'Jane Doe',
    recipientEmail: 'jane@studio.com',
  }),
});

The PDF is downloaded, prepared for signing, and sent. Your formatting is preserved exactly.

Step 4: Add it to your app's workflow

Here's a real-world pattern — a freelance marketplace where clients hire contractors:

Real-world integration example
// When a client approves a contractor's proposal
async function onProposalAccepted(proposal) {
  // Generate the contract from your template
  const contract = generateContract({
    clientName: proposal.client.name,
    clientEmail: proposal.client.email,
    contractorName: proposal.contractor.name,
    contractorEmail: proposal.contractor.email,
    rate: proposal.hourlyRate,
    scope: proposal.scopeDescription,
  });

  // Send for signing — one API call
  const result = await fetch('https://signb.ee/api/send', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.SIGNBEE_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      content: contract,
      senderName: proposal.client.name,
      senderEmail: proposal.client.email,
      recipientName: proposal.contractor.name,
      recipientEmail: proposal.contractor.email,
    }),
  });

  // Update your database
  await db.proposals.update({
    where: { id: proposal.id },
    data: {
      status: 'contract_sent',
      contractId: (await result.json()).id,
    },
  });
}

Step 5: Check document status

Check status
const status = await fetch(
  `https://signb.ee/api/documents/${documentId}`,
  { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);

const doc = await status.json();
// doc.status: "pending" | "sender_signed" | "completed"
// doc.certificateUrl: signed PDF (when completed)

What happens on the recipient's side

  1. Email arrives — Clean email with a "Review & Sign" button
  2. Document review — Full PDF preview in the browser
  3. Signature capture — Recipient types their name, sees an animated handwriting signature
  4. Certificate generated — Final page with timestamps, IPs, and SHA-256 hash
  5. Both parties receive the signed PDF — Delivered via email

The entire signing experience takes under 60 seconds.

When to use this vs. enterprise solutions

This approach works best when:

  • Your contracts are straightforward (two parties, one document)
  • You want to ship fast without a complex integration
  • Your documents can be generated as markdown or existing PDFs
  • You need legal validity but not advanced compliance (QES, notarisation)

Consider enterprise solutions (DocuSign, Adobe Sign) when:

  • You need multi-signer routing with conditional logic
  • You require Qualified Electronic Signatures for EU regulated industries
  • You need field-level placement (specific signature boxes, initials, dates)
  • You're in healthcare (HIPAA) or finance with specific audit requirements

FAQs

Is this legally binding?

Yes. Electronic signatures are legally valid under the ESIGN Act (US), eIDAS (EU), and ECA (UK). Signbee adds a SHA-256 certificate to every signed document as a tamper-proof audit trail.

How much does this cost?

Free for the first 5 documents per month. No credit card required. Paid plans for higher volume.

Can I use this without an API key?

Yes. Without an API key, the sender receives a one-time verification code via email. This is slower but works for testing.

Does this work with AI agents?

Yes. Install the Signbee MCP server (npx signbee-mcp) to let Claude, Cursor, or Windsurf send documents for signing directly.

Try Signbee — free tier, no credit card, no setup.