> This page is for NVIDIA Infra Controller.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/infra-controller/llms.txt.

# Create DHCP Option Set

POST https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/dhcp-option-set
Content-Type: application/json

Create a DHCP Option Set for Tenant on a Registered Site. At least one boot URL or DNS server must be specified.

Org must have a Tenant entity with access to the Site. User must have authorization role with `TENANT_ADMIN` suffix.


Reference: https://docs.nvidia.com/infra-controller/rest-api-reference/api-reference/dhcp-option-set/create-dhcp-option-set

## Authentication

- `Authorization` header (bearer token, required) — ``` export JWT_BEARER_TOKEN="<jwt-bearer-token>" # Example org name: "acme-inc export ORG_NAME=<org-name> # Use the JWT bearer token in your API request auth header: curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current ```

## Request

### Path parameters

- `org` (string, required) — Name of the Org

### Body (application/json)

This endpoint expects a DhcpOptionSetCreateRequest.

- `name` (string, required) — Name of the DHCP Option Set, unique for the Tenant on the Site
- `siteId` (string, required) — ID of the Site
- `description` (string, optional, nullable) — Description of the DHCP Option Set
- `ipv4` (DhcpOptions, optional) — DHCPv4 values
- `ipv6` (DhcpOptions, optional) — DHCPv6 values
- `labels` (map from string to string, optional) — User-defined key-value labels for the DHCP Option Set

## Response

### 201

Created

- `id` (string, optional) — Unique UUID v4 identifier for the DHCP Option Set
- `name` (string, optional) — Name of the DHCP Option Set
- `description` (string, optional, nullable) — Description of the DHCP Option Set
- `siteId` (string, optional) — ID of the Site
- `site` (SiteSummary, optional) — Summary of the Site, present when requested through includeRelation
- `tenantId` (string, optional) — ID of the Tenant
- `tenant` (TenantSummary, optional) — Summary of the Tenant, present when requested through includeRelation
- `ipv4` (DhcpOptions, optional) — DHCPv4 values
- `ipv6` (DhcpOptions, optional) — DHCPv6 values
- `labels` (map from string to string, optional) — Set of labels/tags for the DHCP Option Set
- `status` (enum, optional) — Status of the DHCP Option Set
  - Allowed values: `Ready`
- `statusHistory` (list of StatusDetail, optional) — Chronological status history for the DHCP Option Set
- `created` (datetime, optional) — Date/time when the DHCP Option Set was created
- `updated` (datetime, optional) — Date/time when the DHCP Option Set was last updated

## Errors

### 400 Bad Request Error

Error response when request data cannot be validated

- `source` (string, optional) — Source of the error, taken from `api.name` in the REST API server configuration file (`/app/config.yaml` in the supplied Kubernetes deployment; default API name `nico`). This is a configurable string, for example `nico` or `carbide`
- `message` (string, optional) — Message describing the error
- `data` (NiCoApiErrorData, optional, nullable) — Additional data about the error
- `retryable` (boolean, optional) — True permits bounded retries with backoff, without guaranteeing success. False prohibits automatic retries. Omission means unclassified.

### 403 Forbidden Error

Error response when user is not authorized to call an endpoint or retrieve/modify objects

- `source` (string, optional) — Source of the error, taken from `api.name` in the REST API server configuration file (`/app/config.yaml` in the supplied Kubernetes deployment; default API name `nico`). This is a configurable string, for example `nico` or `carbide`
- `message` (string, optional) — Message describing the error
- `data` (NiCoApiErrorData, optional, nullable) — Additional data about the error
- `retryable` (boolean, optional) — True permits bounded retries with backoff, without guaranteeing success. False prohibits automatic retries. Omission means unclassified.

### 409 Conflict Error

Error response when the request conflicts with an existing resource or operation

- `source` (string, optional) — Source of the error, taken from `api.name` in the REST API server configuration file (`/app/config.yaml` in the supplied Kubernetes deployment; default API name `nico`). This is a configurable string, for example `nico` or `carbide`
- `message` (string, optional) — Message describing the error
- `data` (NiCoApiErrorData, optional, nullable) — Additional data about the error
- `retryable` (boolean, optional) — True permits bounded retries with backoff, without guaranteeing success. False prohibits automatic retries. Omission means unclassified.

### 412 Precondition Failed Error

Response when the API handler encounters an unexpected error

- `source` (string, optional) — Source of the error, taken from `api.name` in the REST API server configuration file (`/app/config.yaml` in the supplied Kubernetes deployment; default API name `nico`). This is a configurable string, for example `nico` or `carbide`
- `message` (string, optional) — Message describing the error
- `data` (NiCoApiErrorData, optional, nullable) — Additional data about the error
- `retryable` (boolean, optional) — True permits bounded retries with backoff, without guaranteeing success. False prohibits automatic retries. Omission means unclassified.

### 500 Internal Server Error

Response when the API handler encounters an unexpected error

- `source` (string, optional) — Source of the error, taken from `api.name` in the REST API server configuration file (`/app/config.yaml` in the supplied Kubernetes deployment; default API name `nico`). This is a configurable string, for example `nico` or `carbide`
- `message` (string, optional) — Message describing the error
- `data` (NiCoApiErrorData, optional, nullable) — Additional data about the error
- `retryable` (boolean, optional) — True permits bounded retries with backoff, without guaranteeing success. False prohibits automatic retries. Omission means unclassified.

### 501 Not Implemented Error

Response when the API handler encounters an unexpected error

- `source` (string, optional) — Source of the error, taken from `api.name` in the REST API server configuration file (`/app/config.yaml` in the supplied Kubernetes deployment; default API name `nico`). This is a configurable string, for example `nico` or `carbide`
- `message` (string, optional) — Message describing the error
- `data` (NiCoApiErrorData, optional, nullable) — Additional data about the error
- `retryable` (boolean, optional) — True permits bounded retries with backoff, without guaranteeing success. False prohibits automatic retries. Omission means unclassified.

## Types

### DhcpOptions

DHCP values for one IP family

- `bootUrl` (string, optional, nullable) — Boot file URL sent to hosts; must use `http` or `https`, include a host, and not contain a username or password
- `dnsServers` (list of string, optional) — DNS server addresses sent to hosts; IPv4 addresses for `ipv4`, IPv6 addresses for `ipv6`

### SiteSummary

SiteSummary contains a subset of data for Site object, used when nesting in other objects

- `id` (string, optional) — Unique UUID v4 identifier for the Site
- `name` (string, optional) — Name of the Site
- `infrastructureProviderId` (string, optional) — ID of the Infrastructure Provider that owns the Site
- `isSerialConsoleEnabled` (boolean, optional) — Indicates if Serial Console is enabled for the Site by the Provider
- `isOnline` (boolean, optional) — Indicates if the Site is currently reachable from Cloud
- `capabilities` (SiteCapabilities, optional) — Site capabilities used for feature availability and configuration
- `status` (enum, optional) — Status of the Site
  - Allowed values: `Pending`, `Registered`, `Error`

### TenantSummary

Summarizes a Tenant

- `org` (string, optional) — Name of the org this tenant belongs to
- `orgDisplayName` (string, optional, nullable) — Display name of the org the Tenant belongs to
- `capabilities` (TenantCapabilities, optional) — Deprecated compatibility object. The targetedInstanceCreation property is omitted; use Tenant Account siteCapabilities for the authoritative configuration.
- `deprecations` (list of Deprecation, optional) — Deprecation notices for Tenant fields

### StatusDetail

Describes the details of a status transition for a resource

- `status` (string, optional) — State of the associated entity at a particular time
- `message` (string, optional, nullable) — Description of the state and cause/remedy in case of error
- `created` (datetime, optional) — Date/time when the associated entity assumed the status
- `updated` (datetime, optional) — Date/time when the associated entity was last observed with this status

### NiCoApiErrorData

Additional data about the error

### SiteCapabilities

Boolean flags to indicate features supported by a Site

- `nativeNetworking` (boolean, optional) — Whether the Site supports native networking
- `networkSecurityGroup` (boolean, optional) — Whether the Site supports Network Security Groups
- `nvLinkPartition` (boolean, optional) — Whether the latest successfully stored Site configuration inventory reports that NVLink partitioning is enabled in the Site's Core configuration. False also represents a new Site that has not reported Site configuration inventory yet. An inventory report from an older Core that omits the setting leaves the stored value unchanged. This value is managed by Site configuration inventory and cannot be updated through the Site API.
- `flow` (boolean, optional) — Whether the Site supports Flow-based operations
- `imageBasedOperatingSystem` (boolean, optional) — Whether the Site supports image-based operating system provisioning
- `vpcSlaac` (boolean, optional) — Whether the latest successfully stored Site configuration inventory reports that Core supports VPCs with SLAAC enabled. False also represents a missing Site configuration or an inventory report that omits the capability. This value is managed by Site configuration inventory and cannot be updated through the Site API.
- `dpsPowerManagement` (boolean, optional, default: false) — Whether this Site accepts non-empty power resource groups and power profiles for DPS power management. When false, omission and explicit clearing remain allowed.

### TenantCapabilities

Deprecated tenant-wide capability summary. TargetedInstanceCreation is no longer stored on the Tenant entity; it is configured on Tenant Account `siteCapabilities` (and may be overridden per Site via Tenant Site configuration). On GET `/tenant/current`, `targetedInstanceCreation` is present and `true` only when the Tenant has at least one Ready Tenant Account, every Ready Tenant Account has the capability enabled by default, and no Tenant Site explicitly disables it. Otherwise the property is omitted. Embedded `TenantSummary.capabilities` objects in nested resources also omit the property.

- `targetedInstanceCreation` (boolean, optional, deprecated) — Deprecated in favor of TenantAccount.siteCapabilities. On GET `/tenant/current`, the property is present and true only when every Ready Tenant Account enables TargetedInstanceCreation and no Tenant Site explicitly disables it; otherwise it is omitted. It is also omitted from embedded TenantSummary objects.

### Deprecation

Details of a particular deprecation in NVIDIA Infra Controller (NICo) API

- `attribute` (string, optional, nullable) — Name of the attribute that is deprecated. Omitted if queryParam or endpoint is being deprecated.
- `queryParam` (string, optional, nullable) — Query parameter that is deprecated. Omitted if attribute or endpoint is being deprecated.
- `endpoint` (string, optional, nullable) — API endpoint that is deprecated. Omitted if attribute or queryParam is being deprecated.
- `replacedBy` (string, optional, nullable) — Name of the attribute, query parameter, or endpoint that replaces the deprecated item. Omitted if no replacement is available.
- `takeActionBy` (datetime, optional) — Date/time by which clients should migrate away from the deprecated API surface
- `notice` (string, optional) — Message describing the deprecation

## Examples

**Request**

```json
{
  "name": "pxe-boot",
  "siteId": "56f1a3ed-3653-454f-b861-9136207be660",
  "description": "Provider-managed PXE boot",
  "ipv4": {
    "bootUrl": "http://10.0.0.5/boot.ipxe",
    "dnsServers": [
      "10.0.0.53"
    ]
  },
  "ipv6": {
    "dnsServers": [
      "fd00::53"
    ]
  },
  "labels": {
    "team": "infra"
  }
}
```

**Response**

```json
{
  "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "name": "pxe-boot",
  "description": "Provider-managed PXE boot",
  "siteId": "56f1a3ed-3653-454f-b861-9136207be660",
  "tenantId": "79595ebe-934f-4f19-bc74-c16aefd0c57a",
  "ipv4": {
    "bootUrl": "http://10.0.0.5/boot.ipxe",
    "dnsServers": [
      "10.0.0.53"
    ]
  },
  "ipv6": {
    "bootUrl": null,
    "dnsServers": [
      "fd00::53"
    ]
  },
  "labels": {
    "team": "infra"
  },
  "status": "Ready",
  "statusHistory": [
    {
      "status": "Ready",
      "message": "DHCP Option Set was created on Site",
      "created": "2026-11-17T10:12:44.862879Z",
      "updated": "2026-11-17T10:12:44.862879Z"
    }
  ],
  "created": "2026-11-17T10:12:44.861317Z",
  "updated": "2026-11-17T10:12:44.861317Z"
}
```

**SDK Code**

```python
import requests

url = "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/dhcp-option-set"

payload = {
    "name": "pxe-boot",
    "siteId": "56f1a3ed-3653-454f-b861-9136207be660",
    "description": "Provider-managed PXE boot",
    "ipv4": {
        "bootUrl": "http://10.0.0.5/boot.ipxe",
        "dnsServers": ["10.0.0.53"]
    },
    "ipv6": { "dnsServers": ["fd00::53"] },
    "labels": { "team": "infra" }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/dhcp-option-set';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"pxe-boot","siteId":"56f1a3ed-3653-454f-b861-9136207be660","description":"Provider-managed PXE boot","ipv4":{"bootUrl":"http://10.0.0.5/boot.ipxe","dnsServers":["10.0.0.53"]},"ipv6":{"dnsServers":["fd00::53"]},"labels":{"team":"infra"}}'
};

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://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/dhcp-option-set"

	payload := strings.NewReader("{\n  \"name\": \"pxe-boot\",\n  \"siteId\": \"56f1a3ed-3653-454f-b861-9136207be660\",\n  \"description\": \"Provider-managed PXE boot\",\n  \"ipv4\": {\n    \"bootUrl\": \"http://10.0.0.5/boot.ipxe\",\n    \"dnsServers\": [\n      \"10.0.0.53\"\n    ]\n  },\n  \"ipv6\": {\n    \"dnsServers\": [\n      \"fd00::53\"\n    ]\n  },\n  \"labels\": {\n    \"team\": \"infra\"\n  }\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/dhcp-option-set")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"pxe-boot\",\n  \"siteId\": \"56f1a3ed-3653-454f-b861-9136207be660\",\n  \"description\": \"Provider-managed PXE boot\",\n  \"ipv4\": {\n    \"bootUrl\": \"http://10.0.0.5/boot.ipxe\",\n    \"dnsServers\": [\n      \"10.0.0.53\"\n    ]\n  },\n  \"ipv6\": {\n    \"dnsServers\": [\n      \"fd00::53\"\n    ]\n  },\n  \"labels\": {\n    \"team\": \"infra\"\n  }\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://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/dhcp-option-set")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"pxe-boot\",\n  \"siteId\": \"56f1a3ed-3653-454f-b861-9136207be660\",\n  \"description\": \"Provider-managed PXE boot\",\n  \"ipv4\": {\n    \"bootUrl\": \"http://10.0.0.5/boot.ipxe\",\n    \"dnsServers\": [\n      \"10.0.0.53\"\n    ]\n  },\n  \"ipv6\": {\n    \"dnsServers\": [\n      \"fd00::53\"\n    ]\n  },\n  \"labels\": {\n    \"team\": \"infra\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/dhcp-option-set', [
  'body' => '{
  "name": "pxe-boot",
  "siteId": "56f1a3ed-3653-454f-b861-9136207be660",
  "description": "Provider-managed PXE boot",
  "ipv4": {
    "bootUrl": "http://10.0.0.5/boot.ipxe",
    "dnsServers": [
      "10.0.0.53"
    ]
  },
  "ipv6": {
    "dnsServers": [
      "fd00::53"
    ]
  },
  "labels": {
    "team": "infra"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/dhcp-option-set");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"pxe-boot\",\n  \"siteId\": \"56f1a3ed-3653-454f-b861-9136207be660\",\n  \"description\": \"Provider-managed PXE boot\",\n  \"ipv4\": {\n    \"bootUrl\": \"http://10.0.0.5/boot.ipxe\",\n    \"dnsServers\": [\n      \"10.0.0.53\"\n    ]\n  },\n  \"ipv6\": {\n    \"dnsServers\": [\n      \"fd00::53\"\n    ]\n  },\n  \"labels\": {\n    \"team\": \"infra\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "pxe-boot",
  "siteId": "56f1a3ed-3653-454f-b861-9136207be660",
  "description": "Provider-managed PXE boot",
  "ipv4": [
    "bootUrl": "http://10.0.0.5/boot.ipxe",
    "dnsServers": ["10.0.0.53"]
  ],
  "ipv6": ["dnsServers": ["fd00::53"]],
  "labels": ["team": "infra"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://nico-rest-api.nico.svc.cluster.local/v2/org/org/nico/dhcp-option-set")! 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()
```