Skip to content
Misar.io
SDK Guide

Misar SDK Guide

Official client libraries, CLI tools, and integration SDKs for every Misar product — across 13 languages and frameworks.

TypeScriptJavaScriptPythonGoPHPRubyKotlinJavaSwiftC#Dart / FlutterRustCLI
Installation

Installation

Install the Misar SDK for your language or framework of choice. All SDKs share a consistent API design.

TypeScript / JS

npm install @misar/sdk

Python

pip install misar-sdk

Go

go get github.com/misar-ai/sdk-go

PHP

composer require misar/sdk

Ruby

gem install misar-sdk

Rust

cargo add misar-sdk

Kotlin / Java

implementation("io.misar:sdk:1.0.0")

Swift (SPM)

url: "https://git.misar.io/misaradmin/sdk-swift"

C# (.NET)

dotnet add package Misar.Sdk

Dart / Flutter

dart pub add misar_mail

CLI

npm install -g @misar/cli

Requires: Node.js 18+, Python 3.9+, Go 1.21+, JDK 17+, Swift 5.9+, .NET 8+, Dart 3.0+. Contact us if your runtime is not listed.

Quick Start

Quick Start

Get up and running in minutes. Initialize the SDK with your API key and make your first call.

1

Set your API key

# .env
MISARMAIL_API_KEY=msk_your_api_key_here
2

Initialize the client (TypeScript)

import { MisarMailClient } from "@misar/sdk";

const mail = new MisarMailClient(process.env.MISARMAIL_API_KEY!);
3

Make your first API call

const result = await mail.sendEmail({
  to: "[email protected]",
  from: "[email protected]",
  subject: "Hello from Misar Mail",
  html: "<p>Your first email via SDK.</p>",
});
console.log(result.id); // msg_abc123

Browse by Product

Select a product to explore its SDK documentation.

MisarMail

Live

Full-featured email marketing and transactional email platform. Campaign builder, automation workflows, contact segmentation, inbox management, and deep analytics — all self-hosted.

TypeScriptPythonPHPRubyGoKotlinJavaSwiftC#Dart / Flutter

Misar.Blog

Live

Modern blogging platform built for SEO and growth. Clean writing experience, multi-author support, newsletter integration, built-in analytics, and fully self-hostable.

TypeScriptPythonPHPRubyGoKotlinJavaSwiftC#DartRust

MisarReach

Live

Multi-channel lead generation and outreach platform. Find contacts, build sequences, and automate follow-ups — all in one privacy-first workspace.

TypeScriptPython

Misar.Dev

Live

AI-powered code generation and full-stack development platform for developers. Monaco editor, live preview, Forgejo integration, and one-click deploy — build production apps faster.

TypeScriptCLIKotlinJavaSwiftC#

MisarPost

Launching

Publish and schedule content to every major social network from one dashboard — X/Twitter, LinkedIn, Instagram, Facebook, Threads, YouTube, TikTok. Built for creators and teams who want reach without juggling tabs.

TypeScriptPython

Misar.Ink

Coming Soon

A beautiful long-form writing platform for creators and thought leaders. Distraction-free editor, AI writing assistance, and one-click publishing to your audience.

Misar.ai

Coming Soon

The flagship Misar AI platform. Chat with state-of-the-art models, build AI agents, and automate workflows — all in one sovereign, privacy-first workspace.

TypeScriptPythonKotlinSwift
Examples

Code Examples

Ready-to-use snippets across all supported languages and frameworks.

Send email — TypeScript

TypeScript
import { MisarMailClient } from "@misar/sdk";

const mail = new MisarMailClient(process.env.MISARMAIL_API_KEY!);

const result = await mail.sendEmail({
  to: "[email protected]",
  from: "[email protected]",
  subject: "Welcome!",
  html: "<p>Thanks for signing up.</p>",
});
console.log(result.id);

Send email — Kotlin

Kotlin
import io.misar.mail.MisarMailClient

val client = MisarMailClient(apiKey = System.getenv("MISARMAIL_API_KEY"))

val response = client.sendEmail(
    to = "[email protected]",
    from = "[email protected]",
    subject = "Welcome!",
    html = "<p>Thanks for signing up.</p>"
)
println(response.id)

Send email — Swift

Swift
import MisarMail

let client = MisarMailClient(apiKey: ProcessInfo.processInfo.environment["MISARMAIL_API_KEY"]!)

let response = try await client.sendEmail(
    to: "[email protected]",
    from: "[email protected]",
    subject: "Welcome!",
    html: "<p>Thanks for signing up.</p>"
)
print(response.id)

Send email — C#

C#
using MisarMail;

var client = new MisarMailClient(
    apiKey: Environment.GetEnvironmentVariable("MISARMAIL_API_KEY")!
);

var result = await client.SendEmailAsync(new {
    to = "[email protected]",
    from = "[email protected]",
    subject = "Welcome!",
    html = "<p>Thanks for signing up.</p>"
});
Console.WriteLine(result);

Send email — Java

Java
import io.misar.mail.MisarMailClient;

MisarMailClient client = new MisarMailClient.Builder(
    System.getenv("MISARMAIL_API_KEY")
).build();

Map<String, Object> payload = Map.of(
    "to", "[email protected]",
    "from", "[email protected]",
    "subject", "Welcome!",
    "html", "<p>Thanks for signing up.</p>"
);
var result = client.sendEmail(payload);

Send email — Dart / Flutter

Dart
import 'package:misar_mail/misar_mail.dart';

final client = MisarMailClient(
  Platform.environment['MISARMAIL_API_KEY']!,
);

final result = await client.sendEmail({
  'to': '[email protected]',
  'from': '[email protected]',
  'subject': 'Welcome!',
  'html': '<p>Thanks for signing up.</p>',
});
print(result['id']);

Missing your language or framework?

We support 13 languages today. Let us know what you need and we'll prioritize it.