Documentation
Everything you need to embed HTforms on WordPress or call the API.
1. Install the WordPress plugin
- Requires WordPress 6.0+ and PHP 7.4+.
- Download HTforms WordPress plugin v1.11.24 (htforms-wordpress-1.11.24.zip). In WordPress go to Plugins → Add New → Upload Plugin, choose the file, then Activate.
- In HTforms open WordPress & API, create an API key and copy it.
- In WordPress open HTforms → Connection. Paste your HTforms URL and the API key, then Save & test.
- Edit any page: add the HTforms block and pick a form, or paste
[htform id="FORM-ID"]. Works in Elementor, Divi and others via their shortcode widget.
Security model
- The API key is stored in WordPress options and is only used server-side. It never appears in page HTML or JavaScript.
- Visitors submit to your own WordPress site (
admin-ajax.php, protected by a nonce). WordPress forwards the entry to HTforms with the key. - HTforms re-validates every value against the published form and checks the form belongs to the key's HTforms account.
2. API reference (v1)
Base URL: https://YOUR-HTFORMS-DOMAIN/api/public/v1. Responses are JSON: { data } or { error: { code, message, fields? } }.
Authentication
Send Authorization: Bearer htf_live_…. Keys are scoped to one HTforms account and can be revoked any time.
GET /status
curl -H "Authorization: Bearer $KEY" https://…/api/public/v1/status
→ 200 { "data": { "connected": true, "api_version": "v1", "workspace": "Acme", "plan": "free" } }GET /forms
Lists forms in the key's HTforms account (requires key).
GET /forms/:id
Returns a published form definition. Key optional; with a key, the form must belong to your HTforms account. Add ?view=1 to count a view.
POST /forms/:id/submissions
JSON { values: { fieldId: value }, _hp: "", _ts: 1712345678901 } or multipart form-data (needed for file uploads; use field[] for checkboxes).
curl -X POST https://…/api/public/v1/forms/$FORM/submissions \
-H "Content-Type: application/json" \
-d '{"values":{"name":"Ada","email":"ada@example.com","message":"Hi"}}'
→ 201 { "data": { "id": "…", "message": "Thanks!", "redirect_url": null } }Errors
401 invalid_api_key— missing, wrong or revoked key.403 forbidden— the form belongs to another HTforms account.404 form_not_found— not published or doesn't exist.422 validation_failed— seeerror.fields.429 rate_limited— 8 submissions/minute per visitor per form; 120 reads/minute per IP.503 temporary_failure / upload_failed— safe to retry with backoff.
Limits
Files up to 10 MB each (per-field limit configurable); executable and script file types are rejected. Requests over 25 MB are refused.
3. Entry automations
In WordPress & API → Entry automations, choose a published form, select answers to share and optionally set an answer-based rule. Save, then send a connection test. Only a confirmed delivery activates the connection. Tests send no visitor data; Slack gets a test message and Notion gets a test page.
- Zapier / Make / n8n Cloud: create a webhook trigger and paste its HTTPS URL. Map the selected answers using
submission.answers. - Slack: create an incoming webhook for your chosen channel, then paste its URL.
- Notion: give your integration access to the database, enter its token, database ID and exact title property name, then choose the answer for the page title. Other selected answers become page text.
- Webhooks: approved receivers currently include webhook.site, requestcatcher.com and pipedream.net. Custom servers and self-hosted n8n are not yet supported.
- Connection URLs, tokens, signing secrets and custom X-headers are encrypted and never returned after saving. Only the account owner can manage connections. Disconnect removes saved credentials and pending deliveries; revoke the token or webhook in the external service too.
Signed delivery and history
Webhook deliveries include X-HTforms-Event-ID, X-HTforms-Timestamp and X-HTforms-Signature. Verify HMAC-SHA256 over timestamp + "." + rawBody using your signing secret, reject old timestamps and deduplicate by event ID. Signature format: sha256=hex_digest.
Accepted, non-spam submissions from hosted pages, embeds, APIs and WordPress enter the same saved queue. A scheduled worker checks each minute; provider failures do not prevent saving the entry. Confirmed temporary webhook failures retry after 1, 5 and 30 minutes. Slack and Notion retry only confirmed rate-limit responses; uncertain timeouts are not resent automatically. Delivery history shows actual outcomes, not invented totals.
4. WordPress posts and user registration
Install HTforms WordPress plugin v1.11.24, then open HTforms → WordPress actions in WordPress. Select a published form and save its actions. These settings belong to that WordPress site, not to hosted links or iframe embeds.
- Post submissions: choose text fields for the title, content and optional excerpt. Posts are drafts or pending review, authored by the administrator who saves these settings. Review and publish them in WordPress. HTML, visitor-selected authors and automatic publication are not supported.
- User registration: map a required email field and a required checkbox with exactly one option explicitly consenting to account creation. Optionally map a name and username. Only subscriber accounts are created; an existing account is never changed.
- WordPress sends its own password-setup notification; no visitor password is stored in a form entry, and visitors are not automatically signed in. Delivery depends on your WordPress mail setup and is not confirmed by the action log.
- Only accepted non-spam entries submitted through the plugin can run these actions. Changed or removed mapped fields stop actions until settings are corrected. Recent action history shows saved outcomes; interrupted actions are not automatically retried. Reprocessing the same entry ID cannot create another object, but a new submission is a new entry.
- Changing the connected API key isolates the site’s saved actions; configure the new connection explicitly. Post and account failures do not erase the accepted HTforms entry or change existing email routing.
5. Unfinished forms and visitor journeys
In a form’s settings, enable unfinished answers or form-page journeys, then publish. Select exactly which answers can be saved. Both are off by default and visitors must opt in; declining never prevents submitting. File uploads, signatures, long messages and security answers are not collected.
Open Forms → Entries → Journeys for saved sessions, selected answers, form-page paths, completion time, CSV export and deletion. “Unfinished” means no saved activity for 30 minutes; it does not prove that a visitor abandoned the form. Query strings are removed and no unrelated browsing history is collected. Sessions expire after 30 days and the scheduled cleanup removes expired records. Progress does not send notifications or trigger automations. Install HTforms WordPress plugin v1.11.24 for the same optional capture on WordPress.
Google Sheets, Drive and Calendar
Native per-merchant Google connections require Google authorization setup, which has not been completed. They are not marked connected. Until that setup is available, an existing tested Make or Zapier webhook can forward accepted entries to your own Google account; configure and authorize the Google action in that service. This is an external workflow, not a native Google connection.
6. Troubleshooting
- "Invalid API key" — create a new key; keys are shown only once. Check it wasn't revoked.
- Form doesn't appear — make sure it is Published. Then use HTforms → Troubleshooting → Clear cache (forms are cached for 5 minutes).
- Connection test fails — your host must allow outgoing HTTPS. The Troubleshooting tab shows the exact error.
- Submissions fail behind a caching plugin — exclude
admin-ajax.php; nonces refresh every 12 hours, so very long page caching can expire them. - Uploads rejected — check the allowed types and size on the file field.