Skip to main content
POST
Add an SSH key to a reservation

Overview

Adds a public key to every node of a reservation; the write behind morph compute keys add. The key is returned as applying. Added before the nodes are handed over, it goes on with the handover. Organization keys require an organization admin.

Authorizations

Authorization
string
header
required

Morph API key, passed as Authorization: Bearer sk-.... Create keys at https://www.morphllm.com/dashboard/api-keys.

Path Parameters

id
string<uuid>
required

Identifies the reservation that gets the key. Id of the reservation to add the key to.

Example:

"b81f2c40-7d9e-4a35-9c16-3f5a8e0d2b74"

Body

application/json

The key and a name for it.

An SSH public key and its name.

name
string
required

A name for the key, up to 64 characters.

Required string length: 1 - 64
Example:

"laptop"

publicKey
string
required

One SSH public key: the contents of a .pub file.

Required string length: 1 - 16384
Example:

"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHk0m2pQd6v1ZxW3c8rT5uYbN7aLfJ9sKqE4oVgXhC2D you@laptop"

Response

Key recorded as applying.

The key that was added or removed.

sshKey
object
required

The key after the change.

Example: