Update Feature
Update an existing feature definition. All fields are optional. Updating the slug will cascade to all planFeatures and subscriptionFeatures. Updating the featureValue will cascade to planFeatures and subscription features with source='plan' (not overrides). The featureType is automatically updated based on the new featureValue type.
Authorization
bearerAuth Use your secret API key as the bearer token
In: header
Path Parameters
Feature ID (e.g., feat_Lo4xGg1Yk9pB2eWv3sNtA)
^feat_[A-Za-z0-9]{22}$Request Body
application/json
Updated slug. Will cascade to planFeatures and subscriptionFeatures.
^[a-z0-9-]+$3 <= length <= 50Updated display name
Updated description
Updated feature value. Will cascade to planFeatures and subscription features with source='plan'.
Updated override flag
Replace all attached metrics with this list. Removes existing associations first.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.getlumen.dev/v1/features/feat_Lo4xGg1Yk9pB2eWv3sNtA" \ -H "Content-Type: application/json" \ -d '{ "featureValue": 20000 }'{
"feature": {
"id": "feat_Lo4xGg1Yk9pB2eWv3sNtA",
"merchantId": "mer_abc123def456ghi789jkl",
"slug": "max-api-calls-v2",
"displayName": "Max API Calls (v2)",
"description": "Updated API call limit",
"featureType": "number",
"featureValue": 50000,
"isOverrideFeature": false,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:00:00Z",
"deletedAt": null
},
"metricIds": [
{
"id": "met_DQ6f7a8b9c0d1e2f3g4h5i",
"name": "API Calls",
"description": "Count of API calls",
"queryType": "simple",
"eventName": "api-call",
"aggregationType": "COUNT",
"valueType": "NUMERIC"
}
]
}{
"error": "Slug must contain only lowercase letters, numbers, and hyphens"
}{
"error": "Feature not found"
}{
"error": "Feature with this slug already exists"
}{
"error": "Failed to update feature"
}