Sendly
Start free
Developer Docs

Email API

Send transactional email programmatically from your own verified domain using your Sendly account. Authenticate with an API key; messages are queued and delivered asynchronously.

Overview

Base URLhttps://app.sendly.ge/api/v1
AuthAuthorization: Bearer sk_live_…
Content-Typeapplication/json

Getting started

Before your first API call, complete the onboarding flow in the dashboard. Each step unlocks the next:

  1. Create a Sendly account — register and sign in.
  2. Activate the Email module — open Email and activate a plan (start on the trial, or pick Growth / Business, or buy Credits). Sending is gated by your plan's quota; without an active plan the API returns 402.
  3. Add & verify your sending domain — under Email → Domains, add your domain and publish the DNS records (SPF, DKIM, DMARC) at your registrar. You can only send from a verified domain.
  4. Create an API key — under Email → API Keys, create a sk_live_… key. It's shown once — store it securely.
  5. Send — call POST /api/v1/email/send with your key.

In short: register → activate an Email plan → verify a domain → create a key → send.

What you need in place

RequirementWhere it comes fromPurpose
Active subscription Dashboard → Email (activate a plan, or trial) Email sending is gated by plan quota. Without it, sends return 402.
Verified sending domain Dashboard → Email → Domains → Add Domain The domain in your from address must be verified. Unverified domains are rejected with 403.
sk_live_… API key Dashboard → Email → API Keys → Create Key Authenticates your requests. Shown once at creation — store it securely.

Verify a domain

When you add a domain, Sendly generates the exact DNS records you must publish at your registrar and shows them in the dashboard. They cover three things — once they propagate, the domain status flips to verified and you can send from any address at that domain.

TypeNamePurpose
TXTyourdomain.comSPF — authorizes Sendly to send for your domain.
TXT_dmarc.yourdomain.comDMARC — sets your alignment/handling policy.
CNAME<token>._domainkey.yourdomain.comDKIM — signs your mail (3 records).

Copy each record's exact value from the dashboard when you add the domain.

It's the domain — not the full address — that must be verified. Once verified you can send from any local part at that domain (noreply@, support@, etc.). To revoke an API key, delete it on the API Keys page; requests using it immediately return 401.

Send an email

POST /api/v1/email/send

Body parameters

FieldTypeRequiredDescription
fromstring✅Sender address. The domain must be a verified domain on your account, e.g. noreply@yourdomain.com.
tostring✅Recipient email address.
subjectstring✅Subject line, 1–998 characters.
htmlstring✅HTML body of the message (1+ characters).
textstringoptionalPlain-text alternative for clients that don't render HTML.

Response — 202 Accepted

json
{
  "id": "clx9a8b7c6d5e4f3g2h1",
  "status": "queued"
}

id is the message ID — it correlates to a row in Email → Logs, where you can watch status transition queued → sent → delivered (or bounced, complained, failed).

Examples

curl

bash
curl -X POST https://app.sendly.ge/api/v1/email/send \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "noreply@yourdomain.com",
    "to": "customer@example.com",
    "subject": "Your verification code",
    "html": "<p>Your code is <strong>4821</strong></p>",
    "text": "Your code is 4821"
  }'

Node.js

javascript
const res = await fetch("https://app.sendly.ge/api/v1/email/send", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SENDLY_EMAIL_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    from: "noreply@yourdomain.com",
    to: "customer@example.com",
    subject: "Welcome to Sendly",
    html: "<h1>Hello</h1><p>Thanks for signing up.</p>",
  }),
});

if (!res.ok) {
  throw new Error(`Email send failed: ${res.status} ${await res.text()}`);
}
const { id, status } = await res.json();
console.log(`Message ${id} is ${status}`);

Python

python
import os, requests

res = requests.post(
    "https://app.sendly.ge/api/v1/email/send",
    headers={"Authorization": f"Bearer {os.environ['SENDLY_EMAIL_KEY']}"},
    json={
        "from": "noreply@yourdomain.com",
        "to": "customer@example.com",
        "subject": "Welcome to Sendly",
        "html": "<h1>Hello</h1><p>Thanks for signing up.</p>",
    },
    timeout=15,
)
res.raise_for_status()
print(res.json())

Errors

Errors return a non-2xx status with a JSON body.

StatusMeaningHow to fix
400Validation failed (missing html, from not an email, empty subject).Check the request body against the field table.
401Invalid API key format.Header must be Bearer sk_live_… (64 hex chars).
401Invalid or revoked API key.The key was revoked or is wrong. Create a new one.
402trial_expired / subscription_inactive — plan expired or inactive.Renew or activate a plan in Email.
402email_credits_exhausted: this month's emails and your top-up balance are used up.Buy more credits in Sendly, on the Plan and billing page.
403domain_not_verified — the from domain isn't verified.Verify the domain in Email → Domains.
429quota_exceeded — daily or monthly limit hit.Wait for the window to reset or upgrade your plan.

A 400 validation error includes details:

json
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Validation failed",
    "details": { "html": ["String must contain at least 1 character(s)"] }
  }
}

Delivery status

The send call is asynchronous — a 202 means the message was accepted and queued, not yet delivered. The message then moves through these states, updated from delivery events reported by the upstream provider.

StatusMeaning
queuedAccepted, awaiting dispatch.
sentHanded to the mail provider.
deliveredProvider confirmed delivery to the recipient's mailbox.
bouncedRecipient address rejected the message.
complainedRecipient marked the message as spam.
failedCould not be sent.

View statuses in Email → Logs, filterable by status, or fetch them programmatically with GET /api/v1/email/logs (dashboard session, not the sk_live_ key).

Notes

  • The from domain — not the full address — is what must be verified. Once a domain is verified you can send from any local part at that domain.
  • All API sends go to a single endpoint — POST /api/v1/email/send authenticated with your API key.
  • Prefer SMTP? Sendly also issues SMTP credentials (smtp.sendly.ge:587) on the Email → API Keys page for use with existing mail libraries. When your emails and credits run out, the SMTP server answers 452 Email credits used up, buy more in Sendly. It is a temporary error, so retry after a top-up.