Documentation

How to Create & Integrate a Form

Build a form in the DataBeam dashboard, then drop it into any website or app to start capturing leads in real time.

1. Concepts

TermMeaning
FormA configuration you create in the dashboard. It defines the fields to collect and owns a unique UUID + API key.
Form UUIDA public identifier that appears in the submission URL: /api/v1/lead/{form_uuid}.
API keyA secret 32-character key sent in the X-API-Key header to authenticate submissions.
LeadA single submission captured against a form, visible in the Leads screen.

A form is active by default. Only active forms accept submissions.

2. Creating a Form

1
Sign in and open Forms in the sidebar.
2
Click Create Form.
3
Enter a Name (required, 3–100 characters, e.g. Contact Us) and an optional Description (up to 255 characters).
4
Add your fields — for each one set a name (the payload key, e.g. email), a label, a type, and whether it's required.
5
Click Save. DataBeam generates a unique Form UUID and API key and marks the form active.
If you save without defining any fields, DataBeam seeds three defaults: name (required), email (required), and message (optional).

Your fields are stored as JSON, for example:

[
  { "name": "name",    "label": "Full Name",     "type": "text",     "required": true  },
  { "name": "email",   "label": "Email Address", "type": "email",    "required": true  },
  { "name": "message", "label": "Message",       "type": "textarea", "required": true  }
]

3. Supported Field Types

TypeUse for
textSingle-line text (names, subjects)
emailEmail addresses
numberNumeric values
telPhone numbers
textareaMulti-line messages
selectDropdown choices
dateDates

4. Managing a Form

Open Forms → Edit to manage an existing form:

  • Active toggle — pause a form; an inactive form rejects submissions with 401.
  • Notification email — where new-lead alerts are sent (defaults to your account email).
  • Thank-You email — auto-reply to the submitter: enable it, pick which field holds their address, set a subject, and build the HTML template (with image upload and a test send) in Forms → Template.
  • Regenerate API key — issues a new key; the old one stops working immediately, so update your integrations.

5. Integrating a Form

Open Forms → Integration to find your credentials and copy-paste snippets.

Credentials

You need two values: your Form UUID (goes in the URL) and your API key (goes in the X-API-Key header).

Treat the API key like a password. Anyone with the key + UUID can submit leads. Rotate it if it leaks.

The endpoint

GET|POST  {APP_BASEURL}/api/v1/lead/{form_uuid}

# example
https://databeam.interfacebeam.com/api/v1/lead/3f9c1e7a-...-d2

Authentication

Send the API key on every request. The key must belong to an active form, and the UUID in the URL must match the form that owns the key.

X-API-Key: {api_key}

Sending data

The payload can be sent three ways — keys should match your field names:

MethodHow
JSONContent-Type: application/json with a JSON body
Form-encodedA standard HTML form POST
Query stringGET with ?field=value params (handy for testing)

6. Code Recipes

Plain HTML form

<form action="https://databeam.interfacebeam.com/api/v1/lead/{form_uuid}" method="POST">
  <input name="name" type="text" required>
  <input name="email" type="email" required>
  <textarea name="message"></textarea>
  <button type="submit">Send</button>
</form>
A plain HTML form can't set the X-API-Key header. Use the JavaScript or server-side recipes below when you need header auth, or proxy the submission through your own backend to keep the key secret.

JavaScript (fetch)

fetch('https://databeam.interfacebeam.com/api/v1/lead/{form_uuid}', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': '{api_key}',
  },
  body: JSON.stringify({
    name: 'John Doe',
    email: 'john@acme.com',
    message: 'Hello!',
  }),
})
  .then((r) => r.json())
  .then((data) => console.log('Captured', data.lead_id));

PHP (cURL)

$data = ['name' => 'John Doe', 'email' => 'john@acme.com', 'message' => 'Hello!'];

$ch = curl_init('https://databeam.interfacebeam.com/api/v1/lead/{form_uuid}');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode($data),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json', 'X-API-Key: {api_key}'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);

Command line (cURL)

curl -X POST \
  'https://databeam.interfacebeam.com/api/v1/lead/{form_uuid}' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: {api_key}' \
  -d '{"name":"John Doe","email":"john@acme.com","message":"Hello!"}'

7. Responses & Status Codes

Success (200 OK):

{
  "status": "success",
  "message": "Lead received successfully.",
  "lead_id": 1234
}

Errors return { "status": "error", "message": "..." }:

StatusWhen
401Missing X-API-Key header, or key invalid / form inactive
403URL UUID doesn't match the key's form
404Form not found or inactive
422No payload data received
429Rate limit exceeded
500Server failed to store the lead

8. Rate Limiting

Submissions are limited to 5 requests per 60 seconds per API key. On the 6th request in the window you get 429 with these headers:

Retry-After: <seconds>
X-RateLimit-Limit: 5
X-RateLimit-Remaining: 0

Successful responses also include X-RateLimit-Limit and X-RateLimit-Remaining.

9. Viewing & Exporting Leads

  • Leads — every captured lead. Open one to see the full payload, IP, user agent, and referrer.
  • Export — download your leads as CSV for your CRM or spreadsheet.

10. Troubleshooting

SymptomFix
401 Missing X-API-KeyHeader not sent. Plain HTML forms can't; use JS/server-side or a backend proxy.
401 Invalid or inactiveWrong key or paused form. Check the key and that the form is Active.
403 ... does not matchUUID and key are from different forms. Copy both from the same Integration page.
422 No payloadEmpty body. Send fields via JSON, form-encoding, or query string.
429 Rate limitMore than 5 req/min for one key. Back off until Retry-After elapses.

Need to capture leads from this very site? Use the Contact Us button in the corner — it's powered by a DataBeam form. Ready to build your own? Start free →