Add an SSH key
POST/v1/ssh_keys
Add a new SSH key using a POST request sent to /v1/ssh_keys. It's necessary to specify an SSH key name and public key in the request.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
| Field | Details |
|---|---|
name | stringGive a name to an SSH key. |
public_key | stringAdd a public key as shown in the example. |
labels? | objectSpecify labels you want to attach to the resource. Refer to the Labels section for more details. |
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/ssh_keys" \ -H "Content-Type: application/json" \ -d '{ "name": "new_key", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDxRD2uaK8Dn4/AiUP8EkRj9M1LLpPGjDg8VMPwDlRH4RyoMA29kRG+IVg6LdiWqhxG0FjeHhQqS+Xnz1eFH5lbaf6+UWL2EkrFMp43SRZuowheIwn8xeZDbhSxxUYDTRABNWPSx4F5+MU3WuerAI44Gy3nz0xjkJCIo3cqsHeVGyqtsHmO05THeQwQq9TaOTTwnB92RiNgruHS7DbAPfAqDxZznLDncIwSSt7QPDzeQc42bA4Leysy0Y6ymgGfwJMhqiddQvRHtQrAQ6MH4Db/f6bkFU3/FCTp9LtTZaD84c7DaiezdzQTh9BF59vw/76HCS8+UVFLIYYkD8U6SsnP Generated by Nova", "labels": { "environment": "production", "service": "my-web-app", "example.com/project": "my-project", "example.com/owner": "my-team" } }'{ "name": "new_key", "fingerprint": "48:81:0c:43:99:12:71:5e:ba:fd:e7:2f:20:d7:95:e8", "labels": { "environment": "production", "service": "my-web-app", "example.com/project": "my-project", "example.com/owner": "my-team" }, "updated_at": "2026-05-28T07:02:30Z", "created_at": "2026-05-28T07:02:30Z"}