certificate
and private_key
in PEM format. You have to monitor its expiration date and handle renewal yourself.domain_names
. Only domains managed by Hetzner DNS are supported. We handle renewal and timely alert the project owner via email if problems occur.managed
Certificates the action
key of the response contains the Action that allows for tracking the issuance process. For type uploaded
Certificates the action
is always null.curl --location --request POST 'https://api.hetzner.cloud/v1/certificates' \
--header 'Content-Type: application/json' \
--data-raw '{
"domain_names": [
"example.com",
"webmail.example.com",
"www.example.com"
],
"name": "my website cert",
"type": "managed"
}'
{
"action": {
"command": "create_certificate",
"error": {
"code": "action_failed",
"message": "Action failed"
},
"finished": null,
"id": 13,
"progress": 0,
"resources": [
{
"id": 879,
"type": "certificate"
}
],
"started": "2019-01-08T12:10:00.000Z",
"status": "running"
},
"certificate": {
"certificate": null,
"created": "2019-01-08T12:10:00.000Z",
"domain_names": [
"example.com",
"webmail.example.com",
"www.example.com"
],
"fingerprint": null,
"id": 897,
"labels": {
"env": "dev"
},
"name": "my website cert",
"not_valid_after": null,
"not_valid_before": null,
"status": {
"error": null,
"issuance": "pending",
"renewal": "unavailable"
},
"type": "managed",
"used_by": [
{
"id": 4711,
"type": "load_balancer"
}
]
}
}