> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://virtuous.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://virtuous.ferndocs.com/_mcp/server.

# Create a new premium.

POST https://prod-api.raisedonors.com/api/Premium
Content-Type: application/json

Reference: https://virtuous.ferndocs.com/reference/raise/premium/createpremium

## Authentication

- `Authorization` header (required) — JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer \{token}"

## Request

### Body (application/json)

This endpoint expects a PremiumRequest.

- `name` (string, required)
- `code` (string, required)
- `nameShort` (string, optional, nullable)
- `description` (string, optional, nullable) — Gets or sets the description.
- `price` (double, optional)
- `fairMarketValue` (double, optional)
- `digitalUrl` (string, optional, nullable) — Gets or sets the digital URL.
- `isActive` (boolean, optional) — Gets or sets a value indicating whether active.
- `isFree` (boolean, optional) — Gets or sets a value indicating whether free.
- `inventory` (integer, optional, nullable) — Gets or sets the inventory.
- `keepActiveWhenHasNoInventory` (boolean, optional) — Gets or sets the keep active when has no inventory.
- `recurringPremiumId` (long, optional, nullable) — Gets or sets the recurringpremium identifier.
- `projectId` (long, optional, nullable) — Gets or sets the project identifier.
- `image` (string, optional, nullable) — Gets or sets the image.
- `externalIdentifier` (string, optional, nullable) — Gets or sets the external identifier.
- `otherMinimumAmounts` (list of PremiumAmount, optional, nullable) — Gets or sets the other minimum amounts.

## Response

### 200

OK

- `id` (long, optional) — Gets or sets the identifier.
- `currency` (string, optional, nullable) — Gets or sets the currency.
- `name` (string, optional, nullable) — Gets or sets the name.
- `nameShort` (string, optional, nullable) — Gets or sets the name short.
- `code` (string, optional, nullable) — Gets or sets the code.
- `description` (string, optional, nullable) — Gets or sets the description.
- `isActive` (boolean, optional) — Gets or sets a value indicating whether active.
- `price` (double, optional) — Gets or sets the price.
- `formattedPrice` (string, optional, nullable)
- `fairMarketValue` (double, optional, nullable) — Gets or sets the fair market value.
- `formattedFairMarketValue` (string, optional, nullable)
- `inventory` (integer, optional, nullable) — Gets or sets the inventory.
- `keepActiveWhenHasNoInventory` (boolean, optional) — Gets or sets the keep active when has no inventory.
- `recurringPremiumId` (long, optional, nullable) — Gets or sets the recurringpremium identifier.
- `recurringPremiumName` (string, optional, nullable) — Gets or sets the recurringpremium name.
- `image` (string, optional, nullable) — Gets or sets the image.
- `externalIdentifier` (string, optional, nullable) — Gets or sets the external identifier.
- `otherMinimumAmounts` (list of PremiumAmount, optional, nullable) — Gets or sets the other minimum amounts.

## Errors

### 400 Bad Request Error

Bad Request

- `Premium_CreatePremiumRequestBadRequestError`
  - ProblemDetails: ProblemDetails
  - HttpValidationProblemDetails: HttpValidationProblemDetails

## Types

### PremiumAmount

- `currency` (string, optional, nullable)
- `value` (double, optional)

### ProblemDetails

- `type` (string, optional, nullable)
- `title` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `detail` (string, optional, nullable)
- `instance` (string, optional, nullable)

### HttpValidationProblemDetails

- `detail` (string, optional, nullable)
- `errors` (map from string to list of string, optional, nullable)
- `instance` (string, optional, nullable)
- `status` (integer, optional, nullable)
- `title` (string, optional, nullable)
- `type` (string, optional, nullable)

## Examples

**Request**

```json
{
  "name": "Eco-Friendly Water Bottle",
  "code": "ECO-WB-2024"
}
```

**Response**

```json
{
  "id": 1024,
  "currency": "USD",
  "name": "Eco-Friendly Water Bottle",
  "nameShort": "Eco Bottle",
  "code": "ECO-WB-2024",
  "description": "A reusable water bottle made from sustainable materials, perfect for everyday use.",
  "isActive": true,
  "price": 25.99,
  "formattedPrice": "$25.99",
  "fairMarketValue": 30,
  "formattedFairMarketValue": "$30.00",
  "inventory": 150,
  "keepActiveWhenHasNoInventory": false,
  "recurringPremiumId": 2001,
  "recurringPremiumName": "Monthly Eco Kit",
  "image": "https://cdn.raisedonors.com/images/premiums/eco-bottle.png",
  "externalIdentifier": "SKU-EB-2024",
  "otherMinimumAmounts": [
    {
      "currency": "EUR",
      "value": 23.5
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://prod-api.raisedonors.com/api/Premium"

payload = {
    "name": "Eco-Friendly Water Bottle",
    "code": "ECO-WB-2024"
}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://prod-api.raisedonors.com/api/Premium';
const options = {
  method: 'POST',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"Eco-Friendly Water Bottle","code":"ECO-WB-2024"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://prod-api.raisedonors.com/api/Premium"

	payload := strings.NewReader("{\n  \"name\": \"Eco-Friendly Water Bottle\",\n  \"code\": \"ECO-WB-2024\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://prod-api.raisedonors.com/api/Premium")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Eco-Friendly Water Bottle\",\n  \"code\": \"ECO-WB-2024\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://prod-api.raisedonors.com/api/Premium")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Eco-Friendly Water Bottle\",\n  \"code\": \"ECO-WB-2024\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://prod-api.raisedonors.com/api/Premium', [
  'body' => '{
  "name": "Eco-Friendly Water Bottle",
  "code": "ECO-WB-2024"
}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://prod-api.raisedonors.com/api/Premium");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Eco-Friendly Water Bottle\",\n  \"code\": \"ECO-WB-2024\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Eco-Friendly Water Bottle",
  "code": "ECO-WB-2024"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://prod-api.raisedonors.com/api/Premium")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```