---
title: "Replace an organization host"
method: PUT
path: "/api/v0beta1/hosts/{id}"
tags: ["Hosts"]
---

# Replace an organization host

`PUT /api/v0beta1/hosts/{id}`

## Request

- Base URL: `https://app.amika.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://app.amika.dev/api/v0beta1/hosts/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `wos-session`

hostname is required. Omit secret to keep the stored credential; omit url to keep the stored URL, or send it as null to clear it; omit sizes to keep the stored sizes, or send {} to clear them.

## Path parameters

- `id` string, required

## Request body

- ReplaceHostRequest
  - `hostname` string, required
  - `url` string, uri, nullable
  - `secret` string
  - `sizes` object
  - `transport_mode` 'listen' | 'tunnel'

## Response `200`

Updated host. The secret value is never returned.

- Host
  - `id` string, required
  - `hostname` string, required
  - `url` string, nullable, required
  - `org_id` string, required
  - `sizes` object, required
  - `transport_mode` 'listen' | 'tunnel', required
  - `created_at` union, required
    - string
    - string, date-time
  - `updated_at` union, required
    - string
    - string, date-time

## Other responses

- `400`: Error
- `401`: Error
- `403`: Error
- `404`: Error
- `409`: Error

## Changes

- **2026-10-23** `c46868fd7b41`: 2 info
  - added the new optional request property `transport_mode`
  - added the required property `transport_mode` to the response with the `200` status
- **2026-10-03** `a122301d00e0`: 1 breaking, 1 info
  - added the pattern `^[\x21-\x7e]{32,}$` to the request property `secret`
  - the `secret` request property's minLength was decreased from `1` to `0`
- **2026-09-30** `f9bd53246a8c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/amika/apis/amika-api/changes/api/v0beta1/hosts/:id/put.md)

---

[API](https://skmtc.dev/amika/apis/amika-api.md) - [All operations](https://skmtc.dev/amika/apis/amika-api/llms.txt) - [OpenAPI document](https://skmtc.dev/amika/apis/amika-api/revisions/86f031a957c1?raw)
