APIリファレンス
コンテスト
コンテストを作成、一覧表示、取得する
コンテスト
キャンペーンを作成し、コンテストの情報を取得します。
コンテスト一覧
/api/v1/contestsAPIキーに関連付けられたチームのキャンペーンを、ページネーション形式のリストで返します。ツール系のコンテスト(コンテンツゲートとインスタントウィンゲーム)は、デフォルトでは含まれません。
クエリパラメータ
toolTypestring optional ツールの種類で絞り込みます。省略するとキャンペーンのみを返します(`toolType: null`)。コンテンツゲートやインスタントウィンゲームを一覧表示するには、`content_gate`または`instant_win`を指定します。
リクエスト
curl -X GET https://blitzrocket.com/api/v1/contests \
-H "x-api-key: your_api_key_here"
レスポンス
{
"success": true,
"data": [
{
"id": "clx1abc123def456",
"title": "Summer Giveaway 2025",
"description": "Win amazing prizes this summer!",
"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 | nullISO 8601形式の開始日。未設定の場合はnull
endDatestring | nullISO 8601形式の終了日。未設定の場合はnull
isEvergreenbooleanコンテストが無期限に開催されるかどうか
modestringコンテストモード:giveaway、leaderboard、waitlistのいずれか
slugstringURLフレンドリーな一意識別子
entriesCountnumberコンテストへのエントリー総数
コンテスト取得
/api/v1/contests/:contestId特定のコンテストの詳細情報を取得します。
パスパラメータ
contestIdstring required コンテストの一意識別子
リクエスト
curl -X GET https://blitzrocket.com/api/v1/contests/clx1abc123def456 \
-H "x-api-key: your_api_key_here"
レスポンス
{
"success": true,
"data": {
"id": "clx1abc123def456",
"title": "Summer Giveaway 2025",
"description": "Win amazing prizes this summer!",
"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
}
}
エラー応答
このエンドポイントで発生する主なエラーレスポンスです。
| ステータス | エラー | 説明 |
|---|---|---|
400 | contestIdが不足 | contestIdパスパラメータは必須です |
401 | 無効なAPIキー | APIキーが存在しないか無効です |
404 | コンテストが見つかりません | 指定されたIDのコンテストは存在しません |
コンテスト作成
/api/v1/contestsキャンペーン本体、ページデザイン、報酬、ボーナスアクション、ティアまで設定済みのキャンペーンを、1回の呼び出しで作成します。すべてまとめて保存されるため、一部でも無効な内容があれば何も作成されません。ダッシュボードのキャンペーン作成ウィザードとは異なり、文章や画像は生成されません。送信した内容がそのまま反映され、省略した項目にはダッシュボードと同じデフォルト値が適用されます。
不明なフィールドは無視されずに400で拒否されるため、入力ミスにすぐ気付けます。
リクエストボディ
titlestring required キャンペーンのタイトル(最大255文字)。ページの見出しとURLスラッグを指定しない場合は、これらにも使用されます。
descriptionstring optional 短い説明文(最大255文字)
modestring optional default: viral`viral`(エントリーとポイントを使うプレゼントキャンペーン)、`referral`(自社サイトで運用する紹介プログラム)、`affiliate`(コミッション型)のいずれか。紹介プログラムとアフィリエイトプログラムにはStarterプラン以上が必要です。
statusstring optional default: DRAFT`DRAFT`または`ACTIVE`。`ACTIVE`を指定するとすぐに公開され、ご利用プランのアクティブなキャンペーン数の上限にカウントされます。
startDatestring optional ISO 8601形式の開始日時。デフォルトは現在時刻です。
endDatestring optional ISO 8601形式の終了日時。`isEvergreen`がtrueでない場合は必須です。
isEvergreenboolean optional default: false終了日を設けずに実施します
urlstring optional 自社のWebサイト。紹介リンクとアフィリエイトリンクのリンク先になります。
slugstring optional 希望するURLスラッグ。チーム内で一意になるよう調整されます。デフォルトではタイトルから作成されます。
themestring optional default: light`light`または`dark`:初期のカラーパレット
designobject optional ページデザイン:キャンペーンエディターの任意のデザイン設定を指定できます(例:`titleHtml`、`descriptionHtml`、`logo`、`header_background_image`、`button_color`、`body_bg_color`、`entry_methods`、`custom_signup_fields`、`showLeaderboard`)。
affiliateCommissionobject optional アフィリエイトキャンペーンのみ:`type`(`percent`または`flat`)と`amount`。デフォルトは15%です。
rewardsarray optional 報酬と賞品(下記参照)
bonusActionsarray optional 参加者が追加ポイントを獲得する方法(下記参照)
tiersarray optional 紹介ティア(下記参照)
settingsobject optional ダッシュボードで変更できるその他のキャンペーン設定。コンテストのフィールド名で指定します(例:`signupAdvocatePoints`、`signupFriendPoints`、`referralPurchaseAdvocatePoints`、`enableConfirmationEmail`、`confirmationEmailSubject`、`facebookPixel`、`gtmTagId`、`signupWebhookUrl`、`skipVerification`、`preventTempEmails`、`termsOfService`、`privacyPolicy`、`timezone`、`locale`)。
報酬
namestring required 報酬名
typestring optional default: grand_prize獲得方法:`grand_prize`、`1st_place`、`2nd_place`、`3rd_place`、`milestone`(`pointCost`ポイントに達するとアンロック)、`points`(`pointCost`ポイントと引き換え)、`referral`、`custom`のいずれか
pointCostnumber optional `milestone`報酬と`points`報酬に必要なポイント数
descriptionstring optional 報酬と一緒に表示されます
imageUrlstring optional 報酬の画像
quantitynumber optional 提供できる数。省略すると無制限になります。
redeemCodestring optional 当選者が受け取るクーポンコード
redeemUrlstring optional 当選者が受け取るリンク
報酬にはvalue、redeemDetails、expiryDate、maxRedemptionsPerUser、sendRedemptionEmail、redemptionEmailSubject、redemptionEmailContent、webhookUrl、webhookSecretも指定できます。
ボーナスアクション
actionstring required 短いラベル(例:`Follow us on Instagram`)
descriptionstring required 参加者に行ってもらう内容
pointsnumber required 付与されるポイント。アフィリエイトキャンペーンでは0を指定し、代わりに`commissionAmount`を設定します。
confirmationTypestring required 完了の確認方法:`none`(クリック時)、`text`(`confirmationQuestion`への回答)、`upload`(スクリーンショットまたは写真による証明)、`apify`(SNSでのアクションを自動で確認)、`api`(あなたのサーバーがREST API経由で報告)、`webhook`(当社が`apiVerificationUrl`を呼び出す)のいずれか
destinationUrlstring optional アクションボタンをクリックした参加者の移動先
socialMediastring optional プラットフォーム名(例:`Instagram`、`TikTok`、`X`、`YouTube`)
iconstring optional default: fas starソリッドアイコンは`fas <name>`(star、gift、heart、camera、...)、ブランドロゴは`fab <brand>`(instagram、tiktok、youtube、...)
ボーナスアクションにはcommissionAmount、verificationDirections、confirmationQuestion、uploadMediaType、apiVerificationUrl、apiVerificationSecret、appStoreUrl、playStoreUrl、isRepeatableDaily、requiresManualReview、orderも指定できます。
ティア
namestring required ティア名
pointsRequirednumber optional ティアに到達するために必要なポイント(バイラルキャンペーンと紹介キャンペーン)
pointMultipliernumber optional 到達後のポイント倍率
commissionRequirednumber optional ティアに到達するために必要なコミッション額(ドル単位、アフィリエイトキャンペーン)
commissionMultipliernumber optional 到達後のコミッション倍率
rewardIndexnumber optional このティアでアンロックされる報酬の、`rewards`内での位置
ティアにはcolor、iconUrl、details、redeemDetailsも指定できます。各ティアにはそれぞれ個別のしきい値が必要です。
紹介報酬
referralRewardsでは、rewardsのうちどの報酬を紹介者(アドボケイト)と、その紹介で参加した友人に付与するかを指定します。各値はrewards内での位置です。
signupAdvocatenumber optional 紹介した友人が登録したときに紹介者へ付与する報酬
signupFriendnumber optional 登録した友人に付与する報酬
purchaseAdvocatenumber optional 紹介した友人が購入したときに紹介者へ付与する報酬
purchaseFriendnumber optional 購入した友人に付与する報酬
リクエスト
curl -X POST "https://blitzrocket.com/api/v1/contests" \
-H "x-api-key: your_private_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Win a year of coffee",
"description": "Enter for a chance to win 52 bags of our house roast.",
"status": "ACTIVE",
"endDate": "2026-12-31T23:59:59Z",
"design": { "logo": "https://example.com/logo.png", "button_color": "#6B4226" },
"rewards": [
{ "name": "A year of coffee", "type": "grand_prize", "quantity": 1 },
{ "name": "10% off", "type": "milestone", "pointCost": 50, "redeemCode": "BEANS10" }
],
"bonusActions": [
{
"action": "Follow us on Instagram",
"description": "Follow @examplecoffee",
"points": 5,
"confirmationType": "upload",
"socialMedia": "Instagram",
"icon": "fab instagram",
"destinationUrl": "https://instagram.com/examplecoffee"
},
{
"action": "Visit our shop",
"description": "Take a look at our roasts",
"points": 2,
"confirmationType": "none",
"destinationUrl": "https://example.com/shop"
}
],
"tiers": [
{ "name": "Coffee Lover", "pointsRequired": 50, "rewardIndex": 1 }
],
"settings": { "signupAdvocatePoints": 10, "preventTempEmails": true }
}'
レスポンス (201 Created)
作成したキャンペーンを、IDを含むrewards、bonusActions、tiersとともに返します。
{
"success": true,
"data": {
"id": "clx_contest_123",
"metaTitle": "Win a year of coffee",
"slug": "win-a-year-of-coffee",
"status": "ACTIVE",
"mode": "viral",
"rewards": [{ "id": "clx_reward_1", "name": "A year of coffee", "type": "grand_prize" }],
"bonusActions": [{ "id": "clx_ba_1", "action": "Follow us on Instagram", "points": 5 }],
"tiers": [{ "id": "clx_tier_1", "name": "Coffee Lover", "points_required": 50, "rewardId": "clx_reward_2" }]
}
}
エラー応答
| ステータス | 意味 |
|---|---|
400 | リクエストボディが無効です。issuesに、各フィールドとその問題点が列挙されます。 |
403 | パブリックキーを使用した、ACTIVEにするとご利用プランのアクティブなキャンペーン数の上限を超える、ご利用プランに紹介/アフィリエイトプログラムが含まれていない、またはサブスクリプションが一時停止中 |
409 | 紹介プログラムまたはアフィリエイトプログラムがすでにあるドメインで、ACTIVEのプログラムを作成しようとした |