skills/featbit-rest-api/SKILL.md
Expert guidance for using the FeatBit REST API to manage projects, environments, and feature flags programmatically. Use when user asks about "FeatBit API", "REST API", "create project API", "create environment API", "create feature flag API", "API authentication", "OpenAPI key", or needs to automate FeatBit operations via HTTP endpoints. Do not use for SDK integration, deployment configuration, or flag evaluation questions.
npx skillsauth add featbit/featbit-skills featbit-rest-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expert guidance for interacting with FeatBit services through the REST API. Use these endpoints to manage projects, environments, feature flags, and more programmatically.
Activate when users:
https://your-featbit-instance.com/api/v{version}
v1 (URL pattern: /api/v1/{resource})your-featbit-instance.com with your actual FeatBit hostFeatBit supports two authentication methods:
Authorization: Bearer {jwt_token}
Best for: interactive sessions, user-scoped operations.
Authorization: {api_key}
Best for: CI/CD pipelines, automation scripts, service-to-service calls.
Detailed Guide: references/authentication.md
All API responses follow a standardized wrapper:
{
"success": true,
"data": { ... },
"errors": []
}
On failure:
{
"success": false,
"data": null,
"errors": [
{ "code": "Required:name", "message": "The name field is required" }
]
}
| Code | Description |
|------|-------------|
| 200 | Success |
| 400 | Bad Request — validation errors |
| 401 | Unauthorized — missing or invalid authentication |
| 403 | Forbidden — insufficient permissions |
| 404 | Not Found — resource doesn't exist |
| 500 | Internal Server Error |
| Method | Endpoint | Description | Permission |
|--------|----------|-------------|------------|
| GET | /api/v1/projects | List all projects in the organization | CanAccessProject |
| POST | /api/v1/projects | Create a new project | CreateProject |
| GET | /api/v1/projects/{projectId} | Get project details with environments | CanAccessProject |
Quick example — Create a project:
curl -X POST "https://your-featbit-instance.com/api/v1/projects" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {jwt_token}" \
-d '{"name": "E-Commerce Platform", "key": "ecommerce"}'
Full Reference: references/projects-api.md
| Method | Endpoint | Description | Permission |
|--------|----------|-------------|------------|
| POST | /api/v1/projects/{projectId}/envs | Create a new environment | CreateEnv |
Quick example — Create an environment:
curl -X POST "https://your-featbit-instance.com/api/v1/projects/{projectId}/envs" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {jwt_token}" \
-d '{"name": "Staging", "key": "staging", "description": "QA environment"}'
Full Reference: references/environments-api.md
| Method | Endpoint | Description | Permission |
|--------|----------|-------------|------------|
| POST | /api/v1/envs/{envId}/feature-flags | Create a new feature flag | CreateFlag |
Quick example — Create a boolean feature flag:
curl -X POST "https://your-featbit-instance.com/api/v1/envs/{envId}/feature-flags" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {jwt_token}" \
-d '{
"name": "New Checkout Flow",
"key": "new-checkout-flow",
"isEnabled": false,
"variationType": "boolean",
"variations": [
{"id": "var-on", "name": "On", "value": "true"},
{"id": "var-off", "name": "Off", "value": "false"}
],
"enabledVariationId": "var-on",
"disabledVariationId": "var-off",
"tags": ["checkout"]
}'
boolean, string, number, json^[a-zA-Z0-9._-]+$Full Reference: references/feature-flags-api.md
A typical setup flow — create project, add environment, create flag:
# 1. Create a project (auto-creates Prod and Dev environments)
PROJECT=$(curl -s -X POST "$BASE_URL/api/v1/projects" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"name":"My App","key":"my-app"}')
PROJECT_ID=$(echo $PROJECT | jq -r '.data.id')
DEV_ENV_ID=$(echo $PROJECT | jq -r '.data.environments[1].id')
# 2. (Optional) Create a staging environment
curl -s -X POST "$BASE_URL/api/v1/projects/$PROJECT_ID/envs" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"name":"Staging","key":"staging","description":"QA environment"}'
# 3. Create a feature flag in the dev environment
curl -s -X POST "$BASE_URL/api/v1/envs/$DEV_ENV_ID/feature-flags" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"name":"New Feature","key":"new-feature","isEnabled":false,
"variationType":"boolean",
"variations":[{"id":"v1","name":"On","value":"true"},{"id":"v2","name":"Off","value":"false"}],
"enabledVariationId":"v1","disabledVariationId":"v2","tags":["backend"]
}'
More Patterns: references/common-patterns.md
new-checkout-flow)tools
Expert guidance for integrating FeatBit JavaScript Client SDK in browser environments. Use when user asks about "JavaScript client SDK", "browser feature flags", "FeatBit JS", "vanilla JS SDK", or mentions browser-side HTML/JS with FeatBit. Do not use for Node.js server-side, React, React Native, .NET, Python, Java, or Go questions.
development
Expert guidance for integrating FeatBit Java Server SDK. Use when user asks about "Java SDK", "Java feature flags", "FeatBit Java", "Maven feature flags", or mentions .java or build.gradle files with FeatBit. Do not use for .NET, Go, Node.js, Python, or JavaScript questions.
development
Expert guidance for integrating FeatBit Go Server SDK. Use when user asks about "Go SDK", "Golang feature flags", "FeatBit Go", or mentions .go files with FeatBit. Do not use for Node.js, Python, Java, .NET, or JavaScript questions.
tools
Expert guidance for integrating FeatBit .NET Server SDK into C# and ASP.NET Core applications. Use when user asks about ".NET SDK", "C# feature flags", "ASP.NET Core FeatBit", "dotnet feature flags", or mentions .cs or .csproj files. Do not use for Node.js, Python, Java, Go, or client-side JavaScript questions.