Skip to main content

What is Togul?

Togul is a feature flag management API that lets you safely roll out new features, run targeted experiments, and control your application behavior at runtime — without deploying new code. Togul is built around a hierarchical resource model: organizations contain projects, projects contain environments, and environments contain flags with rules that determine evaluation outcomes.

Quickstart

Register, create a flag, and evaluate it in under 5 minutes

Authentication

Learn about JWT bearer tokens and environment-scoped API keys

Flag evaluation

Understand how rules are matched and values returned

API reference

Full endpoint reference with request/response schemas

Key features

Targeting rules

Define boolean, attribute-based, and percentage rollout rules with priority ordering

Real-time streaming

Subscribe to flag and rule changes via Server-Sent Events for instant propagation

Organization permissions

Fine-grained permission system with built-in and custom roles scoped to organizations and projects

Multi-region support

Environments are automatically assigned to regions; secondary regions consume changes asynchronously

Billing & plans

Free, Pro, and Enterprise plans with seat limits, evaluation quotas, and Stripe integration

Audit exports

Export audit logs and full account data snapshots at any time

How it works

Togul uses two authentication mechanisms:
  • Bearer tokens — JWT tokens scoped to your organization membership. Use these for management operations: creating flags, managing members, configuring rules.
  • API keys — Environment-scoped machine credentials sent via X-API-Key. Use these in your application servers and SDKs to evaluate flags.
The typical workflow is:
  1. Register and create an organization
  2. Create a project and one or more environments (e.g., production, staging)
  3. Create API keys for each environment
  4. Define flags and targeting rules
  5. Call POST /api/v1/evaluate from your application with the flag key, environment key, and evaluation context

Resource hierarchy

Organization
└── Project
    └── Environment
        ├── Flags
        │   └── Rules
        └── API Keys
Members and roles exist at both the organization level and the project level, giving you fine-grained access control over who can manage which resources.

API base URL

http://localhost:8080
All endpoints are versioned under /api/v1/. See the API reference for the full endpoint list.

Build docs developers (and LLMs) love