REST /api/v1/feature-flags 7 endpoints
GET /api/v1/feature-flags/api/v1/feature-flags

List all feature flags, optionally filtered by org_id

Public

Response Example

{
  "data": [
    {
      "flag_id": "flg_01J4K8M2N3P5Q7F1",
      "feature_key": "peer_review_beta",
      "is_enabled": true,
      "org_id": "org_01J4K8M2N3P5Q7R9",
      "description": "Enable peer review workflow for learners",
      "updated_at": "2026-01-15T10:00:00Z"
    },
    {
      "flag_id": "flg_01J4K8M2N3P5Q7F2",
      "feature_key": "analytics_dashboard",
      "is_enabled": false,
      "org_id": "org_01J4K8M2N3P5Q7R9",
      "description": "Advanced analytics dashboard for admins",
      "updated_at": "2026-02-01T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 12
  }
}
GET /api/v1/feature-flags/api/v1/feature-flags/:key

Get a specific feature flag by its key

Public

Response Example

{
  "flag_id": "flg_01J4K8M2N3P5Q7F1",
  "feature_key": "peer_review_beta",
  "is_enabled": true,
  "org_id": "org_01J4K8M2N3P5Q7R9",
  "description": "Enable peer review workflow for learners",
  "updated_at": "2026-01-15T10:00:00Z"
}
POST /api/v1/feature-flags/api/v1/feature-flags

Create a new feature flag for an organization

Public

Request Example

{
  "feature_key": "ai_feedback_assistant",
  "is_enabled": false,
  "org_id": "org_01J4K8M2N3P5Q7R9",
  "description": "AI-powered feedback assistant for facilitators"
}

Response Example

{
  "flag_id": "flg_01J9X3P7K2M4N6E5",
  "feature_key": "ai_feedback_assistant",
  "is_enabled": false,
  "org_id": "org_01J4K8M2N3P5Q7R9",
  "description": "AI-powered feedback assistant for facilitators",
  "updated_at": "2026-03-26T12:00:00Z",
  "created_at": "2026-03-26T12:00:00Z"
}
PUT /api/v1/feature-flags/api/v1/feature-flags/:key

Enable, disable, or update a feature flag

Public

Request Example

{
  "is_enabled": true,
  "description": "AI-powered feedback assistant — now GA"
}

Response Example

{
  "flag_id": "flg_01J9X3P7K2M4N6E5",
  "feature_key": "ai_feedback_assistant",
  "is_enabled": true,
  "org_id": "org_01J4K8M2N3P5Q7R9",
  "description": "AI-powered feedback assistant — now GA",
  "updated_at": "2026-03-26T15:00:00Z"
}
DELETE /api/v1/feature-flags/api/v1/feature-flags/:key

Remove a feature flag

Public

Response Example

{
  "success": true,
  "deleted_at": "2026-03-26T16:00:00Z"
}
POST /api/v1/feature-flags/api/v1/feature-flags/load/:orgId

Reload and cache all feature flags for a given organization

Public

Response Example

{
  "org_id": "org_01J4K8M2N3P5Q7R9",
  "flags_loaded": 12,
  "loaded_at": "2026-03-26T12:00:00Z"
}
POST /api/v1/feature-flags/api/v1/feature-flags/invalidate

Invalidate the in-memory feature flag cache

Public

Request Example

{
  "org_id": "org_01J4K8M2N3P5Q7R9"
}

Response Example

{
  "success": true,
  "invalidated_at": "2026-03-26T12:05:00Z"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}