Go SDK
Install and use the MisarReach Go SDK — lead finder, SSE job streaming, deals/pipeline CRM, channels, autopilot, and the sales agent.
Official Go SDK for the MisarReach developer API — lead finder (23 sources), multi-channel outreach, deals/pipeline CRM, autopilot, and the AI sales agent. Covers all 84 operations across the 63 reach paths.
Install
go get github.com/misaradmin/misar-reach-go/misarreachConfigure
Authenticate with a reach developer key (mrk_…) against https://api.misar.io/reach/api.
c := misarreach.New("mrk_your_key") // misarreach.New(key, misarreach.WithMaxRetries(5))
ctx := context.Background()Lead search + SSE stream
res, err := c.Leads.Search(ctx, &misarreach.SearchLeadsRequest{
Query: "SaaS founders in Berlin", UseAI: true,
})
if err != nil { panic(err) }
jobID, _ := res["jobId"].(string)
stream, err := c.Leads.StreamJob(ctx, jobID)
if err != nil { panic(err) }
defer stream.Close()
for e := range stream.Events() {
fmt.Println(e.Event, e.Data) // progress … then complete / error
}
if err := stream.Err(); err != nil { panic(err) }Deals & pipeline
deal, _ := c.Deals.Create(ctx, &misarreach.CreateDealRequest{LeadEmail: "cto@acme.com", Value: 5000})
c.Pipeline.Move(ctx, map[string]any{"dealId": deal["id"], "stage": "interested"})Channels
c.Channels.Status(ctx)
c.Channels.Connect(ctx, "whatsapp", map[string]any{"phoneNumberId": "…", "accessToken": "…"})Resources
c.Leads · c.Deals · c.Pipeline · c.Channels · c.Autopilot · c.SalesAgent · c.Campaigns · c.Contacts · c.Conversations · c.Settings · c.Workspaces · c.Ads.
- GET/list methods take
misarreach.Params(map[string]string). - POST/PATCH/PUT methods take a typed request struct (
SearchLeadsRequest,CreateDealRequest, …) or amap[string]any. - Every method returns
misarreach.Response(map[string]interface{}).
Errors
Non-2xx responses return an *APIError (Status, Message, Code, RetryAfter) with helpers IsAuth(), IsNotFound(), IsRateLimit(). Transport failures return a *NetworkError. 429/5xx are retried with exponential backoff (configurable via WithMaxRetries).
See the API Reference and SSE stream.