Tunploy
APIReferenceServers

Create a server

POST/servers

Deploys the server before it answers, which can take a while when the image is new to the machine. A 201 is a running server; a failed deploy leaves nothing behind.

Needs the servers:write scope.

Authorization

apiKey
AuthorizationBearer <token>

An API key: tp_….

In: header

Header Parameters

Idempotency-Key?string

A retry with the same key within 24 hours gets the first reply back (with Idempotent-Replayed: true) instead of running again.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/servers" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": 0,  "name": "string",  "node": {    "id": 0,    "name": "string"  },  "country": "DE",  "city": "string",  "status": "running",  "endpoint": "string",  "listen_port": 0,  "public_key": "string",  "address": "10.8.0.1/24",  "subnet": "10.8.0.0/24",  "dns": [    "string"  ],  "dns_on_server": true,  "mtu": 0,  "persistent_keepalive": 0,  "client_allowed_ips": [    "string"  ],  "device_count": 0,  "capacity": 0,  "created_at": "2019-08-24T14:15:22Z"}