---
title: "POST /settings/relay-probe"
method: POST
path: "/settings/relay-probe"
tags: ["settings"]
---

# POST /settings/relay-probe

`POST /settings/relay-probe`

Probes a candidate relay URL for reachability. An optional one-time access
token is used only for this probe and is never persisted. A probe
that fails to reach the relay is a NORMAL categorized outcome returned 200
(mirrors the Tauri command contract) — only a missing relay-diagnostic
adapter (server misconfiguration) becomes a 500 `ApiError`.

## Request body

- RelayProbeRequestDto — Request body for `POST /settings/relay-probe`.
  - `credential` union, required
    - object
      - `mode` 'stored', required
    - object
      - `mode` 'none', required
    - object
      - `accessToken` string, required
      - `mode` 'override', required
  - `url` string, required — Candidate relay URL to probe. Not persisted; the probe is repeatable.

## Response `200`

Relay probe outcome (reachable or a categorized failure)

- RelayProbeOutcomeEnvelope — Canonical success envelope: `{ "data": T, "ts": <unix millis i64> }`. `ts` is `chrono::Utc::now().timestamp_millis()`, set in the webserver handler via [`ApiEnvelope::now`] (the contract carries only the type + the clock helper, not a hard dependency on when the handler reads the clock). `rename_all = "camelCase"` is a no-op for the single-word fields here but is declared for forward-compat. IMPORTANT (utoipa v4): every concrete `ApiEnvelope<X>` that needs a named OpenAPI component is declared in the `#[aliases(...)]` block below. Add a new alias line whenever a new payload type needs enveloping. NEVER register the bare `ApiEnvelope` in `components(schemas(...))` — utoipa errors on a bare generic, and an un-aliased generic inlines an anonymous schema.
  - `data` union, required — Outcome of a relay reachability probe (`POST /settings/relay-probe`). Mirrors the desktop `RelayProbeOutcome` Tauri DTO: a probe that fails to reach the relay is a NORMAL categorized outcome (returned 200), not an HTTP error — the daemon is healthy, the *relay* is the subject under test. Only a missing relay-diagnostic adapter (server misconfiguration) surfaces as an `ApiError`. The frontend selects user-facing copy off the `tag`.
    - object — Relay reachable; carries end-to-end round-trip latency.
      - `latencyMs` integer, required
      - `tag` 'success', required
    - object — The supplied URL is not a valid relay URL.
      - `message` string, required
      - `tag` 'invalidUrl', required
    - object — DNS resolution of the relay host failed.
      - `message` string, required
      - `tag` 'dns', required
    - object — TLS handshake with the relay failed.
      - `message` string, required
      - `tag` 'tls', required
    - object — Relay-protocol handshake failed after TLS.
      - `message` string, required
      - `tag` 'handshake', required
    - object
      - `tag` 'timeout', required
    - object — Any other categorized probe failure.
      - `message` string, required
      - `tag` 'other', required
  - `ts` integer, required — Server time when the response was built (unix epoch milliseconds).

## Other responses

- `500` — Relay-diagnostic internal error
- `503` — Relay-diagnostic adapter unavailable

---

[API](https://skmtc.net/uniclipboard/apis/uniclipboard-daemon-api.md) · [All operations](https://skmtc.net/uniclipboard/apis/uniclipboard-daemon-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/uniclipboard/uniclipboard-daemon-api/versions/a5d29889448a/schema)
