API Reference
Content Gates
Create and manage gated content campaigns
Content Gates
Content gates are slim contests. Visitors sign up, complete bonus actions to earn points, and unlock a URL, file, or coupon once they reach the point threshold.
Signup always awards 1 point. The unlock threshold must be at least 2, so at least one bonus action is required.
List Content Gates
/api/v1/content-gatesQuery Parameters
pagenumber optional default: 1Page number, starting at 1
limitnumber optional default: 20Items per page (1-100)
Request
curl -X GET "https://blitzrocket.com/api/v1/content-gates?page=1&limit=20" \
-H "x-api-key: your_api_key_here"
Response
{
"success": true,
"data": [
{
"id": "clx_gate_123",
"metaTitle": "Unlock the playbook",
"status": "ACTIVE",
"slug": "unlock-the-playbook",
"publishAs": "landing",
"signupCount": 184,
"unlock": { "name": "Playbook PDF", "pointCost": 5 }
}
],
"pagination": { "page": 1, "limit": 20, "total": 1, "totalPages": 1 }
}
Get Content Gate
/api/v1/content-gates/:gateIdWith a public key, the unlock's redeemCode, redeemUrl and redeemFiles and each bonus action's apiVerificationUrl and apiVerificationSecret are left out, since public keys can be read from your web pages. Use a private key to read them. The same applies to unlock in the list endpoint.
Path Parameters
gateIdstring required Content gate identifier
Response Fields
pointThresholdnumberPoints required to unlock
unlockobjectUnlock payload: type (`url` | `file` | `code`), name, and the matching redeem field
bonusActionsarrayRequired actions and their point values
embedDisplaystring`inline` or `popup`. Applies when `publishAs` is `embed`.
popupobjectWhen a popup opens: `exitIntent` (boolean), `delaySeconds` (number or null), `reshowAfterDays` (number)
videoUrlstringYouTube, Vimeo or video file link shown under the title, or an empty string
contentHtmlstringExtra rich-text content shown below the signup form, or an empty string
Create Content Gate
/api/v1/content-gatesRequest Body
titlestring required Gate title (max 120 characters)
descriptionstring optional Short description (max 500 characters)
pointThresholdnumber required Unlock threshold. Minimum 2.
unlockobject required Unlock config. `type` must be `url`, `file`, or `code` and include the matching redeem field.
bonusActionsarray required At least one bonus action. Points plus the 1 signup point must reach the threshold.
publishAsstring required `landing` or `embed`
embedUrlstring optional Required when `publishAs` is `embed`
embedDisplaystring optional default: inline`inline` renders into a container div; `popup` opens a lightbox over the page. `popup` needs `publishAs: embed`.
popupobject optional Popup triggers: `exitIntent` (boolean, default true), `delaySeconds` (1-600 or null, default null), `reshowAfterDays` (0-365, default 7; 0 shows it again on the next page view)
videoUrlstring optional http(s) link to a YouTube or Vimeo video or a video file, shown under the title
contentHtmlstring optional Extra rich text shown below the signup form (max 20,000 characters). Scripts, iframes and event handlers are removed.
Popup embeds
With publishAs: "embed" and embedDisplay: "popup", add one script tag to your site. No container div is needed:
<script src="https://blitzrocket.com/blitzrocket.js"
data-contest-id="GATE_ID" data-display="popup"></script>
The script reads the gate's popup settings at load and caches them in the browser for up to 10 minutes, so you can change the triggers without editing your site. Once a visitor signs up, the popup stops opening on its own for them. Any element with a data-blitzrocket-open attribute opens the popup when clicked, and so does BlitzRocketWidget.open().
Request
curl -X POST https://blitzrocket.com/api/v1/content-gates \
-H "x-api-key: your_private_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Unlock the playbook",
"pointThreshold": 5,
"publishAs": "landing",
"unlock": {
"type": "url",
"name": "Playbook",
"redeemUrl": "https://example.com/playbook"
},
"bonusActions": [
{
"action": "Follow on Instagram",
"icon": "instagram",
"description": "Follow @brand",
"points": 4,
"confirmationType": "text",
"presetOrCustom": "preset"
}
]
}'
Response (201 Created)
{
"success": true,
"data": {
"id": "clx_gate_123",
"metaTitle": "Unlock the playbook",
"slug": "unlock-the-playbook",
"publishAs": "landing",
"rewardId": "reward_abc"
}
}
Update Content Gate
/api/v1/content-gates/:gateIdPartial update. All body fields are optional. Status accepts DRAFT, ACTIVE, or FINISHED.
Delete Content Gate
/api/v1/content-gates/:gateIdDeletes the gate and all related entries. If the gate has entries, pass ?force=true or the API returns 409.
Query Parameters
forceboolean optional Required when the gate already has entries
List Unlocks
/api/v1/content-gates/:gateId/unlocksPaginated list of entries that redeemed the milestone unlock.
Get Entry Progress
/api/v1/content-gates/:gateId/entries/:entryIdReturns points, threshold, per-action completion, and the unlock payload once the entry has unlocked.
{
"success": true,
"data": {
"entryId": "entry_abc123",
"points": 5,
"pointThreshold": 5,
"unlocked": true,
"unlock": {
"type": "url",
"name": "Playbook",
"redeemUrl": "https://example.com/playbook"
},
"actions": [
{
"id": "ba_1",
"action": "Follow on Instagram",
"points": 4,
"completed": true,
"status": "approved"
}
]
}
}