---
title: "Upsert a SNI"
method: PUT
path: "/v2/control-planes/{controlPlaneId}/core-entities/snis/{SNIId}"
tags: ["SNIs"]
---

# Upsert a SNI

`PUT /v2/control-planes/{controlPlaneId}/core-entities/snis/{SNIId}`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v2/control-planes/{controlPlaneId}/core-entities/snis/{SNIId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Create or Update SNI using ID or name.

## Request body

- SNI: An SNI object represents a many-to-one mapping of hostnames to a certificate. That is, a certificate object can have many hostnames associated with it; when Kong receives an SSL request, it uses the SNI field in the Client Hello to lookup the certificate object based on the SNI associated with the certificate.
  - `certificate` object, required: The id (a UUID) of the certificate with which to associate the SNI hostname. The Certificate must have a valid private key associated with it to be used by the SNI object.
    - `id` string
  - `created_at` integer, nullable: Unix epoch when the resource was created.
  - `id` string, nullable: A string representing a UUID (universally unique identifier).
  - `name` string, required: The SNI name to associate with the given certificate.
  - `tags` string[], nullable: An optional set of strings associated with the SNIs for grouping and filtering.
  - `updated_at` integer, nullable: Unix epoch when the resource was last updated.

## Response `200`

Successfully upserted SNI

- SNI: An SNI object represents a many-to-one mapping of hostnames to a certificate. That is, a certificate object can have many hostnames associated with it; when Kong receives an SSL request, it uses the SNI field in the Client Hello to lookup the certificate object based on the SNI associated with the certificate.
  - `certificate` object, required: The id (a UUID) of the certificate with which to associate the SNI hostname. The Certificate must have a valid private key associated with it to be used by the SNI object.
    - `id` string
  - `created_at` integer, nullable: Unix epoch when the resource was created.
  - `id` string, nullable: A string representing a UUID (universally unique identifier).
  - `name` string, required: The SNI name to associate with the given certificate.
  - `tags` string[], nullable: An optional set of strings associated with the SNIs for grouping and filtering.
  - `updated_at` integer, nullable: Unix epoch when the resource was last updated.

## Other responses

- `401`: Unauthorized

## Changes

- **2025-08-22** `3c0154b2053a`: 1 breaking
  - the request property `certificate` became not nullable
- **2025-08-14** `6333a0d3b095`: 1 breaking, 1 info
  - the response property `certificate` became nullable for the status `200`
  - the request property `certificate` became nullable
- **2025-07-22** `76b0fefddb0d`: 2 breaking, 1 info
  - the request property `certificate` became not nullable
  - the response property `tags` became nullable for the status `200`
  - the request property `tags` became nullable

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v2/control-planes/:controlPlaneId/core-entities/snis/:SNIId/put.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) · [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) · [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/7aab863a6daa?raw)
