Home Docs Checkbox

Checkbox Input

Simple yes/no or true/false responses.

Overview

The checkbox field type represents boolean values - simple yes/no or true/false responses. This is the most straightforward input type for binary choices.

Best for: Consent checkboxes, feature toggles, agreement confirmations, or any binary yes/no questions.

Field Structure

key
string required

Unique identifier for this field.

label
string required

Display label shown to the player.

type
string required

Must be set to checkbox

value
boolean required

Boolean value or boolean-like representation. Accepted values:

  • true or false (boolean)
  • "true" or "false" (string)
  • 1 or 0 (number)
  • "1" or "0" (string)

Example

{
  "key": "enjoyed_game",
  "label": "Did you enjoy the game?",
  "type": "checkbox",
  "value": true
}

Additional Examples

Terms Agreement (using string "true")

{
  "key": "terms_accepted",
  "label": "I agree to the terms and conditions",
  "type": "checkbox",
  "value": "true"
}

Feature Preference (using number 1)

{
  "key": "enable_tutorials",
  "label": "Would you like to see tutorials?",
  "type": "checkbox",
  "value": 1
}

Recommend to Friend (using boolean false)

{
  "key": "would_recommend",
  "label": "Would you recommend this game?",
  "type": "checkbox",
  "value": false
}

Newsletter Subscription (using string "0")

{
  "key": "newsletter_opt_in",
  "label": "Subscribe to our newsletter",
  "type": "checkbox",
  "value": "0"
}

Validation Rules

  • Value must be a boolean or boolean-like value
  • Accepted formats: true, false, "true", "false", 1, 0, "1", "0"
  • Cannot be null or undefined
  • All formats are internally normalized to "true" or "false" strings for storage

Note: All boolean representations are accepted for flexibility across different programming languages and frameworks. The API automatically normalizes these values for consistent storage and retrieval.

Common Use Cases

Simple Questions

Yes/no questions like "Did you enjoy the game?" or "Was this helpful?"

Agreements

Terms acceptance, privacy policy agreements, or age verification.

Feature Toggles

Enable/disable settings, opt-in preferences, or notification controls.

Recommendations

Would recommend, satisfied with experience, or willing to participate again.