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

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


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`

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