Samva
Samva
DashboardAPISamva DocumentationQuickstart GuideAuthentication

Quickstart Guide

Send your first email with Samva in 5 minutes

Get up and running with Samva's messaging platform in just a few minutes.

Prerequisites

Before you begin, make sure you have:

  • A Samva account (sign up at samva.app/signup)
  • Node.js 18+ installed (for TypeScript SDK)

Step 1: Get Your API Key

  1. Log in to your Samva Dashboard
  2. Navigate to Developers → API Keys
  3. Click Create API Key
  4. Copy your API key and keep it secure

Security Tip: Never commit API keys to version control. Use environment variables instead.

Step 2: Install the SDK

Choose your preferred method:

npm install samva

Step 3: Initialize the Client

import { createSamvaClient } from 'samva';

const samva = createSamvaClient({
  apiKey: process.env.SAMVA_API_KEY!
});

Step 4: Send Your First Email

// Send transactional email
const response = await samva.email.send({
  body: {
    to: 'user@example.com',
    subject: 'Welcome to Samva',
    htmlContent: '<h1>Welcome!</h1><p>Thanks for joining Samva.</p>',
    textContent: 'Welcome! Thanks for joining Samva.'
  }
});

console.log('Email sent:', response.data?.messageId);

Step 5: Check Message Status

// Get message status
const message = await samva.messages.get({
  path: { id: response.data?.messageId! }
});

console.log('Delivery status:', message.data?.status);
// Possible values: pending, processing, sent, delivered, failed

Using REST API

If you prefer using the REST API directly:

# Send email via REST API
curl -X POST https://samva.app/api/v1/email/send \
  -H "X-API-Key: sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "user@example.com",
    "subject": "Welcome to Samva",
    "htmlContent": "<h1>Welcome!</h1><p>Thanks for joining Samva.</p>",
    "textContent": "Welcome! Thanks for joining Samva."
  }'

Next Steps

API Reference

Explore all available endpoints

Authentication

Learn about API keys and security

Email Management

Manage email domains, senders, and templates

Webhooks

Set up real-time event notifications

Common Issues

Invalid Email Address

Error: Invalid email address format

Solution: Ensure the email address is properly formatted (e.g., user@example.com).

Domain Not Verified

Error: Sender domain not verified

Solution: Verify your sending domain in the dashboard under Email → Domains.

Insufficient Credits

Error: Insufficient credits in wallet

Solution: Top up your credits in the Billing Dashboard.

Support

Need help? We're here for you:

  • 📧 Email: support@samva.app
  • 📚 Full Documentation: samva.app/docs
  • 🐛 Report Issues: github.com/samva

Samva Documentation

Modern email infrastructure for developers

Authentication

Secure your API requests and manage user authentication

On this page

PrerequisitesStep 1: Get Your API KeyStep 2: Install the SDKStep 3: Initialize the ClientStep 4: Send Your First EmailStep 5: Check Message StatusUsing REST APINext StepsCommon IssuesInvalid Email AddressDomain Not VerifiedInsufficient CreditsSupport