HoundSec Forms

Docs

Integration guide

HoundSec Forms receives submissions from any website with one POST request. Each submission is checked with Cloudflare Turnstile, matched against the form’s allowed hostnames, stored in a private inbox, and, while delivery is on, emailed to the form owner.

Setup

  1. Create a Turnstile widget in Cloudflare for the sites that will host the form.
  2. Ask your HoundSec admin to create the form with those hostnames and the widget’s site and secret keys.
  3. Copy the endpoint and a snippet from the form’s Integration tab, and paste it into your site.
  4. Send a test submission. It shows up in the inbox right away.

API reference

POSThttps://forms.houndsec.net/api/forms/FORM_ID/responses

The JSON body is { "response": "..." }, one string of up to 64 KB. The Turnstile token goes in the cf-turnstile-response header, and the widget must use data-action="submit". A token works once, so reset the widget after each attempt.

A browser request is accepted only when its Origin hostname is on the form’s list, and the matching origin is echoed in CORS headers. A client that sends no Origin, such as curl, is not blocked by the list but still needs a valid Turnstile token.

StatusMeaning
201Stored. The body is { "ok": true }.
400The body is not JSON, or response is missing or empty.
403The Origin is not an allowed hostname, or the Turnstile token failed.
404No form with that id.
413The response is larger than 64 KB.
429Too many submissions from one address. Try again later.

Snippets

Replace FORM_ID and YOUR_SITE_KEY. The Integration tab in the dashboard shows these with your values filled in.

<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script><form id="contact">  <input name="name" placeholder="Name" required />  <input name="email" type="email" placeholder="Email" required />  <textarea name="message" placeholder="Message" required></textarea>  <div class="cf-turnstile" data-sitekey="YOUR_SITE_KEY" data-action="submit"></div>  <button type="submit">Send</button></form><script>  const form = document.getElementById("contact");  form.addEventListener("submit", async (event) => {    event.preventDefault();    const data = new FormData(form);    const response = ["name", "email", "message"]      .map((label) => `${label}: ${data.get(label) ?? ""}`)      .join("\n");    const res = await fetch("https://forms.houndsec.net/api/forms/FORM_ID/responses", {      method: "POST",      headers: {        "Content-Type": "application/json",        "cf-turnstile-response": String(data.get("cf-turnstile-response") || ""),      },      body: JSON.stringify({ response }),    });    if (window.turnstile) window.turnstile.reset();    if (res.ok) form.reset();  });</script>

Field format

The stored response is one string. Put each value on its own line as Label: value and the inbox splits it into fields when there are at least two. Anything else stays plain text. A label starts the line, is at most 40 characters, and may contain letters, numbers, spaces and hyphens. A later line that is not a new label belongs to the previous value, so keep free text last.

name: Ada Lovelace
email: ada@example.com
subject: Hello
message: First line
Second line

Inbox

The inbox lists responses with the sender’s name, email and a one-line summary taken from subject, a product or item, or the message. Selecting one opens it in a side panel with every field as a labeled row, lists such as scope or services as chips, and long text such as message in full. The first link in a response gets a preview card. Search matches the raw string, and you can filter by date, export to CSV, and move through responses with J and K.

Have a HoundSec account? Log in to the dashboard.