Skip to main content
POST
Add an account SSH public key

Authorizations

Authorization
string
header
required

Personal API token, sent as Authorization: Bearer <SANDYWP_API_KEY>. Obtain one from the dashboard account menu (API keys), sandywp auth login, or POST /api/account/tokens. A missing or invalid token returns 401 auth_required. Scoped OAuth tokens are limited to the Imports family and GET /api/account/me; see the top-level conventions.

Body

application/json
publicKey
string
required

OpenSSH authorized-keys public key line.

label
string
Maximum string length: 100
expiresInDays
integer

Optional expiry, subject to the account's server-side maximum.

Required range: 1 <= x <= 3650

Response

The registered or reactivated key.

key
object
required

An owner-facing SSH public-key record. No private key is returned or stored.