API Reference

コンテスト

コンテストの詳細を一覧表示および取得

コンテスト

コンテストの管理および情報取得を行います。


コンテスト一覧

GET/api/v1/contests
Public or Private API Key

APIキーに関連付けられたチームのすべてのコンテストの一覧を返します。

リクエスト

パラメータは不要です。

bash
curl -X GET https://blitzrocket.com/api/v1/contests \
  -H "x-api-key: your_api_key_here"

レスポンス

json
{
  "success": true,
  "data": [
    {
      "id": "clx1abc123def456",
      "title": "Summer Giveaway 2025",
      "description": "この夏、素晴らしい賞品を獲得しよう!",
      "status": "active",
      "startDate": "2025-06-01T00:00:00.000Z",
      "endDate": "2025-08-31T23:59:59.000Z",
      "isEvergreen": false,
      "mode": "giveaway",
      "slug": "summer-giveaway-2025",
      "entriesCount": 1523
    },
    {
      "id": "clx2def456ghi789",
      "title": "Product Launch Contest",
      "description": null,
      "status": "draft",
      "startDate": null,
      "endDate": null,
      "isEvergreen": true,
      "mode": "leaderboard",
      "slug": "product-launch",
      "entriesCount": 0
    }
  ]
}

レスポンスフィールド

idstring

コンテストの一意識別子

titlestring

コンテストのタイトル

descriptionstring | null

コンテストの説明文

statusstring

現在のステータス:draft, active, ended, または paused

startDatestring | null

ISO 8601形式の開始日、未設定の場合はnull

endDatestring | null

ISO 8601形式の終了日、未設定の場合はnull

isEvergreenboolean

コンテストが無期限に開催されるかどうか

modestring

コンテストモード:giveaway, leaderboard, または waitlist

slugstring

URLフレンドリーな一意識別子

entriesCountnumber

コンテストへのエントリー総数


コンテスト取得

GET/api/v1/contests/:contestId
Public or Private API Key

特定のコンテストの詳細情報を取得します。

パスパラメータ

contestIdstring required

コンテストの一意識別子

リクエスト

bash
curl -X GET https://blitzrocket.com/api/v1/contests/clx1abc123def456 \
  -H "x-api-key: your_api_key_here"

レスポンス

json
{
  "success": true,
  "data": {
    "id": "clx1abc123def456",
    "title": "Summer Giveaway 2025",
    "description": "この夏、素晴らしい賞品を獲得しよう!",
    "status": "active",
    "startDate": "2025-06-01T00:00:00.000Z",
    "endDate": "2025-08-31T23:59:59.000Z",
    "isEvergreen": false,
    "mode": "giveaway",
    "slug": "summer-giveaway-2025",
    "entriesCount": 1523,
    "viewsCount": 12847
  }
}

エラー応答

ステータスエラー説明
400contestIdが不足contestIdパスパラメータは必須です
401無効なAPIキーAPIキーが存在しないか無効です
404コンテストが見つかりません指定されたIDのコンテストは存在しません