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.
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 The response has more fields than shown here.
201. data is the submission as Brudcast stored it, after the
confirmation email was queued or the contact was added.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.
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.Consent evidence
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 incontext:
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.
context out and they stay empty.
Retry safely
Send anIdempotency-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.
Related
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.