Features API
Reference for the Features management endpoints.
Features API
The Features API lets you manage feature flags and capabilities for users. Features control access to Forge capabilities like memory, security levels, routing strategies, and MCP modules based on the user's subscription tier.
List All Features
GET /v1/features
Returns all available features with their tier requirements and descriptions.
curl https://api.optima-forge.com/v1/features \
-H "Authorization: Bearer $FORGE_API_KEY"
Get User Features
GET /v1/features/:userId
Returns the features enabled for a specific user, including their tier, active features, and usage limits.
curl https://api.optima-forge.com/v1/features/user_123 \
-H "Authorization: Bearer $FORGE_API_KEY"
Toggle Feature
POST /v1/features/:userId/:featureId
Enable or disable a specific feature for a user. Some features require a minimum tier and will return 403 if the user's tier is insufficient.
curl -X POST https://api.optima-forge.com/v1/features/user_123/memory \
-H "Authorization: Bearer $FORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
Response Example
{
"userId": "user_123",
"tier": "pro",
"features": {
"memory": { "enabled": true, "tier_required": "free" },
"security_standard": { "enabled": true, "tier_required": "pro" },
"security_strict": { "enabled": false, "tier_required": "ultimate" },
"ensemble": { "enabled": false, "tier_required": "ultimate" },
"forge_connect": { "enabled": true, "tier_required": "free" }
}
}