Create and rotate a server key
As the workspace owner, open Server API and choose Create server key. Select the forms and operations your integration needs. A read key lists forms and responses, opens responses and downloads eligible files. A write key can submit only where the form owner has enabled API writes. A workspace can have up to 20 active keys, with up to 100 forms per key. Copy the secret when it appears, then store it on your server. To rotate, create a replacement with the scopes you need, update the integration, and revoke the old key. Never put a key in a client-side bundle, form action, URL, or log.
Send the bearer key with every request
Use HTTPS on wiztrom.com. Server API requests use the Authorization header. Public hosted and HTML forms use their own endpoint and browser protections.
GET https://wiztrom.com/api/v1/forms
Authorization: Bearer YOUR_SERVER_KEY
Accept: application/jsonList and page through responses
List the forms your key can read, then query one form. The forms array includes id, name, archived, writeEnabled and authenticatedOnly. Selected archived forms remain readable while their data is retained. Each page contains responses and nextCursor. List items contain id, formId, createdAt and status. Read the response by ID for its answers. Held Spam and verification test submissions are excluded. The default limit is 25 and the maximum is 100. Request the next page with the encoded nextCursor value unchanged. A null cursor means there are no more results. New submissions can be checked on a fresh first page. Each request applies the current scopes and retention rules.
GET /api/v1/forms
GET /api/v1/forms/{formId}/responses?limit=25
GET /api/v1/forms/{formId}/responses?limit=25&cursor={nextCursor}
GET /api/v1/forms/{formId}/responses/{responseId}Retrieve answers and files
The response detail includes fields and an attachments array. Eligible attachment entries contain id, field, name, size in bytes, and expiresAt when there is an expiry. Use the same read key for a download. Files must pass scanning and remain available under the form’s retention and deletion settings. Save any copy in a system with the appropriate access and retention controls.
GET /api/v1/forms/{formId}/responses/{responseId}/attachments/{attachmentId}Submit from a backend
In Forms, open Server intake for the destination form. Enable server writes and save the settings. Use that form’s ID. Send a JSON object with the form’s field names, or use multipart/form-data if the form includes uploads. Field and contact validation, duplicate-answer rules, closing rules, request sizes, and workspace submission, storage and delivery allowances apply. Server writes authenticate with the key in place of browser checks such as CAPTCHA, origin, and visitor passwords. Archive or close the form if you want to pause all intake. A successful write returns HTTP 201 with an id. Check Deliveries for the separate result of a configured email or connector. Use a published hosted form if you need Wiztrom to open a visitor payment checkout.
async function sendResponse(formId, eventId, fields) {
const key = process.env.WIZTROM_API_KEY;
if (!key) throw new Error('WIZTROM_API_KEY is missing');
const result = await fetch(
'https://wiztrom.com/api/v1/forms/' + encodeURIComponent(formId) + '/responses',
{
method: 'POST',
headers: {
Authorization: 'Bearer ' + key,
'Content-Type': 'application/json',
'Idempotency-Key': eventId,
},
body: JSON.stringify(fields),
}
);
if (result.status !== 201) {
const reference = result.headers.get('X-Request-ID') || 'unavailable';
throw new Error('Wiztrom returned ' + result.status + ' (' + reference + ')');
}
return (await result.json()).id;
}Retry with the same idempotency key
Store an Idempotency-Key for each logical submission. Retries are scoped to the same server key and form. Use 1 to 128 ASCII letters, digits, dots, underscores, colons, or hyphens. If a request times out, resend with the same key and fields or files within 24 hours. A repeat of a retained response returns the original receipt without counting a second submission. A changed request with the same key returns HTTP 409. An exact retry whose original response has been deleted or expired returns HTTP 410 during the retry window.
Make a form server-only
Select Require authenticated intake and save after your backend successfully submits to the form. Hosted and public submissions are then disabled for that form. Keep server writes enabled to receive responses through the API. Turning them off pauses server intake. Require authenticated intake remains in effect until the owner turns it off, including after a downgrade below Pro. For a mixed-use form, leave public intake enabled and use its configured browser protections.
Handle errors and limits
HTTP 401 means the key is missing, invalid, or revoked. Check the current plan and permissions for HTTP 403. Check the form and response IDs and retention for HTTP 404. The API allows 60 requests per minute per key, subject to shared request limits. X-RateLimit-Limit shows the per-key limit and X-RateLimit-Remaining shows the remaining requests. On HTTP 429, wait for the number of seconds in Retry-After when present and check Usage if you reached a workspace allowance. Save the request reference for support and leave keys and submission answers out of logs.