Expert guidance for using FeatBit's Flag Evaluation REST API and Track Insights REST API to build custom SDKs for platforms without an official FeatBit SDK. Use when user asks about "evaluation API", "flag evaluation endpoint", "evaluate feature flags via HTTP", "track insights", "insight tracking API", "build custom SDK", "Kotlin SDK", "Android SDK", "iOS SDK", "Swift SDK", "Unity SDK", "embedded SDK", "mobile feature flags", "sendToExperiment", or needs to call FeatBit evaluation server directly. Do not use for management API operations (projects, environments, flag CRUD) — use featbit-rest-api for those. Do not use when an official SDK exists for the target language.
npx claudepluginhub joshuarweaver/cascade-code-devops-misc-1 --plugin featbit-featbit-skillsThis skill uses the workspace's default tool permissions.
Direct HTTP access to FeatBit's evaluation server — the foundation for building custom SDKs on any platform (Kotlin, Swift, Android, iOS, Unity, embedded, etc.).
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Direct HTTP access to FeatBit's evaluation server — the foundation for building custom SDKs on any platform (Kotlin, Swift, Android, iOS, Unity, embedded, etc.).
Official documentation:
Activate when users:
sendToExperiment, variation insights, custom metric events, or batch insight payloadsBefore writing any code:
{evaluation-server-url} (e.g., https://eval.your-featbit.com). Found in your FeatBit dashboard under environment settings.Authorization: your-environment-secret-key
This is the recommended pattern for a custom mobile/frontend SDK:
Step 1 ─ App launch → Evaluate ALL flags (or filtered by tags/keys)
Step 2 ─ Store locally → Cache results in memory for fast synchronous reads
Step 3 ─ Track insights → Fire-and-forget: send evaluation records to FeatBit
Step 4 ─ Poll for updates → Repeat Step 1 periodically using `filter.timestamp`
Step 5 ─ Track metrics → Send custom events (conversion, click, purchase) as they occur
POST {evaluation-server-url}/api/public/featureflag/evaluate
Authorization: your-environment-secret-key
Content-Type: application/json
Minimal request body:
{
"user": {
"keyId": "user-123",
"name": "John Doe",
"customizedProperties": [
{ "name": "country", "value": "US" },
{ "name": "plan", "value": "premium" }
]
}
}
Response — array of flag evaluation results:
[
{
"key": "new-checkout-flow",
"variation": {
"id": "08aceef3-5513-4b38-80ad-4b27bebe8871",
"type": "boolean",
"value": "true",
"matchReason": "premium user rule",
"sendToExperiment": true
}
}
]
Key fields:
variation.value — always a string, cast to the needed type ("true" → boolean, "104857600" → number)variation.sendToExperiment — save this; pass it unchanged when tracking insightsvariation.matchReason — "flag disabled" | "targeted" | "{rule name}" | "default"Narrow the response with filters (essential for reducing payload on mobile):
{
"user": { "keyId": "user-123" },
"filter": {
"keys": ["checkout-flow", "theme-color"],
"tags": ["mobile"],
"tagFilterMode": "and",
"timestamp": 1704067200000
}
}
filter.timestamp— Unix ms. Returns only flags modified after this timestamp. Pass the timestamp from the previous call to implement efficient polling.
Read references/flag-evaluation-api.md for the complete schema, all filter options, and error responses.
Store the response array in memory keyed by flag.key. Serve flag values synchronously from cache — never block UI on a network call.
After evaluating flags, send evaluation records asynchronously.
POST {evaluation-server-url}/api/public/insight/track
Authorization: your-environment-secret-key
Content-Type: application/json
Request body — array of insight objects:
[
{
"user": {
"keyId": "user-123",
"name": "John Doe",
"customizedProperties": [
{ "name": "plan", "value": "premium" }
]
},
"variations": [
{
"featureFlagKey": "new-checkout-flow",
"variation": {
"id": "08aceef3-5513-4b38-80ad-4b27bebe8871",
"value": "true"
},
"sendToExperiment": true,
"timestamp": 1704067200000
}
],
"metrics": []
}
]
Response:
200 OKwith empty body on success. Do not await this in the main UI thread.
Critical:
variation.id, variation.value, and sendToExperiment exactly from the evaluation response. Do not derive or guess these values.variations or metrics must be non-empty in each insight object. A payload where both are empty arrays is a no-op.On a background timer, re-evaluate using filter.timestamp set to the time of the last successful poll. Only changed flags are returned — update your cache with the diff.
When a user performs a meaningful action (purchase, conversion, click):
[
{
"user": { "keyId": "user-123" },
"variations": [],
"metrics": [
{
"route": "/checkout/complete",
"type": "CustomEvent",
"eventName": "purchase-completed",
"numericValue": 99.99,
"appType": "Mobile",
"timestamp": 1704067350000
}
]
}
]
appType— use"Mobile"for Android/iOS apps,"Web"for browser-based apps.
Read references/track-insights-api.md for the complete schema, batch examples, and best practices.
| Scenario | Action |
|---|---|
| Evaluate all flags on launch | POST evaluate with user, no filter |
| Evaluate only mobile-tagged flags | POST evaluate with filter.tags: ["mobile"] |
| Evaluate one specific flag | POST evaluate with filter.keys: ["flag-key"] |
| Detect flag changes since last poll | POST evaluate with filter.timestamp: {lastPollMs} |
| Record which variation user saw | POST track with variations array |
| Record A/B test conversion | POST track with metrics array |
| Record both at once | POST track with both variations and metrics in one payload |
Copy and track progress:
filter.timestamp to pick up flag changesgetFlag(key, defaultValue) helper that reads from cache synchronously| File | Read when |
|---|---|
references/flag-evaluation-api.md | User asks about exact request/response schema, filter parameters, error codes, or single-flag evaluation |
references/track-insights-api.md | User asks about insights schema, batching multiple users, MetricInsight fields, or best practices |