← Back to blog
Integrations & Automation

Form API Guide for Developers

August 24, 2026

Illustration of a developer form API with code brackets and connected nodes

Native integrations and no-code automations cover most needs, but sometimes you need to build directly against a form platform. That's where a form API comes in. With a form API you can create forms programmatically, pull responses into your own app, and wire submissions into custom workflows, all in code. This guide walks developers through the core concepts using FormMaker, a 100% free online form builder with an API, webhooks, and a JavaScript SDK.

What a form API lets you do

A form API exposes your forms and responses as programmable resources over HTTP. Instead of clicking around a dashboard, you make requests from your own code. A typical form API lets you:

  • List and read responses so you can sync data into your own database or app
  • Create or update forms programmatically, useful for multi-tenant products
  • Fetch a single response by ID for lookups
  • Combine with webhooks so you're notified in real time, then use the API to fetch full details

The API is the pull side; webhooks are the push side. Together they cover both real-time events and on-demand access.

Before you start

You'll need:

  1. A FormMaker account and at least one form.
  2. An API key or access token. Generate this in your account settings.
  3. A tool to make HTTP requests, such as curl, a REST client, or your language's HTTP library.

Treat your API key like a password. Never commit it to source control or expose it in client-side code. Store it in an environment variable or a secrets manager.

How authentication works

Most form APIs authenticate with a bearer token sent in the Authorization header. In FormMaker's case, check the official docs for the exact scheme, but it generally looks like this:

Authorization: Bearer YOUR_API_KEY

Every request you make includes this header so the server knows who you are and which account's data to return.

Making your first request

Here's an illustrative fetch() call to list responses for a form. The endpoint path is a placeholder, so confirm the real one in the FormMaker docs.

const API_KEY = process.env.FORMMAKER_API_KEY;

async function listResponses(formId) {
  const res = await fetch(
    `https://api.formmaker.co/v1/forms/${formId}/responses`,
    {
      headers: {
        Authorization: `Bearer ${API_KEY}`,
        "Content-Type": "application/json",
      },
    }
  );

  if (!res.ok) {
    throw new Error(`Request failed: ${res.status}`);
  }

  const data = await res.json();
  return data.responses;
}

The response will typically be a JSON object containing an array of responses, each with the answers and metadata like a submission timestamp and a unique ID.

Working with responses

Once you can list responses, common tasks follow the same pattern.

Fetch a single response

Request a specific response by its ID when you need to look up one record:

async function getResponse(formId, responseId) {
  const res = await fetch(
    `https://api.formmaker.co/v1/forms/${formId}/responses/${responseId}`,
    { headers: { Authorization: `Bearer ${API_KEY}` } }
  );
  return res.json();
}

Handle pagination

Forms can collect a large number of responses. APIs usually paginate results, returning a page at a time with a cursor or page parameter. Loop until there are no more pages so you don't miss data. Check the docs for the exact pagination style.

Sync to your database

A common workflow is to page through responses on a schedule and upsert each one into your own database using its unique ID as the key. That keeps duplicates out and makes re-runs safe.

Combining the API with webhooks

The most robust setups use both:

  1. A webhook fires the instant a form is submitted, giving you real-time notice.
  2. Your handler optionally calls the API to fetch the full response or related data.
  3. You process, store, or forward the data as needed.

This pattern gives you real-time speed with the flexibility to pull whatever extra detail you need. FormMaker also offers a JavaScript SDK, which can wrap these calls in convenient methods so you write less boilerplate.

Best practices for using a form API

  • Keep keys server-side. Never ship an API key in front-end code; proxy requests through your backend.
  • Handle rate limits. Respect any limits the API documents, and back off and retry on a 429 response.
  • Check status codes. Treat non-2xx responses as errors and log enough context to debug.
  • Use idempotent syncs. Key records by their response ID so re-running a sync never creates duplicates.
  • Read the docs for exact endpoints. The URLs here are placeholders; always confirm real paths, parameters, and payloads in the official FormMaker documentation.
  • Version your integration. APIs evolve; pin to a version where possible and watch for change announcements.

Frequently asked questions

Do I need the API if I already use integrations?

Not necessarily. Native integrations and Zapier cover most no-code needs. Reach for the form API when you're building a custom product or need programmatic control that off-the-shelf tools can't provide.

How do I keep my API key secure?

Store it in an environment variable or secrets manager, keep it server-side, and rotate it if you suspect it's been exposed. Never place it in client-side JavaScript.

Should I poll the API or use webhooks?

Use webhooks for real-time events and the API for on-demand reads or backfills. Polling the API repeatedly for new data is less efficient than letting webhooks notify you.

Is the API free?

Yes. FormMaker is free with unlimited forms and responses, and includes an API, webhooks, and a JavaScript SDK.

Start building with the form API

A form API turns your forms into programmable building blocks. Authenticate with a token, list and fetch responses, page through your data, and combine the API with webhooks for a real-time, fully custom pipeline. Always confirm exact endpoints and auth details in the official docs before you ship.

Start automating your forms free with FormMaker and build exactly the workflow your product needs.

Build your first form free

Drag, drop, publish. No credit card, unlimited submissions.