Skip to main content
POST
/
v1
/
trpc
/
featureFlags.*
tRPC Feature Flags API
curl --request POST \
  --url 'https://api.glider.fi/v1/trpc/featureFlags.*' \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.glider.fi/v1/trpc/featureFlags.*"

headers = {"X-API-KEY": "<api-key>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.glider.fi/v1/trpc/featureFlags.*', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.glider.fi/v1/trpc/featureFlags.*",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "X-API-KEY: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.glider.fi/v1/trpc/featureFlags.*"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("X-API-KEY", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.glider.fi/v1/trpc/featureFlags.*")
  .header("X-API-KEY", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.glider.fi/v1/trpc/featureFlags.*")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
The featureFlags.* namespace is available on the tRPC base endpoint:
  • Base endpoint: POST /v1/trpc
  • Namespace: featureFlags.*

Procedures

  • featureFlags.getGlobalFlags
    • Auth: public
    • Purpose: read global yes/no feature flag defaults for public client surfaces that must not depend on wallet login state
    • Input:
      • required featureKeys, 1-50 non-empty feature keys
    • Response:
      • flags: object keyed by requested feature key. A key resolves to true only when the feature row exists, is_active = true, and default_state = true; missing or inactive keys resolve to false.
    • Does not evaluate per-user overrides, codes, percentage rollouts, country, plan, or app-version targeting.
  • featureFlags.getUserFlags
    • Auth: wallet session or API key with wallet context
    • Purpose: evaluate user-specific feature flags with overrides, redeemed codes, rollouts, and defaults
    • Input:
      • optional country
      • optional planTier
      • optional appVer
    • Response:
      • flags: evaluated feature flags for the authenticated wallet user
      • redeemedDescriptions: descriptions for redeemed feature-code gated access

Runtime Notes

  • Use getGlobalFlags for public UI gates such as default-on browse surfaces or global execution-route kill switches.
  • Use getUserFlags only when the product behavior actually depends on the authenticated user, rollout bucket, override, or redeemed code state.