REST API

The REST API lets you integrate ReleaseAnchor from any language or framework — no SDK required. All you need is an HTTP client.

Use this page for practical integration examples. If you want the exact response contract and full error reference, see Evaluate →.

Base URL

https://api.releaseanchor.com/v1

Authentication

All requests require an API key in the Authorization header. Get your key from the API Keys page in the dashboard.

-H "Authorization: ApiKey <YOUR_API_KEY>"

The format is Authorization: ApiKey <key> — not Bearer, not X-API-Key.

API keys are environment-scoped. A Production key will always return Production flag values. Make sure you're using the right key for each environment.

Evaluate a flag

POST https://api.releaseanchor.com/v1/evaluate

Evaluates a single feature flag for a given user. All responses are HTTP 200 — check the error field in the body, not the HTTP status code.

curl --location 'https://api.releaseanchor.com/v1/evaluate' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: ApiKey <YOUR_API_KEY>' \
  --data '{
    "flagKey": "new-checkout",
    "userIdentifier": "usr_42"
  }'

Request body

FieldTypeRequiredDescription
flagKeystringThe flag's key. Case-sensitive.
userIdentifierstringA stable user ID. Used for consistent percentage rollout hashing and segment matching.
sdkstringSDK name and version for telemetry.

Response example

{
  "value": false,
  "matchedRuleType": "STATIC",
  "error": null
}
FieldTypeDescription
valuebooleanThe flag's value for this user. Always use this to gate your feature.
matchedRuleTypestring | nullSTATIC, SEGMENT, PERCENTAGE, or null.
errorobject | nullPopulated when evaluation could not proceed normally.

All evaluation responses return HTTP 200. Check the error field in the body, not the HTTP status code. For the complete error matrix, see Evaluate →.

401 Unauthorized

A missing or invalid API key returns HTTP 401:

{
  "status": 401,
  "error": "Unauthorized",
  "message": "Missing or invalid Authorization header"
}

Evaluate a flag for multiple users

POST https://api.releaseanchor.com/v1/evaluate/bulk

Evaluates a single flag for a list of users. Useful for backend batch processing — e.g. finding all users who qualify for a feature.

curl --location 'https://api.releaseanchor.com/v1/evaluate/bulk' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: ApiKey <YOUR_API_KEY>' \
  --data '{
    "flagKey": "new-checkout",
    "userIdentifiers": ["usr_42", "usr_99", "usr_101"]
  }'

Request body

FieldTypeRequiredDescription
flagKeystringThe flag to evaluate.
userIdentifiersstring[]List of user identifiers to evaluate the flag for.

Response

Returns a map of userIdentifier → EvaluateResponse:

{
  "usr_42": { "value": true, "matchedRuleType": "SEGMENT", "error": null },
  "usr_99": { "value": false, "matchedRuleType": null, "error": null },
  "usr_101": { "value": true, "matchedRuleType": "PERCENTAGE", "error": null }
}

Language examples

Python

import requests
import os

def evaluate_flag(flag_key: str, user_identifier: str) -> bool:
    resp = requests.post(
        "https://api.releaseanchor.com/v1/evaluate",
        headers={
            "Authorization": f"ApiKey {os.environ['RELEASE_ANCHOR_KEY']}",
            "Content-Type": "application/json",
        },
        json={"flagKey": flag_key, "userIdentifier": user_identifier},
        timeout=3,
    )
    resp.raise_for_status()
    return resp.json()["value"] is True

if evaluate_flag("new-checkout", user.id):
    return new_checkout_response()
return legacy_checkout_response()

Go

package flags

import (
    "bytes"
    "encoding/json"
    "net/http"
    "os"
)

type evalResult struct {
    Value bool `json:"value"`
}

func Evaluate(flagKey, userIdentifier string) (bool, error) {
    body, _ := json.Marshal(map[string]string{
        "flagKey":        flagKey,
        "userIdentifier": userIdentifier,
    })
    req, _ := http.NewRequest("POST",
        "https://api.releaseanchor.com/v1/evaluate",
        bytes.NewReader(body))
    req.Header.Set("Authorization", "ApiKey "+os.Getenv("RELEASE_ANCHOR_KEY"))
    req.Header.Set("Content-Type", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        return false, err // fail safe: caller uses false
    }
    defer resp.Body.Close()

    var result evalResult
    json.NewDecoder(resp.Body).Decode(&result)
    return result.Value, nil
}

Ruby

require "net/http"
require "json"

def evaluate_flag(flag_key, user_identifier)
  uri = URI("https://api.releaseanchor.com/v1/evaluate")
  http = Net::HTTP.new(uri.host, uri.port)

  req = Net::HTTP::Post.new(uri)
  req["Authorization"] = "ApiKey #{ENV['RELEASE_ANCHOR_KEY']}"
  req["Content-Type"] = "application/json"
  req.body = { flagKey: flag_key, userIdentifier: user_identifier }.to_json

  res = http.request(req)
  JSON.parse(res.body)["value"] == true
rescue
  false # fail safe
end

Rate limits

PlanEvaluations / month
Free10,000
Pro1,000,000
Team10,000,000
EnterpriseCustom

When the monthly limit is exceeded (at the 110% hard overage threshold), the API returns HTTP 200 with error.type: "PLAN_LIMIT_EXCEEDED" and value: false.

See also

Was this helpful?