Getting Started
Create your first reward-driven flag in minutes
Quick Start
Get up and running with Versia in three steps.
Step 1: Create a Flag
Log into the Versia dashboard and create a new feature flag:
- Click “Create Flag”
- Give it a name (e.g.,
banner-cta) - Add your variants (e.g.,
sign-up-free,start-trial,learn-more) - Enable reward-driven mode
- Save
Your flag is live. Traffic starts split equally across all variants.
Step 2: Connect Your App
Install the OpenFeature SDK for your language and point it at Versia.
Go
provider := ofrep.NewProvider("https://api.versia.dev")
openfeature.SetProvider(provider)
client := openfeature.NewClient("my-app")
evalContext := openfeature.NewEvaluationContext(
"user-123",
map[string]interface{}{
"plan": "pro",
"device": "mobile",
},
)
variant, _ := client.StringValue(ctx, "banner-cta", "sign-up-free", evalContext)
Node.js
OpenFeature.setProvider(new OFREPProvider({
baseUrl: 'https://api.versia.dev'
}));
const client = OpenFeature.getClient();
const variant = await client.getStringValue('banner-cta', 'sign-up-free', {
targetingKey: 'user-123',
plan: 'pro',
device: 'mobile',
});
Python
api.set_provider(OFREPProvider(base_url="https://api.versia.dev"))
client = api.get_client()
context = EvaluationContext(
targeting_key="user-123",
attributes={"plan": "pro", "device": "mobile"},
)
variant = client.get_string_value("banner-cta", "sign-up-free", context)
The context tells Versia who the user is. Attributes like plan and device power exclusion rules and help reward-driven flags personalize per segment. See Evaluation Context for details.
Step 3: Send Rewards
When a user takes the action you care about, send a reward:
// Pass the same context used during evaluation so Versia can personalize
const ctx = { targetingKey: 'user-123', plan: 'pro', device: 'mobile' };
client.track('conversion', ctx, { flagKey: 'banner-cta', value: 1.0 });
- 1.0 = success (conversion, click, purchase)
- No event = neutral (Versia handles this automatically)
What Happens Next
Open the dashboard. Within a few hundred evaluations, you’ll see traffic shifting toward the better-performing variants. No analysis needed.
Next Steps
- Feature overview: what Versia can do
- Choosing rewards: pick the right success metric
- Plans & pricing: find the right plan for your team