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/v1Authentication
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
| Field | Type | Required | Description |
|---|---|---|---|
flagKey | string | ✓ | The flag's key. Case-sensitive. |
userIdentifier | string | ✓ | A stable user ID. Used for consistent percentage rollout hashing and segment matching. |
sdk | string | — | SDK name and version for telemetry. |
Response example
{
"value": false,
"matchedRuleType": "STATIC",
"error": null
}| Field | Type | Description |
|---|---|---|
value | boolean | The flag's value for this user. Always use this to gate your feature. |
matchedRuleType | string | null | STATIC, SEGMENT, PERCENTAGE, or null. |
error | object | null | Populated 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
| Field | Type | Required | Description |
|---|---|---|---|
flagKey | string | ✓ | The flag to evaluate. |
userIdentifiers | string[] | ✓ | 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
endRate limits
| Plan | Evaluations / month |
|---|---|
| Free | 10,000 |
| Pro | 1,000,000 |
| Team | 10,000,000 |
| Enterprise | Custom |
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
- Evaluate → — exact request and response reference
- API Overview → — endpoint overview and authentication basics
- JavaScript / Node.js SDK → — use the official SDK instead of raw HTTP