compute

POST /v1/compute/ssh-keys

Register a public key so a future order can install it.

All compute endpoints

Authentication

Send an API key as a bearer token. The key must carry the billing.payment.manage permission; a key without it is refused with 403, not 404.

Where your organisation id goes

This endpoint takes org_id as a query parameter. Leave it out and the call covers your whole tenancy subtree; send it to narrow the call to one organisation.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/compute/ssh-keys \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string>, "public_key": <string> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

The provider is asked **first** and our row is written from its answer. A row written optimistically and then refused by the provider is a key the customer can select in the order form and that no machine can be built with — the refusal arriving after payment. ⛔ The **public** half only. A private key is refused `422` with a sentence telling the customer to treat it as compromised and rotate it, rather than quietly stripped: somebody who has just pasted a private key needs to know they exposed it. ⛔ A key already registered on the account is `422`. Key names and fingerprints are unique account-wide at the provider, which our tenancy cannot change, so this is a collision the screen has to explain rather than hide. Requires `billing.payment.manage`.

Parameters

NameTypeRequiredWhat it is
org_id (query)UuidNo

Request body

NameTypeRequiredWhat it is
namestringYesWhat to call it. Unique within the organisation.
public_keystringYesThe **public** half — the one-line file ending `.pub`. ⛔ A private key is refused `422` with a sentence telling the customer to treat it as compromised and rotate it, rather tha…

Response

NameTypeRequiredWhat it is
idstringYesThe provider's id — what an order sends in `ssh_keys`.
namestringYesWhat the customer calls it.
fingerprintstringYesThe **provider's** fingerprint, verbatim. ⛔ Never recompute it: ours disagreeing with theirs is indistinguishable, on a screen, from the customer having uploaded the wrong key.
public_keystringYesThe public half, as registered. The private half never reaches us.

Errors this endpoint can return

401 · 403 · 422 · 429 · 503