---
title: "PUT /gateway/v2/alias-topic"
method: PUT
path: "/gateway/v2/alias-topic"
tags: ["cli_alias-topic_gateway_v2_8"]
---

# PUT /gateway/v2/alias-topic

`PUT /gateway/v2/alias-topic`

## Request

- Base URL: `https://developers.conduktor.io` (the document declares no server; this is the origin it was published from)
- URL: `https://developers.conduktor.io/gateway/v2/alias-topic`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/conduktor/apis/conduktor-gateway-api/docs/gateway/v2/alias-topic/put.ts> (a function with typed inputs; its response is checked against the schema)

[![Generally Available](https://img.shields.io/badge/Lifecycle-Generally%20Available-blue)](#tag/Versioning)

Upsert an alias topic in a virtual cluster

## Query parameters

- `dryMode` boolean

## Request body

- AliasTopic
  - `kind` string, required: The kind of the alias topic
  - `apiVersion` string, required: The api version of the alias topic
  - `metadata` AliasTopicMetadata, required: The metadata of the alias topic
    - `name` string, ^[a-zA-Z0-9._-]+$, required: The name of the alias topic
    - `vCluster` string, ^[a-zA-Z0-9._-]+$: The virtual cluster of the alias topic (default: `passthrough`)
  - `spec` AliasTopicSpec, required: The specification of the alias topic
    - `physicalName` string, ^[a-zA-Z0-9._-]+$, required: The physical name of the alias topic
    - `physicalCluster` string: The physical kafka cluster hosting the physical topic. The field is optional and only useful for alias topics referencing __Partner__ virtual clusters. For alias topics linked to virtual clusters of type __Standard__, the physical cluster can only be "main" (automatically set to "main" if the field is missing). The physical cluster must be one of the configured list of physical clusters of the gateway.

## Response `200`

- ApplyResultAliasTopic
  - `resource` AliasTopic, required
    - `kind` string, required: The kind of the alias topic
    - `apiVersion` string, required: The api version of the alias topic
    - `metadata` AliasTopicMetadata, required: The metadata of the alias topic
      - `name` string, ^[a-zA-Z0-9._-]+$, required: The name of the alias topic
      - `vCluster` string, ^[a-zA-Z0-9._-]+$: The virtual cluster of the alias topic (default: `passthrough`)
    - `spec` AliasTopicSpec, required: The specification of the alias topic
      - `physicalName` string, ^[a-zA-Z0-9._-]+$, required: The physical name of the alias topic
      - `physicalCluster` string: The physical kafka cluster hosting the physical topic. The field is optional and only useful for alias topics referencing __Partner__ virtual clusters. For alias topics linked to virtual clusters of type __Standard__, the physical cluster can only be "main" (automatically set to "main" if the field is missing). The physical cluster must be one of the configured list of physical clusters of the gateway.
  - `upsertResult` 'Created' | 'NotChanged' | 'Updated', required: The result of the upsert operation (created, updated, not changed)

## Other responses

- `400`: The request is not valid
- `401`: The given credentials are not valid
- `403`: The required feature is not included in the current license
- `404`: The given virtual cluster or physical topic does not exist
- `409`: The virtual cluster is of type Standard and does not target main physical cluster The virtual cluster is of type Partner and does not target a valid physical cluster The physical cluster of an alias topic cannot be changed
- `500`: An unexpected error occurred in the server

---

[API](https://skmtc.dev/conduktor/apis/conduktor-gateway-api.md) - [All operations](https://skmtc.dev/conduktor/apis/conduktor-gateway-api/llms.txt) - [OpenAPI document](https://skmtc.dev/conduktor/apis/conduktor-gateway-api/revisions/73ad742aa630?raw)
