# Reactivate a feature

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


[Idempotency Supported](/docs/api/idempotency)

Reactivates an archived feature so that **new** [entitlements](/docs/api/entitlements) or [subscription entitlements](/docs/api/subscription_entitlements) can be created towards the feature. This operation changes the [status](/docs/api/features/feature-object#status) of the feature to `active`.

### Prerequisites & Constraints

-   Only a feature in `archived` status can be reactivated.
-   Calling this endpoint on a feature that is already `active` returns it unchanged.
-   A `draft` feature cannot be reactivated using this endpoint. Use [Activate a feature](/docs/api/features/activate-a-feature) instead.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/features/fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578/reactivate_command \
     -X POST  \
     -u {site_api_key}:
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Feature.Reactivate("fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578").Request();

Feature feature = result.Feature;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    featureAction "github.com/chargebee/chargebee-go/v3/actions/feature"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := featureAction.Reactivate("fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578").Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Feature := res.Feature
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.FeatureReactivateRequest{
    Id : "fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578",
}
  res, err := client.Feature.Reactivate(req)
      if err != nil {
        fmt.Println(err)
    } else {
        Feature := res.Feature
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        Result result = Feature.reactivate("fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578").request();

        Feature feature = result.feature();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.feature.Feature;
import com.chargebee.v4.models.feature.params.FeatureReactivateParams;
import com.chargebee.v4.models.feature.responses.FeatureReactivateResponse;

public class FeatureReactivate {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        FeatureReactivateResponse response = client.features().reactivate("fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578");

        Feature feature = response.getFeature();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.feature.reactivate("fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578");

    console.log(result);
    const feature = result.feature;
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->feature()->reactivate("fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578");
$feature = $result->feature;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Feature.reactivate("fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578")
feature = response.feature
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

result = ChargeBee::Feature.reactivate("fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578")

feature = result.feature
```

## Sample Response

```json
{
  "feature": {
    "description": "Maximum user licenses allowed",
    "id": "fea-a2dbb732-c54d-4a96-aaa3-b8c0b362e578",
    "levels": [
      {
        "is_unlimited": false,
        "level": 0,
        "name": "5 Users",
        "value": "5"
      },
      {..}
    ],
    "name": "User Licenses rf",
    "object": "feature",
    "status": "active",
    "type": "quantity"
  }
}
```

## URL Format

**POST** https://[site].chargebee.com/api/v2/features/{feature-id}/reactivate_command

## Returns

- `feature` (Feature object)
  Resource object representing feature
