API reference

Account and billing

Read account usage, analytics, and key metadata with an API key; billing changes and key creation or revocation require a dashboard session.

GET/account
API key

Retrieve account, usage, billing state, and workspace counts with an API key

API-key equivalent of the dashboard profile: the account owner, current-period recipient and attachment usage against plan limits, access tier, sender reputation summary, subscription state, published plans, and workspace counts. Read-only; billing changes remain session-only.

Request
curl https://sendhq.cc/api/v1/account \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "user": {},
  "usage": {},
  "access": {},
  "reputation": {},
  "infrastructure": {},
  "billing": {},
  "plans": [],
  "workspace": {
    "mailer": "ses",
    "stats": {}
  }
}
GET/account/diagnostics
API key

Diagnose sending and receiving problems in the workspace

Read-only troubleshooting snapshot from stored state: an `issues` list in plain language, plan and usage against limits, each domain's DKIM and inbound state, sending identities, 30-day deliverability and sender reputation, suppressions and unsubscribes, the last 30 days of messages that were not sent with their reasons, bounce, complaint and reject events, and webhook delivery health. Never returns message bodies, API keys or webhook secrets.

Request
curl https://sendhq.cc/api/v1/account/diagnostics \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "generatedAt": "2026-10-30T12:00:00.000Z",
  "windowDays": 30,
  "issues": [
    {
      "severity": "action",
      "code": "domain_unverified",
      "message": "example.com is not verified (pending); 2 of 3 DKIM records are not visible in DNS yet."
    }
  ],
  "plan": {},
  "domains": [],
  "sendingIdentities": {
    "domains": [],
    "addresses": []
  },
  "inbound": {},
  "deliverability": {},
  "suppressions": {},
  "failures": {
    "notSent": [],
    "recentNotSent": [],
    "recentProviderEvents": []
  },
  "webhooks": []
}
GET/analytics
API key

Retrieve dashboard sending analytics for 7, 30, or 90 days

Sent, received, delivered, bounced, blocked, opened, clicked, and complaint totals for the window, a per-day sent/received timeline, the top sending domains, and the best-performing subjects.

Query parametersdays
Request
curl https://sendhq.cc/api/v1/analytics \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "window": "30d",
  "days": 30,
  "metrics": {
    "sent": 0,
    "received": 0,
    "bounced": 0,
    "blocked": 0,
    "delivered": 0,
    "opened": 0,
    "clicks": 0,
    "complaints": 0
  },
  "timeline": [],
  "domains": [],
  "topContent": []
}
GET/profile
Browser session

Retrieve account, usage, and stacked subscription state

Retrieve account, usage, and stacked subscription state

Request
curl https://sendhq.cc/api/v1/profile \
  -X GET \
  -H "Cookie: sendhq_session_v2=…"
200 Response
{
  "user": {},
  "usage": {},
  "access": {},
  "reputation": {},
  "billing": {},
  "plans": []
}
POST/billing/checkout
Browser session

Start a hosted checkout for a plan not already held (tier, message class, and billing interval)

Start a hosted checkout for a plan not already held (tier, message class, and billing interval)

Request
curl https://sendhq.cc/api/v1/billing/checkout \
  -X POST \
  -H "Cookie: sendhq_session_v2=…" \
  -H "Content-Type: application/json" \
  -d '{"plan_key":"scaleup_marketing_annual"}'
200 Response
{
  "url": "https://checkout.example/…",
  "session_id": "…"
}
POST/billing/cancel
Browser session

Cancel the current subscription in-app without touching the provider

Cancel the current subscription in-app without touching the provider

Request
curl https://sendhq.cc/api/v1/billing/cancel \
  -X POST \
  -H "Cookie: sendhq_session_v2=…"
200 Response
{
  "ok": true
}
POST/keys
Browser session

Create an API key

Create an API key

Request
curl https://sendhq.cc/api/v1/keys \
  -X POST \
  -H "Cookie: sendhq_session_v2=…" \
  -H "Content-Type: application/json" \
  -d '{"name":"Production"}'
201 Response
{
  "id": "key_…",
  "name": "Production",
  "key": "re_…",
  "prefix": "re_…"
}
GET/keys
API key

List API-key metadata

List key names, non-secret prefixes, and last-used timestamps. Full key values are never returned. Creating and revoking keys requires a dashboard session.

Request
curl https://sendhq.cc/api/v1/keys \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "data": [],
  "count": 0
}
DELETE/keys/:id
Browser session

Revoke an API key

Revoke an API key

Request
curl https://sendhq.cc/api/v1/keys/id_value \
  -X DELETE \
  -H "Cookie: sendhq_session_v2=…"
200 Response
{
  "ok": true
}