SDKs & Examples
Use Supp from any language. The API is standard REST. Here are common patterns.
Node.js / TypeScript
const response = await fetch("https://api.supp.support/api/widget", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
api_key: "sk_live_your_key",
message: userMessage,
session_id: sessionId, // optional: for follow-ups
customer_email: user.email, // optional: for context
}),
});
const data = await response.json();
// data.intent → "password_reset"
// data.confidence → 0.94
// data.response → "I'll send you a reset link."
// data.recommended → true (safe to auto-serve)Python
import requests
resp = requests.post("https://api.supp.support/api/widget", json={
"api_key": "sk_live_your_key",
"message": user_message,
})
data = resp.json()
print(f"Intent: {data['intent']} ({data['confidence']:.0%})")React Widget (Custom UI)
If you want full control over the UI instead of the drop-in widget:
function SupportChat({ apiKey }: { apiKey: string }) {
const [messages, setMessages] = useState<string[]>([]);
const [sessionId, setSessionId] = useState<string>();
async function send(text: string) {
const res = await fetch("/api/widget", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
api_key: apiKey,
message: text,
session_id: sessionId,
}),
});
const data = await res.json();
setSessionId(data.session_id);
if (data.response) setMessages(m => [...m, data.response]);
}
return /* your custom chat UI */;
}Supported Integrations
Connect these tools from your Dashboard → Integrations page: