Install widget
What you'll achieve: Add the SwiftCRM widget to any page with one script tag. Visitors can submit leads from a floating form or chat.
Step 1: Get your project API key
In the dashboard: open your project → Install. Create an API key if you don't have one. Add your site domain to Allowed domains.
Step 2: Add the snippet
Paste this before the closing </body> tag. Replace YOUR_PROJECT_API_KEY with your key.
<script
src="https://swiftcrm.in/widget/v1/widget.js"
data-key="YOUR_PROJECT_API_KEY"
data-position="right"
data-accent="#E53935"
data-mode="both"
data-title="Talk to us"
data-fields='[{"name":"name","label":"Name","required":true},{"name":"email","label":"Email","required":true}]'
></script>
What it looks like
A floating button appears on your site. Clicking it opens the form panel.
Desktop
yoursite.com
Mobile
Icon-only on small screens
Options (data attributes)
| Attribute | Default | Description |
|---|---|---|
| data-key | — | Required. Project API key. |
| data-position | right | "left" or "right" |
| data-accent | #E53935 | Button & header colour (any hex) |
| data-mode | both | "form", "chat", or "both" |
| data-title | Talk to us | Floating button label |
| data-fields | name + email | JSON array of fields. See Configure forms for custom fields, examples, and previews. |
Next: Configure forms & custom fields — see desktop/mobile previews, API payload, and dashboard view.