Developer / Widget
import { Aside } from ‘@astrojs/starlight/components’;
Create an App
Section titled “Create an App”- Name your app
- Select a ticket category (for widget conversations)
- Add allowed origins (domains where widget can run)
- Get your API Key
Widget Embed
Section titled “Widget Embed”HTML (any website)
Section titled “HTML (any website)”<script src="https://widget.procord.app/v1/widget.js"></script><script> Procord.init({ apiKey: 'YOUR_API_KEY', position: 'bottom-right', theme: 'auto' });</script>React / Next.js
Section titled “React / Next.js”"use client";import { useEffect } from "react";
export function SupportWidget() { useEffect(() => { const script = document.createElement("script"); script.src = "https://widget.procord.app/v1/widget.js"; script.async = true; script.onload = () => { window.Procord?.init({ apiKey: 'YOUR_API_KEY', position: 'bottom-right', theme: 'auto' }); }; document.body.appendChild(script); return () => window.Procord?.destroy?.(); }, []); return null;}Widget Options
Section titled “Widget Options”| Option | Values | Description |
|---|---|---|
apiKey | string | Your app API key (required) |
position | bottom-right, bottom-left, top-right, top-left | Widget position |
theme | auto, light, dark | Color scheme |
stylePreset | classic, minimal, bold, shadow, grey | Visual style |
includePaths | ["/support", "/help/*"] | Show only on these paths |
excludePaths | ["/login", "/admin/*"] | Hide on these paths |
Security
Section titled “Security”- Allowed Origins: Widget only works on domains you whitelist
- API Key: Keep it private, regenerate if compromised
Rate Limits
Section titled “Rate Limits”| Type | Limit |
|---|---|
| Read | 60/min |
| Write | 30/min |