Quickstart

Goal

By the end of this guide you'll have a real feature flag evaluated via the REST API — and you'll see exactly what happens before and after you enable it. Total time: under 3 minutes.

Prerequisites

  • A ReleaseAnchor account — sign up free, no credit card needed
  • curl (or any HTTP client)
  1. 1
    Create a project

    After signing in, create a new project, give it a name (e.g. my-app), and confirm.

    A project is a container for your flags and environments.

  2. 2
    Create an environment

    Inside your project, go to Environments and add an environment.

    Name it Production.

  3. 3
    Create a feature flag

    Go to Flags and create a flag. Fill in:

    • Name: Dark Mode
    • Key: dark-mode (auto-generated — this is what your code will use)

    Confirm creation. The flag starts disabled by default.

  4. 4
    Add a rule

    Open the dark-mode flag, select the Production environment, and go to the Rules tab.

    Click Add Rule → select Static. Set Serve value to true and click Save.

    This rule tells the flag to return true for every user — once the flag is enabled.

  5. 5
    Get your API key

    Go to API Keys in the sidebar, create a key for Production, and copy it.

    API keys are shown once. Copy it now and keep it secret — never expose it in client-side code or commit it to source control.

  6. 6
    Evaluate — flag is still disabled

    Replace <YOUR_API_KEY> with the key you copied:

    curl --location 'https://api.releaseanchor.com/v1/evaluate' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: ApiKey <YOUR_API_KEY>' \
      --data '{"flagKey": "dark-mode", "userIdentifier": "test-user-1"}'

    You'll get back false — the flag is disabled so no rules are evaluated:

    {
      "value": false,
      "matchedRuleType": null,
      "error": {
        "type": "FLAG_DISABLED",
        "message": "Flag disabled"
      }
    }
  7. 7
    Enable the flag

    Back in the dashboard, toggle the Production environment switch on the dark-mode flag to Enabled.

  8. 8
    Evaluate again — now it's live

    Run the same curl command:

    curl --location 'https://api.releaseanchor.com/v1/evaluate' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: ApiKey <YOUR_API_KEY>' \
      --data '{"flagKey": "dark-mode", "userIdentifier": "test-user-1"}'

    The static rule fires and returns true:

    {
      "value": true,
      "matchedRuleType": "STATIC",
      "error": null
    }

    Your flag is live. Toggle it off anytime from the dashboard — no deploy needed.

What's next

Was this helpful?