CommonAPI – Server Features for Static Sites

Give your simple HTML/JavaScript websites superpowers: contact forms, email subscriptions, CMS, broadcasting and more – no backend required.

API Endpoints for Your Static Sites

Contact Forms

POST /v1/contact – Accept form submissions and deliver them straight to your inbox.

Email Subscriptions

POST /v1/subscribe – Collect newsletter signups, manage subscribers, and unsubscribe.

Broadcast Emails

POST /v1/broadcast – Send announcements to all your active subscribers in one call.

Content Management

GET/POST /v1/cms – Store and retrieve editable content blocks by key for your site.

Health & Config

GET /v1/ping & /v1/config – Verify connectivity and retrieve public company info.

Secure API Keys

Each company gets a unique public key. Origin validation keeps your API locked down.


How It Works

1. Create a Company in the Admin Panel

Set up your company name, contact email, website URL and generate an API key.

2. Add the API Key to Your Static Site

Include the key in a simple x-api-key header with every fetch request from your HTML/JS site.

3. Call the Endpoints

Use standard fetch() calls to send contact forms, manage CMS content, handle subscriptions and more.

Quick Example

// Send a contact form from your static site
fetch('https://yourapi.com/v1/contact', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_PUBLIC_KEY'
  },
  body: JSON.stringify({
    from: 'visitor@example.com',
    subject: 'Enquiry',
    message: 'Hello, I have a question...'
  })
});

Available Endpoints

  • POST /v1/contact – Send a contact-form message
  • POST /v1/subscribe – Subscribe an email address
  • POST /v1/unsubscribe – Unsubscribe an email address
  • POST /v1/broadcast – Email all active subscribers
  • GET /v1/cms – Retrieve all CMS content
  • GET /v1/cms/:key – Get a single content block
  • POST /v1/cms – Create or update a content block
  • DELETE /v1/cms/:key – Remove a content block
  • GET /v1/subscribers – List all subscribers
  • GET /v1/ping – Health check
  • GET /v1/config – Public company configuration

Ready to Add Server Features to Your Site?

Sign up, configure your company, and start making API calls in minutes.