Project API

Forms API

Create embeddable signup forms from code, and read who submitted them.

View as Markdown ↗

Project key. Acts in the project the key belongs to. An all-access key works too — name the project with an X-Project-Id header. How keys and scopes work.

Endpoints

GET/v1/forms
POST/v1/forms
GET/v1/forms/{id}
PATCH/v1/forms/{id}
DELETE/v1/forms/{id}
POST/v1/forms/{id}/publish
POST/v1/forms/{id}/duplicate
GET/v1/forms/{id}/embed
GET/v1/forms/{id}/submissions
GET/v1/form-themes
POST/v1/form-themes
PATCH/v1/form-themes/{id}
DELETE/v1/form-themes/{id}
POST/v1/form-themes/{id}/copy

Create a form

Omit fields and you get the starter form: an email field and a consent checkbox with GDPR-shaped wording already in it.

cURL
curl -X POST https://emailbump.com/api/v1/forms \
  -H "Authorization: Bearer ebk_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Newsletter", "lists": ["LIST_ID"] }'

Body parameters

namestringrequired

Internal name. Visitors never see it.

slugstringoptional

Vanity URL segment. Defaults to a slug of the name, and is safe to change later.

kindstringoptional

inline (default), popup, slide_in, sticky_bar or hosted.

listsstring[]optional

List ids new subscribers join.

themestringoptional

A thm_… id to inherit styling from. Defaults to the project’s default theme.

fieldsobject[]optional

The form’s fields. Exactly one must be an email field.

confirmationstringoptional

double (default), single or none.

designobjectoptional

Overrides over the theme. Anything omitted is inherited. color_scheme is auto (default), light or dark.

protectionobjectoptional

Captcha and address screening: captcha, block_disposable, block_freemail, block_role, allowed_origins.

New forms are created as draft. Publish when you’re ready with POST /v1/forms/{id}/publish.

Field types

email text textarea number date select checkboxes boolean consent lists hidden heading paragraph divider image spacer

There is no separate attribute registry to keep in step — the field is the declaration, and values are normalised (bool, number, date, string) before they merge into the contact’s attributes.

  • consent needs text. That wording is stored with every submission and repeated in the confirmation email.
  • lists renders checkboxes bound to real lists. Ticking nothing subscribes them to nothing — the choice was offered.
  • hidden fills {{utm_source}}-style tokens from the page’s own URL. {{page_url}} and {{referrer}} also work.

The id never changes

A form’s id (frm_…) is immutable and is what every embed and API call names. Its slug is the vanity URL only, unique within your project. Rename a form, restyle it, point it at a different list — the id stays put, so the tag on your website never needs re-pasting. Renaming the slug changes /f/your-project/newsletter and nothing else.

Get the embed code

cURL
curl https://emailbump.com/api/v1/forms/frm_8f2c9a1b3d/embed \
  -H "Authorization: Bearer ebk_your_key"

Returns script, iframe, html, react, vue, url and permanent_url. The one most people want:

HTML
<script src="https://emailbump.com/f.js" data-form="frm_8f2c9a1b3d" async></script>

Submissions

Every submission is stored, including the ones the anti-spam checks turned away — a form quietly rejecting thousands of attempts from one network is only visible if the refusals are recorded next to the successes.

cURL
curl "https://emailbump.com/api/v1/forms/frm_8f2c9a1b3d/submissions?limit=50" \
  -H "Authorization: Bearer ebk_your_key"

Each row carries the consent snapshot, IP, referring page and location, plus a status of pending_confirmation, confirmed, accepted or rejected. Filter with ?status=.

Themes

A theme is shared styling for a project. Forms store only their own overrides, so changing a theme restyles every form on it — live, with no re-embedding.

cURL
curl -X PATCH https://emailbump.com/api/v1/form-themes/thm_yourbrand \
  -H "Authorization: Bearer ebk_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "tokens": { "accent": "#111827", "radius": 8, "font": "system" } }'

Themes are scoped to a project, like contacts, lists and templates. To reuse a brand elsewhere, copy it — the copy is an independent snapshot that drifts freely from the original. Copying names two projects, so it takes an account-scoped key; the destination may be in any workspace you’re a member of.

Colours and URLs are checked, not passed through

Design colours must be a hex value, an rgb()/rgba() value, or transparent — they end up inside a stylesheet we generate for your page. Redirect URLs must be absolute http:// or https://. Anything else is refused with an explanation rather than silently dropped.