aslio.

Go email API

Send email from Go in one HTTP call.

No SDK to install and no mail server to run. Aslio is a plain REST endpoint, so net/http from the standard library is all you need — no module to go get and no vendor package in your go.sum. You pay ₹0.02 a message — about $0.21 per 1,000 emails, with no monthly platform fee, no per-seat charge and no minimum commitment.

In short

To send transactional email from Go, POST to `https://aslio.asli.one/v1/email/send` with an Authorization: Bearer API key and a JSON body containing from, to, subject and html. Aslio charges ₹0.02 a message — about $0.21 per 1,000 — with no monthly fee. Add an Idempotency-Key header and the request is safe to retry.

Facts and prices last checked .

$0.21
per 1,000 emails
₹0
monthly platform fee
0
seats to buy
587
SMTP relay, same price

Code

Sending one email from Go

Standard library only: net/http and encoding/json. Nothing to add to go.mod. The from address must be on a domain you have verified, so the message is signed with your own DKIM rather than a shared pool.

Goaslio.asli.one/v1
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
	"time"
)

func sendInvoiceEmail(invoiceID string) error {
	body, _ := json.Marshal(map[string]any{
		"from":              "Acme <billing@acme.com>",
		"to":                []string{"customer@example.com"},
		"subject":           "Your invoice is ready",
		"html":              "<p>Hello — your invoice is attached.</p>",
		"statusCallbackUrl": "https://acme.com/hooks/aslio",
	})

	req, _ := http.NewRequest("POST", "https://aslio.asli.one/v1/email/send", bytes.NewReader(body))
	req.Header.Set("Authorization", "Bearer "+os.Getenv("ASLIO_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	// Safe to retry: a duplicate replays the original response.
	req.Header.Set("Idempotency-Key", "invoice-"+invoiceID)

	client := &http.Client{Timeout: 10 * time.Second}
	res, err := client.Do(req)
	if err != nil {
		return err
	}
	defer res.Body.Close()
	if res.StatusCode >= 300 {
		return fmt.Errorf("aslio: %s", res.Status)
	}
	return nil
}

Code

Receiving delivery events with net/http

Aslio posts SENT, DELIVERED, BOUNCED, COMPLAINED and FAILED events to your statusCallbackUrl. Read the whole body before you parse it, because the signature covers the exact bytes. Standard library only.

Goaslio.asli.one/v1
package main

import (
	"crypto/hmac"
	"crypto/sha256"
	"encoding/hex"
	"encoding/json"
	"io"
	"math"
	"net/http"
	"os"
	"strconv"
	"time"
)

func aslioHook(w http.ResponseWriter, r *http.Request) {
	raw, err := io.ReadAll(http.MaxBytesReader(w, r.Body, 1<<20))
	if err != nil {
		http.Error(w, "bad body", http.StatusBadRequest)
		return
	}

	timestamp := r.Header.Get("X-Aslio-Timestamp")
	mac := hmac.New(sha256.New, []byte(os.Getenv("ASLIO_WEBHOOK_SECRET")))
	mac.Write([]byte(timestamp + "."))
	mac.Write(raw)
	expected := hex.EncodeToString(mac.Sum(nil))

	// The timestamp is in milliseconds. Refuse anything older than five minutes.
	ms, err := strconv.ParseInt(timestamp, 10, 64)
	tooOld := err != nil || math.Abs(float64(time.Now().UnixMilli()-ms)) > 300000

	if tooOld || !hmac.Equal([]byte(expected), []byte(r.Header.Get("X-Aslio-Signature"))) {
		w.WriteHeader(http.StatusUnauthorized)
		return
	}

	var event map[string]any
	if err := json.Unmarshal(raw, &event); err != nil {
		http.Error(w, "bad json", http.StatusBadRequest)
		return
	}
	if event["status"] == "BOUNCED" {
		markAddressBad(event["toAddress"].(string))
	}
	w.WriteHeader(http.StatusOK)
}

Code

Sending to a list

The same key and the same wallet. Merge variables are per recipient.

HTTPaslio.asli.one/v1
POST /v1/email/send-batch
{
  "from": "Acme <news@acme.com>",
  "subject": "Hi {{firstName}}, your invoice is due",
  "html": "<p>Hi {{firstName}} — {{plan}}</p>",
  "recipients": [
    { "email": "priya@example.com",
      "variables": { "firstName": "Priya", "plan": "Pro" } }
  ]
}

// Up to 1,000 recipients per call. Each gets its own message
// row, its own charge and its own unsubscribe link. Suppressed
// addresses are skipped and reported, never silently dropped.

What you get

Common problems when sending from Go

What usually goes wrong in this language, and what to do about it.

http.DefaultClient has no timeout

Use your own http.Client with a Timeout, as in the example above. A hung request otherwise leaks its goroutine.

Connections that are never reused

Always close the response body, and read it to the end, so Go can return the connection to its pool.

Cancelling with the request

Build the call with http.NewRequestWithContext so a cancelled parent context also stops the send.

Sending to many people with goroutines

Use POST /v1/email/send-batch instead of a loop of goroutines. It keeps you clear of the per-account rate limit and handles up to 1,000 recipients in one call.

Honestly

Before you pick this

  • We hold no SOC 2 report and no ISO 27001 certification. If your procurement requires one, we will not pass it today and would rather say so now.
  • SMS and WhatsApp are still in build. Email is the channel that ships today. Do not pick Aslio this week for a multi-channel launch next week.
  • Support runs 09:30–18:30 IST (UTC+5:30). That overlaps European and Gulf afternoons and the edges of the North American day. There is no 24/7 desk.
  • We are a young, small company — Asli One Global was incorporated in February 2026. That is a legitimate thing to weigh for a critical dependency.

FAQ

Frequently asked questions

How do I send an email from Go?

POST to https://aslio.asli.one/v1/email/send with an Authorization: Bearer header carrying your API key, and a JSON body of from, to, subject and html. Standard library only: net/http and encoding/json. Nothing to add to go.mod. The full example is above.

Do I need to install a package?

No. Aslio is a plain REST API, so net/http from the standard library is all you need — no module to go get and no vendor package in your go.sum. There is no SDK to keep up to date and no dependency to audit.

Can I use net/smtp or another Go mail package?

Yes. Connect to aslio.asli.one:587, upgrade with STARTTLS, and authenticate with any username and your API key as the password.

What is the rate limit?

20 requests a second on the free plan and 100 on Pro. Beyond that the API returns 429, so back off and retry with the same Idempotency-Key.

How much does it cost?

₹0.02 per email, which is roughly $0.21 per 1,000 messages, with no monthly platform fee, no per-seat charge and no minimum commitment. You top up a prepaid wallet and spend it down. An optional Pro plan at ₹999 a month raises the API rate limit to 100 requests a second and adds priority support.

Send your first Go email in ten minutes.

Top up a wallet and send. No monthly platform fee, no seat charge, no minimum commitment — a hundred test emails costs about two rupees.

Asli One Global Private Limited · CIN U62011TN2026PTC190105