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
ASSISTERS_API_KEY=ask_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.

Misar.AI

Coming Soon

Client SDKs for AI-powered app and web development.

TypeScriptPythonKotlinSwift

Assisters.io

Launching

SDKs and client libraries for AI assistant integration.

TypeScriptPythonKotlinSwiftC#Java

Misar Mail

Live

SDKs for transactional and marketing email delivery.

TypeScriptPythonPHPRubyGoKotlinJavaSwiftC#Dart / Flutter

Misar Dev

Live

CLI tools, SDKs, and plugins for AI developer workflows.

TypeScriptCLIKotlinJavaSwiftC#

Misar Blog

Coming Soon

Headless CMS SDK for AI-first content and publishing.

TypeScriptPython

Misar Tools

Live

Embeddable SDK for AI calculators and developer tools.

TypeScriptJavaScript
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);

Chat completion — Kotlin

Kotlin
import io.misar.assisters.AssistersClient

val client = AssistersClient(apiKey = System.getenv("ASSISTERS_API_KEY"))

val response = client.chatCompletionsCreate(
    model = "assisters-chat-v1",
    messages = listOf(
        mapOf("role" to "user", "content" to "Hello!")
    )
)
println(response["choices"])

Chat completion — Swift

Swift
import Assisters

let client = AssistersClient(apiKey: ProcessInfo.processInfo.environment["ASSISTERS_API_KEY"]!)

let response = try await client.chatCompletionsCreate(
    model: "assisters-chat-v1",
    messages: [["role": "user", "content": "Hello!"]]
)
print(response)

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.