# Register an SSH key

Collection: api
Human docs: https://zei.sh/docs/api

Register a public key for future sandbox access.

POST /public/ssh-keys
Permission: MACHINE_UPDATE.
Register the public half of a key before creating a sandbox or sync it into an existing runtime.
Request body: {"name":"workstation","publicKey":"ssh-ed25519 AAAA..."}
Response: The created key with id, name, publicKey, isManaged, and createdAt.

Example:

```
curl -X POST https://api.zei.sh/api/v1/public/ssh-keys \
  -H "X-API-Key: $ZEISH_API_KEY"
  -H "Content-Type: application/json" \
  -d '{"name":"workstation","publicKey":"ssh-ed25519 AAAA..."}'
```
