MisarMisar Docs
MisarMailMisarBlogMisarReachMisarPostMisarDevMisarCoderMisarSEOMisar PlatformMisar SSO
SDKs

Kotlin SDK

Install and use the coroutine-based MisarReach Kotlin SDK — lead finder, SSE job streaming as a Flow, deals/pipeline CRM, channels, and more.

Official Kotlin client for the MisarReach developer API (https://api.misar.io/reach/api), built on coroutines. Full coverage of Lead Finder, deals & pipeline, multi-channel outreach, autopilot, sales agent, campaigns, contacts, conversations, workspaces, settings, and ads — with the SSE lead-job stream exposed as a Flow. Requires JVM 17+.

Install (Gradle)

dependencies {
    implementation("io.misar:misarreach-kotlin:1.0.0")
}

Configure

Authenticate with an mrk_ bearer key. Suspend methods take and return Map<String, Any>.

import io.misar.reach.MisarReachClient

val client = MisarReachClient(apiKey = "mrk_...", maxRetries = 5)

Lead search + SSE stream

import kotlinx.coroutines.flow.collect

val job = client.leads.search(mapOf("query" to "SaaS founders", "useAI" to true))
val jobId = job["jobId"] as String

// Stream job progress over Server-Sent Events
client.leads.stream(jobId).collect { event ->
    println("progress: ${event["progress"]}")   // progress … then complete / error
}

Deals & channels

client.deals.create(mapOf("leadEmail" to "cto@acme.com", "value" to 5000))
val status = client.channels.status()

Resources

leads · deals · pipeline · channels · autopilot · salesAgent · campaigns · contacts · conversations · workspaces · settings · ads.

Requests retry idempotently on 429/500/502/503/504 with exponential backoff.

Errors

Non-2xx responses throw MisarReachException (status property; message extracted from the standard { "error": { "message" } } envelope); network/retry-exhaustion failures throw MisarReachNetworkException (status 0).

See the API Reference and SSE stream.