Docs / API reference

SSH keys

Public keys stored on your account are written to /root/.ssh/authorized_keys when a pod starts. See Connect via SSH.

The SSH key object

Keys are personal: pods you start get your keys. Team members add their own keys.

NameTypeDescription
idstringUnique ID, prefixed ssh_.
objectstringAlways ssh_key.
namestringDisplay name.
publicKeystringOpenSSH public key. ssh-ed25519, ecdsa-sha2-nistp256 and ssh-rsa (3072 bits or more) are accepted.
fingerprintstringSHA256 fingerprint, as printed by ssh-keygen -lf.
createdBystringUser who added the key.
createdAtstringISO 8601 timestamp.
SSH key object
{
  "id": "ssh_4k9w2m7q",
  "object": "ssh_key",
  "name": "laptop",
  "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7q2mX9w4kT3nZp8vR1bH5cY6dL0sF2gJ7aE4uW9xQ jane@laptop",
  "fingerprint": "SHA256:7Hq2pX9mK4wT3nZc8vR1bH5yL6dS0fJ2gA7eU4iO9qE",
  "createdBy": "usr_2m9x4k7q",
  "createdAt": "2026-09-21T14:05:33Z"
}

Endpoints

MethodPathDescription
GET/ssh-keysList your SSH keys
POST/ssh-keysAdd an SSH key
DELETE/ssh-keys/{sshKeyId}Remove an SSH key

List SSH keys

GET/ssh-keys

Returns the SSH keys of the user who owns the API key.

Request

curl https://api.apipods.com/v1/ssh-keys \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

200 OK
{
  "object": "list",
  "data": [
    {
      "id": "ssh_4k9w2m7q",
      "object": "ssh_key",
      "name": "laptop",
      "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7q2mX9w4kT3nZp8vR1bH5cY6dL0sF2gJ7aE4uW9xQ jane@laptop",
      "fingerprint": "SHA256:7Hq2pX9mK4wT3nZc8vR1bH5yL6dS0fJ2gA7eU4iO9qE",
      "createdBy": "usr_2m9x4k7q",
      "createdAt": "2026-09-21T14:05:33Z"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Add an SSH key

POST/ssh-keys

Adds a public key. It is installed on pods started after this call; restart running pods to pick it up.

Parameters

NameInTypeDescription
namerequiredbodystringDisplay name.
publicKeyrequiredbodystringContents of your .pub file.

Request

curl -X POST https://api.apipods.com/v1/ssh-keys \
  -H "Authorization: Bearer $APIPODS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "laptop",
    "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7q2mX9w4kT3nZp8vR1bH5cY6dL0sF2gJ7aE4uW9xQ jane@laptop"
  }'

Response

201 Created
{
  "id": "ssh_4k9w2m7q",
  "object": "ssh_key",
  "name": "laptop",
  "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7q2mX9w4kT3nZp8vR1bH5cY6dL0sF2gJ7aE4uW9xQ jane@laptop",
  "fingerprint": "SHA256:7Hq2pX9mK4wT3nZc8vR1bH5yL6dS0fJ2gA7eU4iO9qE",
  "createdBy": "usr_2m9x4k7q",
  "createdAt": "2026-09-21T14:05:33Z"
}
StatusWhen
400invalid_parameter: not a valid OpenSSH public key, or the key is already on your account.

Remove an SSH key

DELETE/ssh-keys/{sshKeyId}

Removes the key from your account. Pods that are already running keep it until they restart.

Parameters

NameInTypeDescription
sshKeyIdrequiredpathstringThe SSH key ID.

Request

curl -X DELETE https://api.apipods.com/v1/ssh-keys/ssh_4k9w2m7q \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

Returns 204 No Content with an empty body.