APIリファレンス
アカウントと請求
APIキーでアカウントの使用量、分析データ、キーのメタデータを読み取れます。請求の変更やキーの作成・無効化にはダッシュボードのセッションが必要です。
このフィルターに一致する操作はありません。
/accountAPIキーでアカウント、使用量、請求状態、ワークスペース数を取得する
ダッシュボードのプロフィールに相当する情報をAPIキーで取得します。アカウント所有者、プランの上限に対する当期の受信者数と添付ファイルの使用量、アクセス階層、送信者レピュテーションの概要、サブスクリプションの状態、公開中のプラン、ワークスペース数が含まれます。読み取り専用で、請求の変更は引き続きセッション経由でのみ行えます。
curl https://sendhq.cc/api/v1/account \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"user": {},
"usage": {},
"access": {},
"reputation": {},
"infrastructure": {},
"billing": {},
"plans": [],
"workspace": {
"mailer": "ses",
"stats": {}
}
}/account/diagnosticsDiagnose 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"{
"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": []
}/analytics7日間、30日間、90日間のダッシュボードの送信分析を取得する
期間内の送信、受信、配信、バウンス、ブロック、開封、クリック、苦情の合計数、1日ごとの送信/受信の推移、送信数の多いドメイン、成果の高い件名を返します。
curl https://sendhq.cc/api/v1/analytics \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"window": "30d",
"days": 30,
"metrics": {
"sent": 0,
"received": 0,
"bounced": 0,
"blocked": 0,
"delivered": 0,
"opened": 0,
"clicks": 0,
"complaints": 0
},
"timeline": [],
"domains": [],
"topContent": []
}/profileアカウント、使用量、積み重ねられたサブスクリプションの状態を取得する
アカウント、使用量、積み重ねられたサブスクリプションの状態を取得する
curl https://sendhq.cc/api/v1/profile \
-X GET \
-H "Cookie: sendhq_session_v2=…"{
"user": {},
"usage": {},
"access": {},
"reputation": {},
"billing": {},
"plans": []
}/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"}'{
"url": "https://checkout.example/…",
"session_id": "…"
}/billing/cancelプロバイダー側に触れずに、現在のサブスクリプションをアプリ内で解約する
プロバイダー側に触れずに、現在のサブスクリプションをアプリ内で解約する
curl https://sendhq.cc/api/v1/billing/cancel \
-X POST \
-H "Cookie: sendhq_session_v2=…"{
"ok": true
}/keysAPIキーを作成する
APIキーを作成する
curl https://sendhq.cc/api/v1/keys \
-X POST \
-H "Cookie: sendhq_session_v2=…" \
-H "Content-Type: application/json" \
-d '{"name":"Production"}'{
"id": "key_…",
"name": "Production",
"key": "re_…",
"prefix": "re_…"
}/keysAPIキーのメタデータを一覧表示する
キー名、秘密情報を含まないプレフィックス、最終使用日時を一覧表示します。キーの完全な値が返されることはありません。キーの作成と無効化にはダッシュボードのセッションが必要です。
curl https://sendhq.cc/api/v1/keys \
-X GET \
-H "Authorization: Bearer $SENDHQ_API_KEY"{
"data": [],
"count": 0
}/keys/:idAPIキーを無効化する
APIキーを無効化する
curl https://sendhq.cc/api/v1/keys/id_value \
-X DELETE \
-H "Cookie: sendhq_session_v2=…"{
"ok": true
}