cURL
curl --request POST \ --url https://api.ubicloud.com/project/{project_id}/ssh-public-key/{ssh_public_key_reference} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "public_key": "<string>" } '
{ "id": "skaz0q3vbrpa7pkg7zbmah9csn", "name": "<string>", "public_key": "<string>" }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
ID of the project
"pjkkmx0f2vke4h36nk9cm8v8q0"
SSH public key ID or name Resource ID or name
Successful response
ID of the SSH public key
"skaz0q3vbrpa7pkg7zbmah9csn"
Name of the SSH public key
SSH public key data