Embed a SalesHose conversational lead-qualification form into any website with one line, and read its data over a public REST API.
SalesHose builds conversational, one-question-at-a-time forms that score, route, and book your leads. This repo is the public developer reference. Live, always-current docs: https://saleshose.com/docs.
- 🔌 Embed:
embed.js— inline, popup, or floating chat bubble - 🧩 Works in: WordPress, Shopify, HubSpot, Webflow, React, or plain HTML
- 🔓 Public REST API (no key): get a form, submit a response, track events
- 🤖 Machine-readable:
llms.txt·openapi.json
Every form has a slug (e.g. demo). Drop these two lines where the form should appear:
<div data-saleshose="demo"></div>
<script src="https://saleshose.com/embed.js" async></script>The form loads in a sandboxed <iframe>, so it never clashes with your site's CSS or JS. Replace demo with your form's slug (visible in the builder, or in the URL saleshose.com/f/your-slug).
<div data-saleshose="demo" data-height="600"></div>
<script src="https://saleshose.com/embed.js" async></script><div data-saleshose="demo" data-mode="popup" data-label="Talk to sales"></div>
<script src="https://saleshose.com/embed.js" async></script><script src="https://saleshose.com/embed.js" data-saleshose="demo" data-mode="bubble" data-label="💬 Chat" async></script>| Attribute | Where | Values |
|---|---|---|
data-saleshose |
div or script | your form slug (required) |
data-mode |
div or script | inline (div default) · popup · bubble (script default) |
data-label |
div or script | button / bubble text |
data-height |
div (inline) | pixels, default 560 |
| Platform | How |
|---|---|
| WordPress | Add a Custom HTML block and paste the snippet (Classic editor: Text tab). |
| Shopify | Add a Custom Liquid section or an HTML block and paste the snippet. |
| HubSpot | Drag an Embed / Rich text → Source code module and paste the snippet. |
| Webflow | Drop an Embed element and paste the snippet. |
| Framer / Wix / Squarespace | Use the platform's Embed / Custom Code block. |
| Plain HTML / any site | Paste anywhere in your HTML. |
import { useEffect } from "react";
export default function SalesHoseForm({ slug }) {
useEffect(() => {
const s = document.createElement("script");
s.src = "https://saleshose.com/embed.js";
s.async = true;
document.body.appendChild(s);
return () => { s.remove(); };
}, []);
return <div data-saleshose={slug} />;
}SalesHose.open("demo"); // open in a modal
SalesHose.render({ slug: "demo", target: "#lead-form", mode: "inline" });
SalesHose.render({ slug: "demo", mode: "bubble", label: "Need a quote?" });
SalesHose.close();On submit, the embed posts a message to the host page:
window.addEventListener("message", (e) => {
if (e.data && e.data.type === "saleshose:submitted") {
console.log("Lead captured for", e.data.slug, "score", e.data.score);
}
});No key required. Base URL https://saleshose.com.
GET /api/forms/{slug}
200 → { "slug": "demo", "title": "…", "config": { "blocks": [...], "theme": {...} } }
Answers are keyed by each block's name. Returns the lead score and the resolved ending (including any round-robin–assigned rep and booking link).
POST /api/forms/{slug}/responses
Content-Type: application/json
{
"data": { "name": "Jane", "email": "jane@acme.com", "budget": "€20k+" },
"completed": true,
"meta": { "utm_source": "google" }
}
200 → {
"ok": true,
"id": "…",
"score": 105,
"ending": { "title": "…", "book": { "url": "https://cal.com/rep/intro" }, "rep": "Alice" }
}
Partial capture: pass a stable
"id"with"completed": false, then re-POST the sameidwith"completed": trueto finish.
POST /api/forms/{slug}/events
{ "kind": "view" | "start" | "complete", "session": "…" }
Point your AI coding tool (Cursor, v0, Lovable, Claude, Copilot…) at:
- https://saleshose.com/llms.txt — product + endpoint summary
- https://saleshose.com/openapi.json — OpenAPI 3 spec
Or paste this prompt:
Add a SalesHose conversational lead form to my site.
Embed it with:
<div data-saleshose="MY_SLUG"></div>
<script src="https://saleshose.com/embed.js" async></script>
Modes: data-mode="inline|popup|bubble". JS API: SalesHose.open(slug),
SalesHose.render({slug,target,mode,label}). It loads in an iframe.
Full docs: https://saleshose.com/docs
SalesHose is a product by Dutchcode B.V. · Support: support@dutchcode.com