API 레퍼런스

계정 및 결제

API 키로 계정 사용량, 분석, 키 메타데이터를 읽을 수 있습니다. 결제 변경과 키 생성 또는 폐기에는 대시보드 세션이 필요합니다.

GET/account
API 키

API 키로 계정, 사용량, 결제 상태, 워크스페이스 수 조회

대시보드 프로필에 해당하는 API 키용 엔드포인트입니다. 계정 소유자, 요금제 한도 대비 현재 기간의 수신자 및 첨부 파일 사용량, 액세스 등급, 발신자 평판 요약, 구독 상태, 게시된 요금제, 워크스페이스 수를 반환합니다. 읽기 전용이며 결제 변경은 세션에서만 가능합니다.

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

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.

요청
curl https://sendhq.cc/api/v1/account/diagnostics \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "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 키

7일, 30일 또는 90일 기간의 대시보드 발송 분석 조회

해당 기간의 발송, 수신, 전달, 반송, 차단, 열람, 클릭, 스팸 신고 합계와 일별 발송/수신 타임라인, 상위 발송 도메인, 성과가 가장 좋은 제목을 반환합니다.

쿼리 매개변수days
요청
curl https://sendhq.cc/api/v1/analytics \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "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
브라우저 세션

계정, 사용량, 누적 구독 상태 조회

계정, 사용량, 누적 구독 상태 조회

요청
curl https://sendhq.cc/api/v1/profile \
  -X GET \
  -H "Cookie: sendhq_session_v2=…"
200 응답
{
  "user": {},
  "usage": {},
  "access": {},
  "reputation": {},
  "billing": {},
  "plans": []
}
POST/billing/checkout
브라우저 세션

아직 보유하지 않은 요금제(등급, 메시지 유형, 결제 주기)의 호스팅 결제 시작

아직 보유하지 않은 요금제(등급, 메시지 유형, 결제 주기)의 호스팅 결제 시작

요청
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 응답
{
  "url": "https://checkout.example/…",
  "session_id": "…"
}
POST/billing/cancel
브라우저 세션

제공업체를 건드리지 않고 앱에서 현재 구독 취소

제공업체를 건드리지 않고 앱에서 현재 구독 취소

요청
curl https://sendhq.cc/api/v1/billing/cancel \
  -X POST \
  -H "Cookie: sendhq_session_v2=…"
200 응답
{
  "ok": true
}
POST/keys
브라우저 세션

API 키 생성

API 키 생성

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

API 키 메타데이터 목록 조회

키 이름, 비밀이 아닌 접두사, 마지막 사용 시각을 나열합니다. 전체 키 값은 절대 반환되지 않습니다. 키 생성과 폐기에는 대시보드 세션이 필요합니다.

요청
curl https://sendhq.cc/api/v1/keys \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 응답
{
  "data": [],
  "count": 0
}
DELETE/keys/:id
브라우저 세션

API 키 폐기

API 키 폐기

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