Skip to main content
Use your own sign-up form, checkout or mobile app, and still let a Brudcast form decide what happens next. Your code sends the answers to the form, and Brudcast treats them like a submission on the hosted page. It adds the person to the form’s list, sends the confirmation email, records consent and shows the response on the form’s Submissions or Responses tab.
Before you start: you need a published form, and an API key with Form Submissions set to Full access. The form’s Share tab has a Create a key button that opens the create panel with that permission already chosen. See API keys.
Call this API from your server. An API key in browser or app code can be copied by anyone who opens it, and whoever holds it can submit to your forms as you.
1

Find the form ID and its question keys

Open the form and go to the Share tab. Under Submit via API you’ll find the Endpoint, the Form ID, and the Question keys, each with the question it belongs to. The Example request there is already filled in with this form’s keys, in cURL, JavaScript, Python and PHP.A question’s key is a short name such as email, first_name or company_size. Questions mapped to a contact field use that field’s name. Other questions are named after their wording. You can rename a key in the question’s editor on the Questions tab. See Question keys.To read the same details from code, call GET /contact-forms/{id}/schema with a key that has forms:read.
2

Send the answers

POST /contact-forms/{id}/submissions takes the answers in values, keyed by question key.
3

Read the result

A new submission answers 201. data is the submission as Brudcast stored it, after the confirmation email was queued or the contact was added.
The response has more fields than shown here. status tells you what happened next:

What the API checks

An API submission goes through the same checks as one from the hosted page, with three exceptions. The hidden bot field, the minimum time on the page and the bot challenge only work in a browser, so they’re skipped, and the Bot check column shows Not run. Your API key already says who’s calling. Everything else still applies:
  • The form must be Live.
  • Submissions allowed per hour and Stop after this many responses count hosted and API submissions together.
  • One response per email address, your suppression list and your contact limit apply as usual.
  • A form that uses double opt-in still sends its confirmation email. The API can’t skip it, so a person is only added to the list once they confirm.
  • Your API key’s own rate limits apply on top.
Unlike the hosted page, the API tells you when it refuses a submission. The hosted page shows a visitor the normal thank-you message for most refusals, so a stranger can’t learn who is on your list. Your code gets a real error instead, and the refused submission still appears on the form with its reason.

Answers

Every required question needs an answer. If an answer is missing, a key isn’t on the form, or a question is answered twice, the request fails with 422 and lists every problem at once. You can key an answer by the question’s id instead of its key. Keys are easier to read, and they don’t change if a question is deleted and added again.

Question keys

Each question on a form has a key, unique on that form. Brudcast picks one when the question is created. To change it, open the question on the form’s Questions tab and edit its API key. Keys use lowercase letters, numbers and underscores, and start with a letter. The Share tab lists every key.
Renaming a key on a live form breaks any integration that still sends the old one. The question warns you before you save.
The request comes from your server, so its IP address says nothing about the person who filled in your form. Pass what you know about them in context:
string
The person’s IP address, as your server saw it.
string
Their browser’s user agent, up to 1,024 characters.
string
The page they submitted from, up to 2,048 characters.
These values are stored on the submission and its consent record as your code reported them, together with the name of the API key that sent them. Leave context out and they stay empty.

Retry safely

Send an Idempotency-Key header, up to 128 characters, that’s unique for each submission. If a request times out, retry with the same key. When Brudcast already accepted it, you get the original submission back with 200 and an Idempotent-Replayed: true header, and nothing is recorded or emailed twice. A refused submission doesn’t keep its key. Retrying it runs the checks again.

Errors

See Errors for the response shape. Earlier versions of the API sent these codes without the E_ prefix, for example FORM_CLOSED; update any code that matches on the old spelling.

Publish and share a form

The Share tab and the form’s checks.

Submissions and responses

Where API submissions show up.

API keys

Create a key with Form Submissions access.

Sync contacts from your app

Write contacts directly, without a form.