# Create feature

Create a new feature with a unique name and key, optional description, and associated permissions.

Endpoint: POST /resources/features/v1
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `name` (string, required)
    String representing the feature name
    Example: Test Feature

  - `key` (string, required)
    String representing the feature key
    Example: test-feature

  - `description` (string)
    Feature description
    Example: This is a test feature

  - `permissions` (array)
    Array of permissions linked to a feature
    Example: ["permission.read","permission.write"]

## Response 200 fields (application/json):

  - `id` (string, required)
    UUID string representing the feature ID
    Example: e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3

  - `vendorId` (string, required)
    UUID string representing the vendor ID
    Example: e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3

  - `name` (string, required)
    String representing the feature name
    Example: Test Feature

  - `key` (string, required)
    String representing the feature key
    Example: test-feature

  - `metadata` (object, required)
    JSON String
    Example: { "some-key": "some-value" }

  - `description` (string)
    Feature description
    Example: This is a test feature

  - `createdAt` (string, required)
    Date when a feature was created
    Example: 2022-01-01T00:00:00

  - `updatedAt` (string)
    Date when a feature was last updated
    Example: 2022-01-01T00:00:00

  - `permissions` (array)
    Array of permissions linked to a feature
    Example: ["permission.read","permission.write"]

  - `featureFlag` (object)
    Related Feature-Flag

  - `featureFlag.id` (string)
    UUID string that represents the feature flag ID
    Example: e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3

  - `featureFlag.name` (string)
    String that represent the feature flag name
    Example: Test Feature Flag

  - `featureFlag.on` (boolean)
    Boolean indicating whether the feature flag is on
    Example: true

  - `featureFlag.offTreatment` (string)
    Enum that represents the treatment in case feature flag is off
    Enum: "true", "false"

  - `featureFlag.defaultTreatment` (string)
    Enum that represents the default treatment
    Enum: "true", "false"

  - `featureFlag.description` (string)
    String the represents the feature flag description
    Example: This is a test feature flag

  - `featureFlag.updatedAt` (string)
    Date when feature flag was created
    Example: 2022-01-01T00:00:00

  - `featureFlag.createdAt` (string)
    Date when feature flag was last updated
    Example: 2022-01-01T00:00:00

