# POST /move/test

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the move group.

Test the source server for a move

- Who may call it: administrator
- Token scope, any of: users, all
- Answers: 200 OK

Connects over SSH as root to the server configured in move.source_host and move.source_port. UrbeStack uses its SSH key for moves and generates it if needed. The response is returned in source.

Set look to true to inspect the connection without running remote commands or recording the host key. The response includes the host key type and SHA256 fingerprint, the SSH software version announced by the source, and how the source authorized UrbeStack's key for root. Verify the fingerprint against the output of ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on the source server.

Send the verified fingerprint in pin to record the host key and run the test. UrbeStack replaces any previously recorded key only if the presented key matches the fingerprint. A mismatch returns 409. With look omitted or false and pin omitted, the test uses the recorded host key. If no key is recorded, it returns 409 and directs you to use look and pin.

The test identifies the source control panel and its version. It checks for move support on UrbeStack sources and uses the control panel's version tool on supported third-party sources. Subsequent operations use the third-party control panel's own tools to list, copy, and cut over accounts without installing software on the source. A successful test records the source kind in move.source_kind and the IP addresses the source uses to send mail for use by the spam filter.

An unsupported control panel returns 409 with the path of the marker file found. For a plain version file whose name ends in version or version.txt, the error also includes the first line, limited to 120 characters. If no control panel is found, the test returns 409 with the operating system reported by /etc/os-release and the web server version if the web server responds. An UrbeStack source must run a version between the first release with move support and the destination's version, inclusive. A version outside that range returns 409 and reports both servers' versions.

Returns 502 with the SSH error if the source presents a changed host key, rejects UrbeStack's key, or fails to respond. To replace a changed host key, call DELETE /move/host-key, verify the new fingerprint with look, then submit it in pin.

Returns 400 if no source is configured, look is true and pin is supplied, or pin has an invalid format. Requires a token with the users scope. Returns 403 if the caller lacks administrator privileges.

## As a command

- [urbestack-move-test](https://urbestack.com/docs/commands/urbestack-move-test.md): Tests whether the server configured in move.source_host and move.source_port can serve as a move source.

## Request body

JSON.

- `look` (boolean): Set to true to inspect the source server's SSH host key without recording it.
- `pin` (string, up to 60 characters): Verified SSH host key fingerprint returned by look, used to record the key and run the test. Use the SHA256: prefix followed by 40 to 48 characters drawn from A-Z, a-z, 0-9, +, /, and =.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X POST "$API/move/test" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "look": true,
    "pin": "text"
  }'
```

Response, 200 OK:

```
{
  "source": {}
}
```

## Errors

- 400: --look, --pin and --recorded-only exclude each other
- 400: Name the source server first: its address and SSH port
- 400: look and pin exclude each other
- 400: pin is the SHA256 fingerprint the look answered
- 401: Authentication required
- 403: Insufficient privileges
- 409: The host key of <s.host> is not recorded yet: look at the key it presents (the test's look), compare it with
