Import and authorize an OpenSSH public key on a shared-hosting account. Get {accountId} from GET /api/v2/shared-hosting and check GET /api/v2/shared-hosting/{accountId}/ssh-keys actions.canAdd before calling. Send public key material only; never send a private key.
write:hostingconsole:services
Use Authorization: Bearer <token> for API keys. Dashboard sessions may also use hostup_session.
accountId string required
Example: acct_01hxa3b4c5d6e7f8g9h0j1k2m3 Public shared-hosting account ID from `GET /api/v2/shared-hosting` `data[].id`. Do not invent this value; use the exact ID returned by the referenced API response.
Accept Example Content-Type Example name string required
· Example: deploy-key publicKey string required
· Example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEexamplePublicKeyMaterialForDocsOnly hostup-exampl... id string required
· Example: ssh_01hxa3b4c5d6e7f8g9h0j1k2m3 name string required
· Example: deploy-key fingerprint string required
· Example: SHA256:AbCdEfGhIjKlMnOpQrStUvWxYz1234567890abcDefG imported boolean required
· Example: true authorized boolean required
· Example: true type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object https://cloud.hostup.se/api/v2/shared-hosting/{accountId}/ssh-keys curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/ssh-keys" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "deploy-key",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEexamplePublicKeyMaterialForDocsOnly hostup-example-key"
}' {
"id": "ssh_01hxa3b4c5d6e7f8g9h0j1k2m3",
"name": "deploy-key",
"fingerprint": "SHA256:AbCdEfGhIjKlMnOpQrStUvWxYz1234567890abcDefG",
"imported": true,
"authorized": true
} {
"name": "deploy-key",
"publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEexamplePublicKeyMaterialForDocsOnly hostup-example-key"
}