API documentation

Everything in your dashboard, from your own code: connect domains, order mailboxes, manage DNS and forwarding, and download logins.

Getting started

Base URL: https://inbox.leadsixty.com/api/portal. Requests and replies are JSON, except the mailbox CSV.

Create a key in the dashboard under API (up to 10 keys, each shown once) and send it as a bearer token:

curl -H "Authorization: Bearer lsk_your_key" \
  https://inbox.leadsixty.com/api/portal/domains

Keys act as your account: they see your domains, orders and mailboxes and nobody else's. Revoke a key from the dashboard and it stops working at once. Keys cannot create or revoke other keys.

Access is by invitation. If you cannot sign in, contact us.

Domains

CallWhat it does
GET /domainsYour domains with status, progress, mailbox counts and any nameservers you still need to set
POST /domains/connectBring your own domains. Body {"domains": ["example.com"]} (up to 30). Returns added, skipped and nameservers
DELETE /domains/{domain}Remove a connected domain that has no mailboxes yet
GET /domains/search?q=nameNames you could buy: {"results": [{"domain", "price_pkr", "available"}]}
GET /pricingCurrent prices, mailboxes per domain, and whether buying domains is enabled for you

Each item in GET /domains has: domain, order_id, status (a readable label such as "Active"), mailboxes and mailboxes_total, ns (pending, matched, auto or null), nameservers (the nameservers to set at your registrar when ns is pending), renews_at, stage (0 to 5, the progress steps in your dashboard) and source (own or buy). When dns_edit is true you can use the DNS and forwarding calls on that domain.

curl -X POST -H "Authorization: Bearer lsk_your_key" -H "Content-Type: application/json" \
  -d '{"domains": ["example.com"]}' https://inbox.leadsixty.com/api/portal/domains/connect

Orders

CallWhat it does
POST /ordersOrder mailboxes. One order covers 1 to 30 domains, each with 99 mailboxes
POST /orders/{id}/paymentAttach the payment screenshot to an order placed without one
GET /ordersYour orders with payment status and domains

POST /orders

{
  "domains": [{"name": "example.com", "source": "own"}, {"name": "get-example.com", "source": "buy"}],
  "mailboxes": [{"name": "Pat Smith", "username": "pat"}, ...],
  "phone": "+923001234567",
  "payment_screenshot": "data:image/png;base64,...",
  "payment_tid": "optional transaction id"
}

source is own (a domain you already hold) or buy (we register it for you). mailboxes is the list of up to 99 sender names and usernames used on every domain in the order. payment_screenshot (a bank transfer screenshot as a data URL) and payment_tid are optional: without a screenshot the order waits for your payment, and you can send it later with POST /orders/{id}/payment. Reply: {"order_id", "monthly_pkr", "once_pkr", "total_pkr", "payment_received"}. The team confirms the payment before setup starts.

Mailboxes

CallWhat it does
GET /mailboxesYour active mailboxes: email, name, domain, status, renews_at
GET /mailboxes/credentials?email=One mailbox's login: {"email", "password"}
GET /mailboxes.csvAll logins as a CSV. Optional domain=example.com for one domain, and short=1 for just Email and Password

The full CSV has the columns Email, Password, First Name, Last Name, Domain, ready to import into your sending tool. Mailboxes appear here as soon as their domain has them ready.

curl -H "Authorization: Bearer lsk_your_key" \
  "https://inbox.leadsixty.com/api/portal/mailboxes.csv?domain=example.com" -o example.com.csv

DNS

Available for domains that are connected and paid for (dns_edit is true). Records that keep your mailboxes working (MX, SPF, DMARC, DKIM and mail setup records) are listed with "managed": true. They are ours to maintain, so they cannot be changed or removed here; message us if you need one changed.

CallWhat it does
GET /domains/{domain}/dnsAll records: id, host, type, value, ttl, priority, managed
POST /domains/{domain}/dnsAdd a record. Body {"type", "host", "value", "ttl"?, "priority"?}
PUT /domains/{domain}/dns/{id}Change a record (same body)
DELETE /domains/{domain}/dns/{id}Remove a record

type is one of A, AAAA, CNAME, TXT, MX, SRV, CAA. host is @ for the domain itself, a name such as www, or the full name. ttl is 60 to 86400 seconds.

Forwarding

Send visitors of a domain to your website.

CallWhat it does
GET /domains/{domain}/forwarding{"url"}. url is null when not forwarding
PUT /domains/{domain}/forwardingBody {"url": "https://example.com"}. The address is a site address with no page path
DELETE /domains/{domain}/forwardingStop forwarding

Sending tools

Tools like PlusVibe and Instantly ask for approval before they can connect mailboxes, and show "Need admin approval" until it is given. Ask us to approve the tool for a domain and connect your mailboxes once it is done. It takes a few minutes.

CallWhat it does
GET /consent/appsThe tools you can approve: {"apps": [{"app": "plusvibe", "label": "PlusVibe"}, ...]}
POST /domains/{domain}/consentBody {"app": "instantly"}, or {"client_id": "<Application (client) ID>"} for any other Microsoft app. Starts the approval for that domain, or returns the one already running
GET /domains/{domain}/consentStatus for every tool on the domain
POST /consentBody {"app": "plusvibe", "domains": ["a.com", "b.com"]} (or client_id instead of app). Several domains at once; each domain answers on its own: {"domains": {"a.com": {"ok": true, "status": "queued"}, "b.com": {"ok": false, "error": "..."}}}

status is queued, working, done or failed (or null if never asked). A failed approval is retried automatically a few times; if it still fails we are told and look into it, and you can ask again. Approval is available once the domain's mailboxes are ready (status Active or close to it).

Billing

CallWhat it does
GET /billingYour paid orders with the current monthly payment (renewal.amount_pkr, due_at, status, can_pay) and orders still waiting for a payment
POST /orders/{id}/renewalSend this month's payment screenshot. Body {"payment_screenshot": "data:image/png;base64,...", "payment_tid"?}

Webhooks

Instead of polling, give us a web address and we call it when mailboxes are ready. One address per account.

CallWhat it does
PUT /webhookBody {"url": "https://yourapp.com/hooks/mailboxes"}. Sets or changes the address (public https only). The first time, the reply includes your signing secret. It is shown once
GET /webhookThe current address and the events we send
POST /webhook/testSends a test event now and returns {"delivered", "status_code", "error"}
POST /webhook/secretMakes a new signing secret (the old one stops working)
GET /webhook/deliveriesThe last 25 events with their status and any error
POST /webhook/deliveries/{id}/retrySend one event again
DELETE /webhookStop sending

Events

EventWhen
domain.readyOne domain's mailboxes are ready
order.readyEvery domain in the order is ready
webhook.testYou asked for a test
POST https://yourapp.com/hooks/mailboxes
Content-Type: application/json
X-Webhook-Id: evt_3f9c1a...
X-Webhook-Event: order.ready
X-Webhook-Timestamp: 1767225600
X-Webhook-Signature: sha256=9b74c9897b...

{
  "id": "evt_3f9c1a...",
  "event": "order.ready",
  "created_at": 1767225600,
  "data": {
    "order_id": "LS-123456",
    "domains": ["example.com", "get-example.com"],
    "mailboxes": 198,
    "mailboxes_url": "https://inbox.leadsixty.com/api/portal/mailboxes.csv"
  }
}
The event never contains passwords. It tells you what is ready; fetch the logins from mailboxes_url with your API key.

Check the signature

Sign timestamp + "." + raw request body with your secret using HMAC-SHA256 and compare it to the header. Reject requests whose timestamp is more than 5 minutes old.

# Python
import hmac, hashlib, time

def valid(secret, headers, raw_body: bytes) -> bool:
    ts = headers["X-Webhook-Timestamp"]
    if abs(time.time() - int(ts)) > 300:
        return False
    want = "sha256=" + hmac.new(secret.encode(), ts.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(want, headers["X-Webhook-Signature"])
// Node
const crypto = require("crypto");
function valid(secret, headers, rawBody) {
  const ts = headers["x-webhook-timestamp"];
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
  const want = "sha256=" + crypto.createHmac("sha256", secret).update(ts + "." + rawBody).digest("hex");
  const got = headers["x-webhook-signature"];
  return want.length === got.length && crypto.timingSafeEqual(Buffer.from(want), Buffer.from(got));
}

Delivery

  • Answer with any 2xx within 10 seconds. Anything else counts as a failure.
  • Failures are retried 5 more times, after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours. After that the event stays in GET /webhook/deliveries as failed and you can retry it by hand.
  • The same event can arrive more than once. Use id to ignore repeats.
  • Events can arrive out of order after a retry. Do not rely on order; if in doubt, ask GET /orders/{order_id}.
  • We do not follow redirects, and we only call public https addresses.

Errors

Errors return an HTTP status and {"detail": "what to fix"}.

StatusMeaning
401Missing, wrong or revoked key
403The record is managed for you and cannot be changed
404No such domain, order, record or mailbox on your account
409Not possible right now, for example the domain is not connected yet or a name was just taken
422Something in the request needs fixing; the message says what
429Too many orders waiting for payment confirmation

Questions or something missing? Contact us.