Hetzner Cloud icon

Hetzner Cloud

Manage servers, volumes, networks and more in Hetzner Cloud

Certificate → Update

AI-generated

Summary

Updates an existing Hetzner Cloud certificate by sending a PUT to /v1/certificates/{id}, changing its name and/or other body fields such as labels, and returns the updated certificate object.

Inputs

  • Certificate (required) — The certificate to update, chosen from a searchable list of the project's certificates (first 50, filtered by name) or entered by ID. The ID is placed in the request URL.
  • Name — New unique name for the certificate. Sent as the body field name.
  • Additional Body Fields (JSON) — JSON object for extra fields not exposed in the UI (for example labels). The description says it is merged into the request body, but the Update operation declares no preSend hook that does this, so it may not actually be sent. Verify before relying on it.
  • Request Options — Node-level options: batching (items per batch, interval in ms), ignore SSL issues, proxy URL, and timeout in ms (default 10000).

Output shape

A single certificate object, taken from the certificate property of the API response (id, name, type, labels, domain names, etc., as returned by Hetzner).

The response is unwrapped from its certificate root key. Only the name and labels of a certificate can be changed by the API. Error responses from Hetzner (such as a duplicate name or unknown ID) cause the node to fail.

Examples

Example 1: Rename a certificate after a domain change

Certificate: select from list (or By ID 42); Name: example-com-2026.

Example 2: Set labels on a certificate

Certificate: By ID; Additional Body Fields (JSON): {"labels":{"env":"prod"}}. Check the output to confirm the labels were applied, because the merge may not run for this operation.

Links

Discussion