GET/api/orgs/{org_id}/spend-alerts

支出アラートを一覧表示する

すべてのアラートルールと、それぞれの最新の発火イベントを返します。アラートはルールごとにUTCの月に1回メールを送ります。リクエストを止めることはありません(止めるのは予算です)。組織管理者またはプロビジョニングキーが必要です。

認証: AuthorizationヘッダーにBearer形式のAPIキー

パスパラメーター

  • org_idstring必須

    お客様の組織ID(uuid)。GET /api/whoamiで取得できます。

レスポンス

  • 200

    アラート。

    レスポンス
    • alertsarray<object>必須
      alerts
      • alert_idstring必須
      • kindenum必須
        "org_monthly_spend""budget_fraction"
      • threshold_nano_usdinteger | null必須
      • budget_idstring | null必須
      • threshold_fractionnumber | null必須
      • notify_emailstring必須
      • created_atstring必須
      • last_eventobject | null必須
        いずれか

        object

        • periodstring必須

          YYYY-MM。

        • fired_atstring必須
        • measured_nano_usdinteger必須
        • threshold_nano_usdinteger必須
        • delivered_atstring | null必須
        • delivery_errorstring | null必須
  • 401

    APIキーがない、不明、または失効しています。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

  • 403

    キーがプロビジョニングキーではない(推論キーは読み取りを含めて拒否されます)か、顧客プランキーです。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

  • 404

    不明な組織か、キー自身の組織ではありません。

    レスポンス
    • errorstring必須

      人が読めるメッセージ。

    • codestring

      エンドポイントが定義している場合の、安定した機械可読の理由(例:pro_required)。

    • actionstring

      エンドポイントが定義している場合の、安定した対処アクション。

    • detailsobject

      呼び出し元が対処するために必要な、顧客に提示して安全な文字列情報(推奨される識別子など)。

リクエスト

curl 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/spend-alerts' \
  -H "Authorization: Bearer <YOUR_API_KEY>"

レスポンス

{
  "alerts": [
    {
      "alert_id": "3c5e7a9c-1e3b-4d5f-8a0c-2e4a6c8e0b69",
      "kind": "budget_fraction",
      "threshold_nano_usd": null,
      "budget_id": "c4a2e8f1-7b3d-4e9a-8c15-3f0d6b2a9e71",
      "threshold_fraction": 0.8,
      "notify_email": "finance@acme.example",
      "created_at": "2026-11-02T09:14:00Z",
      "last_event": {
        "period": "2026-11",
        "fired_at": "2026-11-18T03:00:00Z",
        "measured_nano_usd": 161000000000,
        "threshold_nano_usd": 160000000000,
        "delivered_at": "2026-11-18T03:00:04Z",
        "delivery_error": null
      }
    }
  ]
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/spend-alerts