Feature Flags

Create Feature Flag

POST
/v0/project/{idOrSlug}/feature-flags

Authorization

apiKeyAuth
x-api-key<token>

FastStats API key. Pass it in the x-api-key header or as a Bearer token in the Authorization header.

In: header

Path Parameters

idOrSlug*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v0/project/string/feature-flags" \  -H "Content-Type: application/json" \  -d '{    "key": "string",    "name": "string",    "type": "boolean"  }'
{  "id": "string",  "projectId": "string",  "key": "string",  "name": "string",  "description": "string",  "type": "boolean",  "enabled": true,  "archivedAt": "string",  "version": 0,  "variants": [    {      "key": "string",      "name": "string",      "value": "string"    }  ],  "offVariant": "string",  "fallthrough": {    "variant": "string",    "rollout": [      {        "variant": "string",        "weight": 0      }    ]  },  "rules": [    {      "id": "string",      "name": "string",      "conditions": [        {          "attribute": "string",          "operator": "equals",          "values": [            "string"          ]        }      ],      "serve": {        "variant": "string",        "rollout": [          {            "variant": "string",            "weight": 0          }        ]      }    }  ],  "targets": [    {      "kind": "identifier",      "value": "string",      "variant": "string"    }  ],  "prerequisites": [    {      "flagKey": "string",      "variant": "string"    }  ],  "createdAt": "string",  "updatedAt": "string"}