S
Samva
S
Samva
DashboardAPISamva DocumentationQuickstart GuideAuthentication

SDKs & ToolsTypeScript SDKREST APIPostman Collection
SDKs & Tools

SDKs & Tools

Official SDKs and developer tools for Samva API

Samva provides official SDKs and tools to make integration quick and easy.

OpenAPI-First: All SDKs are auto-generated from our OpenAPI specification for consistency.

Official SDKs

TypeScript/JavaScript

Full-featured TypeScript SDK with type safety

Python

Python SDK (Coming Soon)

Go

Go SDK (Coming Soon)

Java

Java SDK (Coming Soon)

Developer Tools

REST API

Direct REST API integration guide

Postman Collection

Import our Postman collection

OpenAPI Spec

Download OpenAPI 3.0 specification

CLI Tool

Command-line interface (Coming Soon)

Quick Installation

TypeScript/JavaScript

# npm
npm install @samva/sdk

# yarn
yarn add @samva/sdk

# bun
bun add @samva/sdk

Python (Coming Soon)

pip install samva

Go (Coming Soon)

go get github.com/samva/samva-go

Quick Start Example

import { SamvaClient } from '@samva/sdk';

const client = new SamvaClient({
  apiKey: process.env.SAMVA_API_KEY
});

// Send email
await client.messages.send({
  channel: 'email',
  to: 'user@example.com',
  content: {
    subject: 'Welcome to Samva',
    html: '<h1>Welcome!</h1><p>Thanks for joining.</p>',
    from: 'noreply@yourdomain.com'
  }
});

// Get email threads
const threads = await client.email.threads.list({
  limit: 10
});

Features

Type Safety

All SDKs provide full type safety with auto-completion:

// TypeScript knows all available options
const message = await client.messages.send({
  channel: 'email',  // Fully typed channel options
  // IDE shows all required and optional fields
  to: 'user@example.com',
  content: {
    subject: string,  // Type hints
    html: string,
    // ...
  }
});

Error Handling

Consistent error handling across all SDKs:

try {
  await client.messages.send({...});
} catch (error) {
  if (error.code === 'INSUFFICIENT_CREDITS') {
    // Handle specific error
  }
}

Retry Logic

Automatic retry with exponential backoff:

const client = new SamvaClient({
  apiKey: 'your_key',
  maxRetries: 3,
  retryDelay: 1000
});

Webhook Verification

Built-in webhook signature verification:

const isValid = client.webhooks.verifySignature(
  payload,
  signature,
  secret
);

SDK Generation

Our SDKs are generated from the OpenAPI specification using:

  • TypeScript: @hey-api/openapi-ts
  • Python: openapi-generator
  • Go: oapi-codegen
  • Java: openapi-generator

This ensures:

  • ✅ Consistency across languages
  • ✅ Always up-to-date with API
  • ✅ Complete API coverage
  • ✅ Type safety where supported

Community SDKs

Building an SDK? Let us know at sdk@samva.app

Testing

All SDKs support test mode:

const client = new SamvaClient({
  apiKey: 'sk_test_your_test_key',
  testMode: true  // Optional, auto-detected from key
});

// Test mode features:
// - No charges
// - Simulated delivery
// - Test phone numbers
// - Webhook testing

Support Matrix

SDKStatusVersionMin Runtime
TypeScript✅ Stable1.0.0Node 18+
Python🚧 Development-Python 3.8+
Go📋 Planned-Go 1.19+
Java📋 Planned-Java 11+
PHP📋 Planned-PHP 8.0+
Ruby📋 Planned-Ruby 3.0+

Contributing

Want to contribute to our SDKs?

  1. Check our GitHub
  2. Read contribution guidelines
  3. Submit pull requests
  4. Report issues

Next Steps

TypeScript SDK

Get started with TypeScript

REST API Guide

Direct API integration

Quickstart

Send your first email

OpenAPI Specification

Complete OpenAPI 3.0 specification for the Samva API

TypeScript SDK

Official TypeScript/JavaScript SDK for Samva API

On this page

Official SDKsDeveloper ToolsQuick InstallationTypeScript/JavaScriptPython (Coming Soon)Go (Coming Soon)Quick Start ExampleFeaturesType SafetyError HandlingRetry LogicWebhook VerificationSDK GenerationCommunity SDKsTestingSupport MatrixContributingNext Steps