Skip to main content
POST
/
api
/
v1
/
credentials
/
hetzner
/
ssh-key
Create an SSH key credential
import requests

url = "https://platform.ankra.app/api/v1/credentials/hetzner/ssh-key"

payload = { "name": "<string>" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "success": true,
  "private_key": "<string>",
  "errors": []
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null

Body

application/json
name
string
required
ssh_public_key
string | null
generate
boolean
default:false

Response

SSH key credential created successfully

success
boolean
default:true
private_key
string | null
errors
ResourceError · object[]