Featureflags
Create a new featureflag
Create a new featureflag with the provided details
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://demo.kaiten.sh/feature-flags" \ -H "Content-Type: application/json" \ -d '{ "default_variant": { "type": "basic", "value": "string" }, "description": "This is a new feature flag", "enabled": true, "event_name": "feature_flag_event", "metadata": { "property1": null, "property2": null }, "name": "New Feature", "targetings": [ { "name": "Targeting Rule 1", "rule": "user.group == \'beta\'", "type": "basic", "variant": "string" } ], "type": "boolean", "variants": [ { "description": "string", "name": "string", "value": null } ] }'{
"default_variant": {
"type": "basic",
"value": "string"
},
"description": "This is a new feature flag",
"enabled": true,
"event_name": "feature_flag_event",
"id": "123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"property1": null,
"property2": null
},
"name": "New Feature",
"slug": "new-feature",
"targetings": [
{
"name": "Targeting Rule 1",
"rule": "user.group == 'beta'",
"type": "basic",
"variant": "string"
}
],
"type": "boolean",
"variants": [
{
"description": "string",
"name": "string",
"value": null
}
]
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}
