BricqsBricqs
Documentation

Gates API

Evaluate gate conditions to determine whether screens or content should be unlocked for a participant.

Authentication: Session-based. Pass session_id and engagement_id in the request body. No API key required.

Endpoints

MethodEndpointDescription
POST/runtime/gates/checkCheck gate status for one or more targets

Check Gate Status

Evaluates gate conditions for the specified targets (screen IDs). Gates can require activity completion, point thresholds, badge ownership, or other conditions before content is unlocked.

curl -X POST https://YOUR_API_DOMAIN/api/v1/runtime/gates/check \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "sess_abc123",
    "engagement_id": "550e8400-e29b-41d4-a716-446655440000",
    "targets": ["screen-rewards", "screen-bonus"]
  }'
Response
{
  "gates": {
    "screen-rewards": {
      "locked": false,
      "conditions_met": ["quiz_completed", "min_points_100"]
    },
    "screen-bonus": {
      "locked": true,
      "conditions_met": ["quiz_completed"],
      "conditions_remaining": ["badge_earned:power_user"],
      "unlock_hint": "Earn the Power User badge to unlock this screen"
    }
  }
}

Gate Condition Types

Gates support several condition types that can be combined with AND logic:

ConditionDescriptionExample
activity_completedParticipant completed a specific activityquiz_completed
min_pointsParticipant has at least N pointsmin_points_500
badge_earnedParticipant earned a specific badgebadge_earned:power_user
screen_visitedParticipant visited a specific screenscreen_visited:intro

Related