Siftr LogoSiftr API Docs
SDK

SDK Basics

Usage of the LeadFinder SDK

Overview

The SDK provides a complete UI component that can be embedded anywhere on your page.

Quick Start

Installation

The SDK is available via CDN and can be included in your HTML page:

index.html
<body>
	<div id="leadfinder-container"></div>
	<script>
		// Configure SDK before loading
		window.SIFTR_CONFIG = {
			apiKey: 'your-api-key-here',
			onLoad: (sdk) => {
				// SDK is loaded, attach it to your container
				const container = document.getElementById('leadfinder-container');
				sdk.attach(container);
			},
		};
	</script>
	<script type="module" src="https://sdk-staging.siftr.net/sco-sdk.js"></script>
</body>

Configuration Options

The SDK can be configured through the window.SIFTR_CONFIG object:

OptionTypeRequiredDescription
apiKeystringYesYour API key for authentication
onLoadfunctionYesCallback function called when SDK is loaded

API Key

To use the SDK, you'll need an API key. You can obtain one by:

  1. Logging into your account
  2. Navigating to API Keys section
  3. Creating a new API key for your application

Interactive Example

Try out the SDK in this live example:

SDK Integration Flow

Understanding how the SDK integrates with your enterprise system is crucial for successful implementation. Below are two diagrams showing the integration flow:

Best Practices

  1. Always validate your API key before deploying to production
  2. Handle loading states while the SDK initializes
  3. Implement error boundaries to gracefully handle SDK errors
  4. Keep your Private API key secure - never expose it in client-side code in production

Troubleshooting

Common Issues

SDK not loading:

  • Verify your API key is correct
  • Check browser console for error messages
  • Ensure the container element exists before calling attach()

Theming & Customization

Want to match your brand? Check out our comprehensive theming guide:

  • SDK Theming Documentation - Complete guide to customizing your SDK appearance
  • Learn how to use popular theme generators like shadcn/ui
  • Built-in presets for quick setup
  • Dynamic theme switching capabilities

Support

For additional help and support: