One script tag. Your form keeps working exactly as it does now, and if our service is ever unavailable it simply submits as normal.
Paste this just before the closing </body> tag on the page with your
contact form, using the site key from your dashboard.
<script src="https://junkgate.com/jg.js"
data-key="YOUR_SITE_KEY"></script>
That is the whole installation. JunkGate finds the forms on the page, adds the hidden field it needs, and checks each submission as it is sent.
Submit your own form once. It should behave exactly as it always has. Open your dashboard and the submission will be listed with a verdict and a reason.
| Attribute | What it does |
|---|---|
data-key | Required. Your site key. |
data-forms |
A CSS selector, if you only want specific forms protected. Defaults to every form on the page. |
data-jg-success |
Put this on a form, pointing at your own success element, and we will show yours instead of a default message. |
Contact forms are not the only way junk arrives. On any paid plan you also get a private forwarding address for each site.
If you run a custom backend rather than an HTML form, post to the endpoint directly and
use the deliver field in the response to decide what to do.
POST https://junkgate.com/v1/submit
Content-Type: application/json
{
"key": "YOUR_SITE_KEY",
"name": "Sarah Nguyen",
"email": "sarah@example.com",
"subject": "Quote request",
"message": "Do you service commercial vans?"
}
The response is always a 200, even if something on our side went wrong,
because a problem of ours must never surface as a broken form on your site.
{ "ok": true, "id": "…", "deliver": true }
deliver: true means send it on as normal. false means we are
holding it for review. If you ever see "unchecked": true, we could not reach a
decision and you should treat the message as genuine.