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

GET/api/v1/content-gates
Public or Private API Key

Query Parameters

pagenumber optional default: 1

Page number, starting at 1

limitnumber optional default: 20

Items per page (1-100)

Request

bash
curl -X GET "https://blitzrocket.com/api/v1/content-gates?page=1&limit=20" \
  -H "x-api-key: your_api_key_here"

Response

json
{
  "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

GET/api/v1/content-gates/:gateId
Public or Private API Key

With 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

pointThresholdnumber

Points required to unlock

unlockobject

Unlock payload: type (`url` | `file` | `code`), name, and the matching redeem field

bonusActionsarray

Required actions and their point values

embedDisplaystring

`inline` or `popup`. Applies when `publishAs` is `embed`.

popupobject

When a popup opens: `exitIntent` (boolean), `delaySeconds` (number or null), `reshowAfterDays` (number)

videoUrlstring

YouTube, Vimeo or video file link shown under the title, or an empty string

contentHtmlstring

Extra rich-text content shown below the signup form, or an empty string


Create Content Gate

POST/api/v1/content-gates
Private API Key Required

Request 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.

With publishAs: "embed" and embedDisplay: "popup", add one script tag to your site. No container div is needed:

html
<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

bash
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)

json
{
  "success": true,
  "data": {
    "id": "clx_gate_123",
    "metaTitle": "Unlock the playbook",
    "slug": "unlock-the-playbook",
    "publishAs": "landing",
    "rewardId": "reward_abc"
  }
}

Update Content Gate

PUT/api/v1/content-gates/:gateId
Private API Key Required

Partial update. All body fields are optional. Status accepts DRAFT, ACTIVE, or FINISHED.


Delete Content Gate

DELETE/api/v1/content-gates/:gateId
Private API Key Required

Deletes 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

GET/api/v1/content-gates/:gateId/unlocks
Private API Key Required

Paginated list of entries that redeemed the milestone unlock.


Get Entry Progress

GET/api/v1/content-gates/:gateId/entries/:entryId
Public or Private API Key

Returns points, threshold, per-action completion, and the unlock payload once the entry has unlocked.

json
{
  "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"
      }
    ]
  }
}