Comprehensive documentation, code examples, and integration guides to help you get started quickly.
Quick setup guide to get you up and running in minutes
Connect SamparkAI with your existing tools and platforms
Complete API documentation with examples and best practices
Official SDKs for popular programming languages
Get up and running with SamparkAI in just a few minutes
// Install the SamparkAI SDK
npm install @samparkai/client
// Initialize the client
import { SamparkAI } from '@samparkai/client';
const client = new SamparkAI({
apiKey: process.env.SAMPARK_API_KEY,
});
// Send a message
const response = await client.messages.create({
channel: 'email',
to: 'customer@example.com',
subject: 'Your Support Request',
body: 'Thank you for reaching out!',
});// Fetch conversations
const conversations = await client.conversations.list({
status: 'open',
limit: 20,
sortBy: 'created_at',
});
// Get AI suggestions
const suggestions = await client.ai.getSuggestions({
conversationId: 'conv_123',
context: 'customer_inquiry',
});
// Analyze sentiment
const sentiment = await client.ai.analyzeSentiment({
text: 'I am very happy with the service!',
});// Webhook endpoint example (Express.js)
app.post('/webhooks/samparkai', async (req, res) => {
const { event, data } = req.body;
switch (event) {
case 'message.received':
await handleNewMessage(data);
break;
case 'conversation.closed':
await handleClosedConversation(data);
break;
}
res.json({ success: true });
});Our developer support team is here to assist you