SDKs & Examples

Use Supp from any language. The API is standard REST. Here are common patterns.

Node.js / TypeScript

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

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:

tsx
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:

Slack
Discord
Microsoft Teams
GitHub
Linear
Jira
Notion
Zendesk
Intercom
HubSpot
Shopify
Zapier
Email / Resend
Custom Webhook