Build a form connector
When someone completes a form, ebitex can send the submission somewhere else: a recruiting tool, a spreadsheet, a ticketing system. A form connector is a service you host that receives those submissions. A form owner adds it to their organization by pasting its address, attaches it to a form, and ebitex calls it, signed, once for each completed submission.
A connector holds no ebitex credential and runs no code inside ebitex. It is told only what the organization approves.
What a connector is
Section titled “What a connector is”Two endpoints under one HTTPS base address:
| Call | Purpose |
|---|---|
GET {base}/manifest |
Says who the connector is, its version, the settings it takes and the permissions it needs. |
POST {base}/submission |
A form was completed: do something with it. |
The address must be HTTPS and reachable from the public internet. ebitex follows no redirect and will not call a private address.
The manifest
Section titled “The manifest”{ "protocol": 1, "key": "acme-recruiting", "name": "Acme Recruiting", "description": "Creates a candidate in Acme from a job application.", "version": "1.0.0", "types": { "forms.submissionHandler": { "settings": [ { "key": "workspace", "label": "Workspace", "kind": "text", "required": true, "help": "The short name in your Acme address.", "pattern": "^[a-z0-9-]{3,20}$", "patternMessage": "Use 3 to 20 lowercase letters, digits or dashes." }, { "key": "apiKey", "label": "API key", "kind": "secret", "required": true } ], "permissions": [ { "permission": "submission.answers", "required": true, "reason": "To create the candidate from the application." }, { "permission": "submission.attribution", "required": false, "reason": "To record where the candidate came from." } ] } }}keyis lowercase letters, digits and hyphens, 3 to 64 characters. It does not change.versionismajor.minor.patch. A higher one is an upgrade the organization approves.- The manifest has exactly one type,
forms.submissionHandler.settingsare asked for each time the connector is attached to a form (text,urlorsecret; a secret is stored protected and never shown again). They are sent to you insettingson every call. Apatternis checked by ebitex when the form owner saves the setting, and yourpatternMessageis what they see if it does not match. - Settings are per form attachment. There are no account-level settings and nothing is per mode.
Permissions
Section titled “Permissions”| Permission | You receive |
|---|---|
submission.answers |
The answers the form owner allows, each with its label, in fields. |
submission.attribution |
Where the submission came from (source, medium, campaign), in attribution. |
- You are sent exactly what was approved, and nothing else. A permission you did not declare is never sent.
- A required permission that is not approved rejects the delivery, not your connector. ebitex does not call you; the submission shows a failed delivery naming the missing permission.
- An optional permission that is not approved is simply absent from the body. Handle a missing field.
- The form owner chooses the answers. When attaching you, they can send every answer, or only the ones they pick, even none. Your
fieldsholds only those. Never assume a field is present. targetFieldsis optional. List the fields your service accepts, each{ "key": "email", "label": "Email", "required": true }(at most 50; keys are letters, digits, dot, dash and underscore; labels at most 80 characters), and the form owner gets a table to match their answers to them when they connect you. Leave it out and nothing changes: you get every allowed answer infieldsand map them yourself. See “Let the form owner map the answers” below.- Never sent, whatever you ask: the visitor’s token, their consent choices, and any key used to write back to a CRM.
- A change of permissions is a new version. Publish it with a higher
version. ebitex re-reads your manifest when the organization checks for updates, shows what is new, and keeps serving the approved version until they approve.
The call
Section titled “The call”{ "protocol": 1, "action": "submission", "idempotencyKey": "submission:6f1c2b0e9a8d4c37b1e5a2d90c7f4b61", "organizationId": "08b27ef8-fb84-4800-99f1-40302e68830e", "test": false, "settings": { "workspace": "acme-eu", "apiKey": "…" }, "submission": { "id": "6f1c2b0e-9a8d-4c37-b1e5-a2d90c7f4b61", "formName": "Job application", "completedAt": "2026-11-22T10:15:00Z" }, "fields": { "name": { "label": "Full name", "value": "Ada Lovelace" }, "email": { "label": "Email", "value": "ada@example.com" } }, "attribution": { "source": "newsletter", "medium": "email", "campaign": null }}Answers are keyed by the form field’s key, each with the label the visitor saw. Map them to your own fields on your side. The body is at most 64 KB; a larger submission is not sent and shows as failed.
Let the form owner map the answers
Section titled “Let the form owner map the answers”When your manifest declares targetFields, the call also carries mapped, beside fields and never instead of it:
"mapped": { "email": "ada@example.com", "full_name": "Ada Lovelace" }Each key is one of your target keys and each value is the answer the form owner matched to it. Only targets with an answer are present, so a target that was not matched, or whose answer was not sent, is absent rather than empty. Matching is one answer per target, and the table fills in only matches that are certain (the same key or label), so check for a missing key rather than trusting a default. A target marked required must be matched before the form owner can connect you.
Mapped values are answers, so they need submission.answers like fields does, and a form owner who limits the answers sent cannot map one that is not sent. A connector that declares no targetFields gets no mapped at all. A new version that removes a target field, or adds a required one, is a breaking change the organization reviews, because mappings already built name your keys.
Answer with a 2xx and a JSON body:
outcome |
Meaning |
|---|---|
done |
It is received. The delivery shows as delivered. |
skipped |
You chose to do nothing for this submission (a duplicate, say). Give a short code. |
retry |
Not now. ebitex asks again later. |
failed |
Asking again will not change it. The form owner sees your message. |
Add a short code, a message the form owner can read (at most 200 characters, plain text, never a key or a response body) and, if you like, a flat report of up to 10 short entries. They are shown as plain text on the submission. A 429, any 5xx, a timeout or a network failure is treated as retry. Any other status is a failed with the status as its code. Answer within 5 seconds.
Be idempotent on idempotencyKey. Every automatic attempt for one submission carries the same key, so a retry after a timeout is safe to answer done without doing the work twice. When a person presses Resend, or sends a test, the key is new, because they want it done again. A test has test: true: change nothing real for it.
Delivery is in the background
Section titled “Delivery is in the background”A submission is recorded and then sent by a background pass, usually within a minute, so a slow connector never slows the form. If it cannot be reached, ebitex tries again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours, then marks the delivery failed. If your service is down, ebitex calls you once per pass rather than once per waiting submission. On a form that does not save submissions there is nothing to keep a delivery against, so you get one attempt at the moment of submission and no retry. If you are turned off when a delivery comes due, it is recorded as skipped and nothing is sent.
At-least-once, and what erasure does not reach
Section titled “At-least-once, and what erasure does not reach”Delivery is at least once: a retry after a timeout, a Resend, or a replay after a subscription lapse can deliver the same submission again, which is why you answer on idempotencyKey. And a copy you have received is yours: if a person’s submission is later deleted or erased in ebitex (a retention sweep, an erasure request, deleting the form), ebitex cannot reach into your service. Honouring an erasure of what you were sent is your responsibility, so say in your own privacy notice what you keep.
Verify every call
Section titled “Verify every call”Each call carries an X-Ebitex-Signature header made exactly as the organization webhooks’ is: an HMAC-SHA256 of {timestamp}.{body} under the signing secret, which the organization is shown once when they add you. Verify it against the raw bytes you received, reject a timestamp older than five minutes, and compare in constant time. The scheme is described in full in Webhooks. The header may also name the key it was signed under, as v1,t=<seconds>,k=<key id>,s=<hex>; the key id is not part of what is signed.
A complete example
Section titled “A complete example”A single file of Node, with no dependencies. It serves the manifest, verifies the signature, is idempotent, handles an absent field, and answers done.
// example:form-connectorimport { createServer } from 'node:http'import { createHmac, timingSafeEqual } from 'node:crypto'
export const MANIFEST = { protocol: 1, key: 'example-recruiting', name: 'Example recruiting', description: 'Pretends to create a candidate from a job application.', version: '1.0.0', types: { 'forms.submissionHandler': { settings: [{ key: 'workspace', label: 'Workspace', kind: 'text', required: true, pattern: '^[a-z0-9-]{3,20}$', patternMessage: 'Use 3 to 20 lowercase letters, digits or dashes.' }], permissions: [{ permission: 'submission.answers', required: true, reason: 'To create the candidate.' }], }, },}
/** True when `header` (`v1,t=<unix seconds>[,k=<key id>],s=<hex>`) is a fresh, correct signature of `rawBody`. */export function verify(rawBody, header, secret, now = Date.now()) { const match = /^v1,t=(\d+)(?:,k=[A-Za-z0-9._-]{1,32})?,s=([0-9a-f]{64})$/.exec(header ?? '') if (!match) return false const [, t, s] = match if (Math.abs(now / 1000 - Number(t)) > 300) return false const expected = createHmac('sha256', secret).update(`${t}.`).update(rawBody).digest() const given = Buffer.from(s, 'hex') return given.length === expected.length && timingSafeEqual(given, expected)}
export function createConnector(secret) { const answered = new Map() // idempotencyKey -> answer; keep this in a database in a real connector let created = 0
return createServer((request, response) => { const send = (status, body) => { response.writeHead(status, { 'Content-Type': 'application/json' }) response.end(JSON.stringify(body)) }
if (request.method === 'GET' && request.url?.endsWith('/manifest')) return send(200, MANIFEST)
const chunks = [] request.on('data', (chunk) => chunks.push(chunk)) request.on('end', () => { const raw = Buffer.concat(chunks) if (!verify(raw, request.headers['x-ebitex-signature'], secret)) return send(401, { error: 'bad_signature' })
const call = JSON.parse(raw.toString('utf8')) if (call.test) return send(200, { outcome: 'done', code: 'test' }) // change nothing real for a test if (answered.has(call.idempotencyKey)) return send(200, answered.get(call.idempotencyKey)) if (!call.fields?.email) return send(200, { outcome: 'skipped', code: 'no_email', message: 'No email answer was sent, so no candidate was created.' })
// Do the real work here: create a candidate in call.settings.workspace from call.fields. const answer = { outcome: 'done', code: 'received', message: `Created candidate ${++created} from ${Object.keys(call.fields).length} answers.` } answered.set(call.idempotencyKey, answer) send(200, answer) }) })}Add it, then try it
Section titled “Add it, then try it”In Hub, open Plugins and choose Add by address. Paste your base address, review the permissions you asked for, approve the optional ones you want and add it. Hub shows the signing secret once. Then use Send a test: it makes the same signed call a real submission would, with test: true and a made-up submission, so you can see it arrive and see exactly which fields were sent.
Then open a form’s Triggers page, choose Connect a destination, then Connector. The page shows the address that will receive the answers, asks for your settings, and lets the form owner choose which answers to send. Send test on the connected row sends a test built from that form’s own fields.
Open the connector in Hub to review a newer version, send a test, turn it off or remove it. A connector a form uses cannot be removed until it is detached, and Hub names the forms. Turning it off stops sending: each new submission is recorded as skipped, and can be resent once it is back on.
Connectors that ebitex hosts itself are added the same way, from an address on ebitex’s own plugin host. They follow the same protocol and are limited by the same permissions as yours; the only difference is that ebitex approves what they declare.
Limits and failures
Section titled “Limits and failures”- A call has 5 seconds to answer. A slower answer is a retry.
- The body is at most 64 KB. A larger submission is not sent and shows as failed.
- If your address stops being reachable, the submission shows why. Once it is back, the form owner can use Resend on any delivery that gave up.
- The manifest is at most 16 KB. Keys, labels and descriptions have the lengths shown above; a manifest that breaks them is refused when it is added, with the reason.