---
title: "Exchange"
method: POST
path: "/auth/exchange"
---

# Exchange

`POST /auth/exchange`

## Request

- Base URL: `https://api.goodeye.dev/v1`
- URL: `https://api.goodeye.dev/v1/auth/exchange`
- Auth: none declared

Rotate the caller's host-scoped CLI key and return the new plaintext.

Revokes every live key named ``cli-{hostname}`` or
``cli-{hostname}-{suffix}`` for this user, then mints a fresh one.

## Request body

- ExchangeIn
  - `hostname` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/goodeye/apis/goodeye-api.md) · [All operations](https://skmtc.dev/goodeye/apis/goodeye-api/llms.txt) · [OpenAPI document](https://skmtc.dev/goodeye/apis/goodeye-api/revisions/547cb8bb6ede?raw)
