POST /servers
Creates a new Server. Returns preliminary information about the Server as well as an Action that covers progress of creation.
Servers
- https://api.hetzner.cloud/v1
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
datacenter |
String | No |
ID or name of Datacenter to create Server in (must not be used together with location) |
server_type |
String | Yes |
ID or name of the Server type this Server should be created with |
placement_group |
Integer | No |
ID of the Placement Group the server should be in |
labels |
Object | No |
User-defined labels ( |
location |
String | No |
ID or name of Location to create Server in (must not be used together with datacenter) |
user_data |
String | No |
Cloud-Init user data to use during Server creation. This field is limited to 32KiB. |
image |
String | Yes |
ID or name of the Image the Server is created from |
firewalls[] |
Array | No |
Firewalls which should be applied on the Server's public network interface at creation time |
firewalls[].firewall |
Integer | Yes |
ID of the Firewall |
name |
String | Yes |
Name of the Server to create (must be unique per Project and a valid hostname as per RFC 1123) |
networks[] |
Array | No |
Network IDs which should be attached to the Server private network interface at the creation time |
public_net |
Object | No |
Public Network options |
public_net.enable_ipv4 |
Boolean | No |
Attach an IPv4 on the public NIC. If false, no IPv4 address will be attached. Default value: true |
public_net.enable_ipv6 |
Boolean | No |
Attach an IPv6 on the public NIC. If false, no IPv6 address will be attached. Default value: true |
public_net.ipv4 |
Integer | No |
ID of the ipv4 Primary IP to use. If omitted and enable_ipv4 is true, a new ipv4 Primary IP will automatically be created. |
public_net.ipv6 |
Integer | No |
ID of the ipv6 Primary IP to use. If omitted and enable_ipv6 is true, a new ipv6 Primary IP will automatically be created. |
automount |
Boolean | No |
Auto-mount Volumes after attach |
ssh_keys[] |
Array | No |
SSH key IDs ( |
start_after_create |
Boolean | No |
This automatically triggers a Power on a Server-Server Action after the creation is finished and is returned in the Default value: true |
volumes[] |
Array | No |
Volume IDs which should be attached to the Server at the creation time. Volumes must be in the same Location. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.