---
title: "Create Feature"
method: POST
path: "/resources/features/v2"
tags: ["Features"]
---

# Create Feature

`POST /resources/features/v2`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/features/v2`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/features/v2/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new feature

## Request body

- CreateFeatureDtoV2
  - `name` string, required: String representing the feature name
  - `key` string, required: String representing the feature key
  - `description` string: Feature description
  - `permissions` PermissionDto[]: Array of permissions linked to a feature
    - `permissionKey` string: Permission key
    - `permissionId` string: Permission identifier
  - `metadata` string: JSON String

## Response `200`

- FeatureDto
  - `id` string, required: UUID string representing the feature ID
  - `vendorId` string, required: UUID string representing the vendor ID
  - `name` string, required: String representing the feature name
  - `key` string, required: String representing the feature key
  - `metadata` object, required: JSON String
  - `description` string: Feature description
  - `createdAt` string, required: Date when a feature was created
  - `updatedAt` string: Date when a feature was last updated
  - `permissions` string[]: Array of permissions linked to a feature
  - `featureFlag` FeatureFlagDtoThin
    - `id` string: UUID string that represents the feature flag ID
    - `name` string: String that represent the feature flag name
    - `on` boolean: Boolean indicating whether the feature flag is on
    - `offTreatment` 'true' | 'false': Enum that represents the treatment in case feature flag is off
    - `defaultTreatment` 'true' | 'false': Enum that represents the default treatment
    - `description` string: String the represents the feature flag description
    - `updatedAt` string, date-time: Date when feature flag was created
    - `createdAt` string, date-time: Date when feature flag was last updated

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
