SSH Keys
The SSH Keys API provides endpoints for managing SSH keys for authenticated users. These endpoints allow users to list, create, and delete SSH keys associated with their account. All endpoints require JWT authentication.
Retrieve a list of SSH keys for the authenticated user.
Endpoint
| Parameter |
Location |
Type |
Required |
Description |
Authorization |
Header |
string |
Yes |
Bearer token (JWT) |
Success Response
- Status Code:
200 OK
- Description: List of SSH keys retrieved successfully
- Body:
[
{
"id": "A3KP92MX",
"fingerprint": "e6:b8:da:4b:2c:ae:75:54:bd:1d:1a:d2:6b:8a:19:35",
"title": "Work Laptop"
}
]
| Field |
Type |
Description |
id |
string |
Unique identifier of the SSH key |
fingerprint |
string |
MD5 fingerprint in colon-separated hexadecimal format |
title |
string |
User-defined title for the SSH key |
Error Responses
401 Unauthorized
{
"timestamp": "timestamp",
"path": "/v1/ssh-keys",
"request_id": "request-id",
"message": "Unauthenticated."
}
500 Internal Server Error
{
"timestamp": "timestamp",
"path": "/v1/ssh-keys",
"request_id": "request-id",
"message": "Request could not be processed."
}
Create a new SSH key for the authenticated user.
Endpoint
| Parameter |
Location |
Type |
Required |
Description |
Authorization |
Header |
string |
Yes |
Bearer token (JWT) |
Request Body
| Field |
Type |
Required |
Description |
title |
string |
Yes |
User-defined title for the SSH key |
key |
string |
Yes |
The public SSH key content |
Example Request Body
{
"title": "My Laptop Key",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC... user@host"
}
Success Response
- Status Code:
201 Created
- Description: SSH key created successfully
- Body:
{
"data": {
"id": "f4087e57-752d-3ac9-8888-dace39fdcd71",
"fingerprint": "48:44:f2:6f:13:f0:66:a8:fd:82:66:67:b5:02:56:13",
"title": "My Laptop Key"
}
}
Error Responses
401 Unauthorized
{
"timestamp": "timestamp",
"path": "/v1/ssh-keys",
"request_id": "request-id",
"message": "Unauthenticated."
}
400 Bad Request
{
"timestamp": "timestamp",
"message": "The title field is required. (and 1 more error)",
"path": "/v1/ssh-keys",
"request_id": "3d4379f2-7ceb-4e1e-aa36-cb45f82dd85f",
"details": { ...
"title": [
{
"message": "The title field is required."
}
],
"key": [
{
"message": "The key field is required."
}
]
}
}
Delete a specific SSH key by its ID.
Endpoint
| Parameter |
Location |
Type |
Required |
Description |
id |
Path |
string |
Yes |
The ID of the SSH key to delete |
Authorization |
Header |
string |
Yes |
Bearer token (JWT) |
Success Response
- Status Code:
204 No Content
- Description: SSH key deleted successfully
- Body: Empty
Error Responses
401 Unauthorized
{
"timestamp": "timestamp",
"path": "/v1/ssh-keys/{id}",
"request_id": "request-id",
"message": "Unauthenticated."
}
404 Not Found
{
"timestamp": "timestamp",
"path": "/v1/ssh-keys/{id}",
"request_id": "request-id",
"message": "Request not found."
}
500 Internal Server Error
{
"timestamp": "timestamp",
"path": "/v1/ssh-keys/{id}",
"request_id": "request-id",
"message": "Request could not be processed."
}