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.
| Name | Type | Description |
|---|---|---|
id | string | Unique ID, prefixed ssh_. |
object | string | Always ssh_key. |
name | string | Display name. |
publicKey | string | OpenSSH public key. ssh-ed25519, ecdsa-sha2-nistp256 and ssh-rsa (3072 bits or more) are accepted. |
fingerprint | string | SHA256 fingerprint, as printed by ssh-keygen -lf. |
createdBy | string | User who added the key. |
createdAt | string | ISO 8601 timestamp. |
{
"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
| Method | Path | Description |
|---|---|---|
| GET | /ssh-keys | List your SSH keys |
| POST | /ssh-keys | Add an SSH key |
| DELETE | /ssh-keys/{sshKeyId} | Remove an SSH key |
List SSH keys
GET
/ssh-keysReturns 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
{
"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-keysAdds a public key. It is installed on pods started after this call; restart running pods to pick it up.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
namerequired | body | string | Display name. |
publicKeyrequired | body | string | Contents 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
{
"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"
}| Status | When |
|---|---|
400 | invalid_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
| Name | In | Type | Description |
|---|---|---|---|
sshKeyIdrequired | path | string | The 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.