For developers
Forms API
Embed contact and subscribe forms; POST JSON or form-encoded to /api/forms/submit.
Create a form key
Dashboard → Audience → Forms → create contact or subscribe. Copy the access key from Manage. Keys are public by design; spam controls are honeypot, optional Origins, and rate limits.
Endpoint
POST https://asuito.com/api/forms/submit accepts application/x-www-form-urlencoded, multipart, or application/json. CORS reflects allowed Origins when configured.
Fields
access_key (required) — form public key.
kind — contact (default) or subscribe (must match the key).
email, name, message — subscribe requires email; contact needs message and/or email.
botcheck — honeypot; leave empty / hidden. If filled, the API returns ok without storing.
subscribe — contact forms: a ticked checkbox (on, true) sends the sender a confirmation email; once they confirm, they are on your list.
shield_token, shield_nonce — the bot check. Every form requires it unless switched off in its settings. Load https://asuito.com/api/forms/shield.js on the page: it fills both fields in a plain HTML form by itself; a script-driven form adds ...(await AsuitoShield.solve(accessKey)) to its body. A submission without a valid, unused answer, or sent within a couple of seconds of the page loading, is kept as Spam and reaches nobody.
Through the Asuito tag: with px.js in your site's head, <div data-asuito-form="KEY"></div> draws the hosted form, and a form set to place itself (Design → Show it inside my pages) appears inside matching articles after the paragraph you choose. The article body is found on WordPress, Ghost, Shopify, Squarespace, Webflow, Wix, Blogger, Substack and most themes; set a CSS selector in the form's placement settings if yours is not. data-inline-forms="off" on the tag turns this off.
Visitors already on your list do not see subscribe forms. The tag sets one first-party cookie, asuito_sub, on your domain when someone joins through one of your forms or arrives from one of your emails, and skips subscribe forms (contact forms still show) for a year. If your site has its own sign-in, call spx('subscribed') after login to do the same for signed-in users.
A site with a Content-Security-Policy must allow https://asuito.com in frame-src (the form) and connect-src (already needed for analytics).
Every contact form sender is saved to Contacts, tagged contact-form, and is never emailed unless they confirm a subscription. Messages that look like spam (links in the name, link-stuffed or HTML messages) are kept and marked Spam, answer ok, and send no notification.
JSON example
Useful for custom UIs. Subscribe returns { ok: true } after queuing the confirm email when needed.
curl -X POST https://asuito.com/api/forms/submit \
-H "Content-Type: application/json" \
-d '{
"access_key": "YOUR_ACCESS_KEY",
"kind": "contact",
"name": "Ada",
"email": "ada@example.com",
"message": "Hello"
}'Analytics (optional)
After a successful submit you may fire window.spx('form_submit', { kind: 'contact' }). Never put the visitor’s email in analytics properties.
Confirm and unsubscribe
Subscribe confirmation links hit https://asuito.com/api/audience/confirm?token=…. Unsubscribe links use /api/audience/unsubscribe. Those routes are for email links, not for your embed.