{"openapi":"3.1.0","info":{"title":"PrivateByte API","version":"1.0.0","description":"Manage your PrivateByte account, servers, Gateways, proxies, orders, wallet and support tickets. Scraper has its own API and spec. Authenticate with `Authorization: Bearer <API_KEY>`; create keys in the client area under Account settings → API keys. Field names are snake_case, timestamps are ISO 8601 UTC, money is whole minor units (cents) with a currency beside it. Each operation carries `x-tier`: read (changes nothing), safe (reversible), destructive (data loss or downtime) or money (spends or commits funds). Destructive operations take `confirm`, which must repeat the id of the thing being changed (or be true for account-wide actions). Money operations require an explicit ceiling, so nothing is spent beyond what the request states. A refusal is problem+json with a `code`, and where the operation can say why, a `reason` and `details`."},"servers":[{"url":"https://api.privatebyte.com"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"opaque"}},"schemas":{"Problem":{"type":"object","required":["type","status","code","title","detail","request_id","retryable"],"properties":{"type":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"},"detail":{"type":"string"},"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN_SCOPE","ACCOUNT_RESTRICTED","MAINTENANCE","NOT_FOUND","NOT_READY","LIMIT_REACHED","ALREADY_EXISTS","PRECONDITION","VALIDATION_FAILED","RESOURCE_STATE_CONFLICT","IDEMPOTENCY_CONFLICT","IN_PROGRESS","RATE_LIMITED","UPSTREAM_UNAVAILABLE","UNAVAILABLE","INTERNAL"]},"request_id":{"type":"string"},"retryable":{"type":"boolean"},"field":{"type":"string"},"reason":{"type":"string","description":"Why, as a short machine code from the operation's own list (for example unpaid_renewal_invoice). Present when the operation can say."},"details":{"type":"object","additionalProperties":{"type":["string","number","boolean"]},"description":"What you need to act on the reason (for example { \"invoice_id\": 91 })."}}}},"responses":{"Problem":{"description":"Error (RFC 9457 problem+json)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"paths":{"/v1/catalog/coupons/preview":{"post":{"operationId":"catalog.coupons.preview","summary":"Check a coupon code and what it takes off.","description":"Checks a coupon without creating or reserving anything. Send product_id to learn whether the coupon applies to that product, and amount_minor as well to get the exact discount on that amount. A code that cannot be used answers 200 with valid false; the reason is not given. To see a coupon applied to a whole order, send it as coupon_code to orders.preview.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$","description":"The coupon code as the customer typed it"},"product_id":{"description":"Product id from the catalogue. Send it to learn whether the coupon applies to that product","type":"integer","exclusiveMinimum":0,"maximum":2147483647},"amount_minor":{"description":"Per-unit first-invoice amount in your account currency, in whole minor units, after volume pricing and including setup; requires product_id. Send it to learn the exact discount","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code"],"additionalProperties":false},"example":{"code":"WELCOME10","product_id":1201,"amount_minor":599}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"valid":{"type":"boolean","const":false,"description":"The code does not exist, is not active, has run out, or you have already used it"}},"required":["valid"],"additionalProperties":false},{"type":"object","properties":{"valid":{"type":"boolean","const":true},"code":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$","description":"The code exactly as stored. Copy this form into coupon_code when ordering"},"type":{"type":"string","enum":["percentage","fixed"],"description":"percentage: percent_off is set. fixed: amount_off_minor is set"},"percent_off":{"description":"Percent taken off. Present only when type is percentage","type":"number","minimum":0,"maximum":9007199254740991},"amount_off_minor":{"description":"Amount taken off, in whole minor units of currency. Present only when type is fixed","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Your account currency. Every amount in this response is in it"},"recurring":{"type":"boolean","description":"True when the discount also applies to renewals; false when it applies to the first invoice only"},"applies_to_all_products":{"type":"boolean"},"product_ids":{"maxItems":10000,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"description":"Products the coupon is limited to. Empty when applies_to_all_products is true"},"applies_to_product":{"description":"Whether the coupon applies to the product_id you sent. Present only when you sent one","type":"boolean"},"discount_minor":{"description":"What the coupon takes off the amount_minor you sent. Present only when you sent an amount and the coupon applies","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount_after_discount_minor":{"description":"amount_minor less discount_minor, never below zero","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the coupon stops working, ISO 8601 UTC. Null when it has no end date"},"per_user_checked":{"type":"boolean","const":true,"description":"Always true: your own past use of the code was checked"}},"required":["valid","code","type","currency","recurring","applies_to_all_products","product_ids","expires_at","per_user_checked"],"additionalProperties":false}]},"example":{"valid":true,"code":"WELCOME10","type":"percentage","percent_off":10,"currency":"USD","recurring":false,"applies_to_all_products":true,"product_ids":[],"applies_to_product":true,"discount_minor":60,"amount_after_discount_minor":539,"expires_at":"2026-12-31T23:59:59.000Z","per_user_checked":true}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/services/{id}/renewal":{"post":{"operationId":"services.renewal.request","summary":"Get a service's renewal invoice early.","description":"Issues the normal renewal invoice of an active service ahead of time and returns its invoice_id; if an unpaid renewal invoice already exists, that one is returned. It takes no payment and the amount is the normal renewal price of the service: pay the invoice afterwards (invoices.credit.create pays from wallet credit). The service must be active and due for renewal within the next 30 days. confirm must equal the service id.","x-tier":"money","x-scope":"billing:pay","x-required-scopes":["billing:pay","billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:pay","billing:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your service id, from services.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Must equal the service id in the URL"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":7044}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The unpaid renewal invoice for this service: newly issued, or the one that was already open"}},"required":["invoice_id"],"additionalProperties":false},"example":{"invoice_id":9102}}}},"400":{"description":"VALIDATION_FAILED: confirm is missing or does not equal the service id in the URL (the refusal carries field: confirm). Nothing is issued.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED (reason: email_not_verified): The account email address is not verified. The customer must verify it in the client area first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND: Also returned for a service of yours that is overdue or has no renewal (cancelled, one-off or free). Check renewal_date with services.get.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"PRECONDITION (reason: renewal_not_due): The service renews more than 30 days from now. `details.renewal_date` is the renewal date and `details.opens_date` the first day an early renewal can be issued.\nPRECONDITION (reason: service_not_active): The service is suspended, so its renewal cannot be issued early.\nPRECONDITION (reason: service_change_in_progress): A plan change for this service is not finished. Wait until it completes, then ask again.\nPRECONDITION (reason: renewal_not_available): No renewal invoice could be issued or found for this service, for example because the renewal is already paid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/invoices/export":{"get":{"operationId":"invoices.export","summary":"Export your recent invoices with product details.","description":"Returns up to your 500 most recent invoices in one JSON response, newest first (it is not a CSV file). Each row has the invoice id, dates, total with currency, status and the product details read from its line items. There is no date-range filter and no paging: older invoices beyond the 500 are not included, and for those, or for regular polling, use invoices.list and invoices.get. It reads every invoice in full, so it is slow on accounts with many invoices; do not call it in a loop.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"invoices":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Invoice id; use it with the invoice read and payment operations"},"issued_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"UTC calendar date the invoice was issued, YYYY-MM-DD"},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date, YYYY-MM-DD"},{"type":"null"}],"description":"Calendar date payment is due, YYYY-MM-DD. null when the invoice has no due date"},"paid_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the invoice was paid, ISO 8601 UTC. null while unpaid or cancelled"},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Invoice total after credit already applied and tax, in whole minor units (cents) of `currency`"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of this invoice"},"status":{"type":"string","enum":["paid","unpaid","cancelled"],"description":"paid: settled in full. unpaid: open. cancelled: void, cannot be paid"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Payment method recorded on the invoice. null when none is recorded there"},"plan_name":{"type":"string","description":"Product name read from the first line item. Empty text when the invoice has no product line"},"billing_period":{"type":"string","description":"Billing period text as printed on the first line item. Display text, not a parseable date range; empty when the line has none"},"location":{"type":"string","description":"Server location read from the first line item. Empty text when not stated"},"operating_system":{"type":"string","description":"Operating system read from the first line item. Empty text when not stated"},"specs":{"type":"string","description":"Resource summary read from the first line item, comma separated. Empty text when not stated"},"all_items":{"type":"string","description":"Product names of every line item, separated by \"; \""}},"required":["invoice_id","issued_date","due_date","paid_at","total_minor","currency","status","payment_method","plan_name","billing_period","location","operating_system","specs","all_items"],"additionalProperties":false},"description":"Newest first, at most the 500 most recent invoices"}},"required":["invoices"],"additionalProperties":false},"example":{"invoices":[{"invoice_id":9090,"issued_date":"2026-10-07","due_date":"2026-10-21","paid_at":"2026-10-08T09:14:03.000Z","total_minor":799,"currency":"USD","status":"paid","payment_method":null,"plan_name":"Cloud server","billing_period":"07/10/2026 - 06/11/2026","location":"Europe","operating_system":"Ubuntu 24.04","specs":"CPU: 2, RAM: 4 GB","all_items":"Cloud server"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The export could not be put together completely. No partial export is returned; try again shortly or use invoices.list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways":{"get":{"operationId":"gateway.list","summary":"List your Gateways.","description":"Returns every Gateway on the account that has not been cancelled, with its location, speed, IP address and state. A Gateway gives one of your own machines a dedicated public IPv4 address through an encrypted WireGuard tunnel, unmetered at the speed of its tier. The list carries no live tunnel state: call gateway.get or gateway.status with a service_id for that. A Gateway is usable once state is active; setup then starts at gateway.keys.register.","x-tier":"read","x-scope":"gateway:read","x-required-scopes":["gateway:read"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"gateways":{"type":"array","items":{"type":"object","properties":{"service_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Gateway id: the {id} of every Gateway operation, and the value confirm must repeat"},"location":{"type":"string","description":"Location code of the Gateway"},"location_label":{"type":"string","description":"Display name of the location"},"tier":{"anyOf":[{"type":"number","const":25},{"type":"number","const":50},{"type":"number","const":100},{"type":"number","const":250}],"description":"Speed in Mbps: 25, 50, 100 or 250. Traffic is unmetered at that speed."},"state":{"type":"string","enum":["setting_up","active","needs_support"],"description":"setting_up: being provisioned, not usable yet. active: ready to use. needs_support: provisioning failed or the tunnel is missing; open a support ticket."},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The dedicated public IPv4 address; null until one is assigned"},"suspended":{"type":"boolean","description":"True while we have switched the Gateway off; gateway.status says whether it is for an unpaid invoice or a review"},"cancel_blocked":{"type":"boolean","description":"True when gateway.cancel is refused for this Gateway; contact support instead"},"pending_downgrade_tier":{"anyOf":[{"anyOf":[{"type":"number","const":25},{"type":"number","const":50},{"type":"number","const":100},{"type":"number","const":250}],"description":"Speed in Mbps: 25, 50, 100 or 250. Traffic is unmetered at that speed."},{"type":"null"}],"description":"Lower speed that applies when the next renewal invoice is paid; null when none is scheduled"},"server":{"anyOf":[{"type":"object","properties":{"public_key":{"type":"string","description":"WireGuard public key of our end of the tunnel"},"endpoint":{"type":"string","description":"host:port the device connects to"},"mtu":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"MTU to set on the tunnel interface; a larger value stalls big transfers"}},"required":["public_key","endpoint","mtu"],"additionalProperties":false},{"type":"null"}],"description":"Our end of the tunnel; null until the Gateway is active"}},"required":["service_id","location","location_label","tier","state","ip","suspended","cancel_blocked","pending_downgrade_tier","server"],"additionalProperties":false}}},"required":["gateways"],"additionalProperties":false},"example":{"gateways":[{"service_id":4821,"location":"uk","location_label":"London","tier":50,"state":"active","ip":"203.0.113.10","suspended":false,"cancel_blocked":false,"pending_downgrade_tier":null,"server":{"public_key":"ZXhhbXBsZS1zZXJ2ZXItcHVibGljLWtleS0wMDAwMDE=","endpoint":"gw.example.com:51820","mtu":1380}}]}}}},"404":{"description":"NOT_FOUND: Gateways are not available on this account.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}":{"get":{"operationId":"gateway.get","summary":"Read one Gateway with its live tunnel counters.","description":"Returns the Gateway plus whether a key is registered, the last handshake and the traffic counters. If the live state cannot be read, the live fields come back as false, null and 0 instead of the call failing; gateway.status says whether a reading is live. After ordering a Gateway, poll this until state is active before starting setup. needs_support means open a support ticket.","x-tier":"read","x-scope":"gateway:read","x-required-scopes":["gateway:read"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"gateway":{"type":"object","properties":{"service_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Gateway id: the {id} of every Gateway operation, and the value confirm must repeat"},"location":{"type":"string","description":"Location code of the Gateway"},"location_label":{"type":"string","description":"Display name of the location"},"tier":{"anyOf":[{"type":"number","const":25},{"type":"number","const":50},{"type":"number","const":100},{"type":"number","const":250}],"description":"Speed in Mbps: 25, 50, 100 or 250. Traffic is unmetered at that speed."},"state":{"type":"string","enum":["setting_up","active","needs_support"],"description":"setting_up: being provisioned, not usable yet. active: ready to use. needs_support: provisioning failed or the tunnel is missing; open a support ticket."},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The dedicated public IPv4 address; null until one is assigned"},"suspended":{"type":"boolean","description":"True while we have switched the Gateway off; gateway.status says whether it is for an unpaid invoice or a review"},"cancel_blocked":{"type":"boolean","description":"True when gateway.cancel is refused for this Gateway; contact support instead"},"pending_downgrade_tier":{"anyOf":[{"anyOf":[{"type":"number","const":25},{"type":"number","const":50},{"type":"number","const":100},{"type":"number","const":250}],"description":"Speed in Mbps: 25, 50, 100 or 250. Traffic is unmetered at that speed."},{"type":"null"}],"description":"Lower speed that applies when the next renewal invoice is paid; null when none is scheduled"},"server":{"anyOf":[{"type":"object","properties":{"public_key":{"type":"string","description":"WireGuard public key of our end of the tunnel"},"endpoint":{"type":"string","description":"host:port the device connects to"},"mtu":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"MTU to set on the tunnel interface; a larger value stalls big transfers"}},"required":["public_key","endpoint","mtu"],"additionalProperties":false},{"type":"null"}],"description":"Our end of the tunnel; null until the Gateway is active"},"peer_set":{"type":"boolean","description":"True once a public key is registered. Also false when the live state could not be read; gateway.status tells the two apart."},"handshake_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"Last WireGuard handshake with the device; null when there has been none or the live state could not be read"},"rx_bytes":{"type":"number","description":"Bytes received from the device through the tunnel (its upload)"},"tx_bytes":{"type":"number","description":"Bytes sent to the device through the tunnel (its download)"}},"required":["service_id","location","location_label","tier","state","ip","suspended","cancel_blocked","pending_downgrade_tier","server","peer_set","handshake_at","rx_bytes","tx_bytes"],"additionalProperties":false}},"required":["gateway"],"additionalProperties":false},"example":{"gateway":{"service_id":4821,"location":"uk","location_label":"London","tier":50,"state":"active","ip":"203.0.113.10","suspended":false,"cancel_blocked":false,"pending_downgrade_tier":null,"server":{"public_key":"ZXhhbXBsZS1zZXJ2ZXItcHVibGljLWtleS0wMDAwMDE=","endpoint":"gw.example.com:51820","mtu":1380},"peer_set":true,"handshake_at":"2026-11-14T10:04:30.000Z","rx_bytes":1048576,"tx_bytes":8388608}}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/status":{"get":{"operationId":"gateway.status","summary":"Read the live connection state of a Gateway.","description":"Returns link (whether the device is connected), the last handshake and its age, the traffic counters and, when the Gateway is suspended, whether the cause is billing or a review. It also answers while the Gateway is suspended or still being set up. It is safe to poll every few seconds. During setup use gateway.test.tunnel, which turns this state into a pass, waiting or fail verdict.","x-tier":"read","x-scope":"gateway:read","x-required-scopes":["gateway:read"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"service_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Gateway id: the {id} of every Gateway operation, and the value confirm must repeat"},"state":{"type":"string","enum":["setting_up","active","needs_support"],"description":"setting_up: being provisioned, not usable yet. active: ready to use. needs_support: provisioning failed or the tunnel is missing; open a support ticket."},"suspended":{"anyOf":[{"type":"boolean","const":false},{"type":"object","properties":{"kind":{"type":"string","enum":["billing","review"]}},"required":["kind"],"additionalProperties":false}],"description":"false when in service. billing: switched off for an unpaid invoice; pay it to restore service. review: held by our team; open a support ticket."},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The dedicated public IPv4 address; null until one is assigned"},"location":{"type":"string","description":"Location code of the Gateway"},"tier":{"anyOf":[{"type":"number","const":25},{"type":"number","const":50},{"type":"number","const":100},{"type":"number","const":250}],"description":"Speed in Mbps: 25, 50, 100 or 250. Traffic is unmetered at that speed."},"peer":{"type":"object","properties":{"set":{"type":"boolean","description":"True once a public key is registered"},"registered_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the current key was registered; null when no key is set"}},"required":["set","registered_at"],"additionalProperties":false},"link":{"type":"string","enum":["no_key","never","up","idle","lost","unknown"],"description":"no_key: no public key registered. never: key registered, the device has not connected with it yet. up: connected (handshake within the last 3 minutes). idle: last handshake between 3 minutes and 1 hour ago. lost: last handshake over 1 hour ago. unknown: the live state could not be read just now; try again."},"handshake_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"Last WireGuard handshake with the device; null when there has been none"},"handshake_age_s":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Seconds since the last handshake with the current key; null when there has been none"},"rx_bytes":{"type":"number","description":"Bytes received from the device through the tunnel (its upload)"},"tx_bytes":{"type":"number","description":"Bytes sent to the device through the tunnel (its download)"},"daemon":{"type":"string","enum":["ok","unreachable"],"description":"ok: the values are live. unreachable: the live state could not be read; the values are the last known ones and may be stale."},"server_time":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The clock the handshake age was measured against"},"cached_age_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Age of this reading in milliseconds; readings are reused for a moment"}},"required":["service_id","state","suspended","ip","location","tier","peer","link","handshake_at","handshake_age_s","rx_bytes","tx_bytes","daemon","server_time","cached_age_ms"],"additionalProperties":false},"example":{"service_id":4821,"state":"active","suspended":false,"ip":"203.0.113.10","location":"uk","tier":50,"peer":{"set":true,"registered_at":"2026-11-14T10:00:00.000Z"},"link":"up","handshake_at":"2026-11-14T10:04:30.000Z","handshake_age_s":42,"rx_bytes":1048576,"tx_bytes":8388608,"daemon":"ok","server_time":"2026-11-14T10:05:12.000Z","cached_age_ms":0}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/config":{"get":{"operationId":"gateway.config.get","summary":"Get the WireGuard configuration template for the device.","description":"Setup step 2 of 5. Returns the configuration as text with a placeholder where the private key goes. The private key is generated on the customer's device, never leaves it, is never sent to this API and is not in the response. Choose kind for the machine: device (a phone or computer; all its IPv4 traffic uses the Gateway), linux (a server; only traffic from the Gateway address uses the tunnel) or router. On the device, put the private key in place of the placeholder, load the configuration and switch the tunnel on; then poll gateway.test.tunnel.","x-tier":"read","x-scope":"gateway:read","x-required-scopes":["gateway:read"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["device","linux","router"]},"description":"device: a phone or computer running the WireGuard app; all its IPv4 traffic uses the Gateway. linux: a server; only traffic from the Gateway address uses the tunnel. router: the linux configuration with notes for common routers."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["device","linux","router"]},"filename":{"type":"string","description":"Suggested file name for the configuration"},"template":{"type":"string","description":"WireGuard configuration text. Its PrivateKey line holds the literal placeholder \"<your private key>\": replace it on the device. The private key is never sent to this API and never returned by it."},"placeholders":{"type":"array","items":{"type":"string","const":"PrivateKey"},"description":"Configuration keys whose value you fill in on the device"},"server":{"type":"object","properties":{"public_key":{"type":"string","description":"WireGuard public key of our end of the tunnel"},"endpoint":{"type":"string","description":"host:port the device connects to"},"mtu":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"MTU to set on the tunnel interface; a larger value stalls big transfers"}},"required":["public_key","endpoint","mtu"],"additionalProperties":false},"address":{"type":"string","description":"Tunnel address for the device: the Gateway IP as a /32"},"notes":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"}},"required":["title","text"],"additionalProperties":false},"description":"Setup notes for this kind of device, written for a person"},"full_tunnel":{"type":"boolean","description":"True when the configuration sends all IPv4 traffic of the device through the Gateway (kind device). False when only traffic from the Gateway address uses it."}},"required":["kind","filename","template","placeholders","server","address","notes","full_tunnel"],"additionalProperties":false},"example":{"kind":"linux","filename":"pb-gateway-linux.conf","template":"[Interface]\nPrivateKey = <your private key>\nAddress = 203.0.113.10/32\nMTU = 1380\nTable = off\nPostUp = ip rule add from 203.0.113.10 table 51820; ip route add default dev %i table 51820\nPostDown = ip rule del from 203.0.113.10 table 51820; ip route flush table 51820\n\n[Peer]\nPublicKey = ZXhhbXBsZS1zZXJ2ZXItcHVibGljLWtleS0wMDAwMDE=\nEndpoint = gw.example.com:51820\nAllowedIPs = 0.0.0.0/0\nPersistentKeepalive = 25\n","placeholders":["PrivateKey"],"server":{"public_key":"ZXhhbXBsZS1zZXJ2ZXItcHVibGljLWtleS0wMDAwMDE=","endpoint":"gw.example.com:51820","mtu":1380},"address":"203.0.113.10/32","notes":[{"title":"Only traffic from your address uses the tunnel","text":"The rest of the machine keeps its normal route, so SSH and everything else on its own address are unchanged."}],"full_tunnel":false}}}},"400":{"description":"VALIDATION_FAILED (reason: device_not_for_vps): kind is device, but the setup target saved in the client area is one of your own servers, which a full-tunnel configuration would cut off. Use kind linux.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The Gateway is suspended. Read gateway.status: billing means pay the open invoice, review means open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"NOT_READY: The Gateway is not active yet. Poll gateway.get until state is active; if it is needs_support, open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/peer":{"put":{"operationId":"gateway.peer.set","summary":"Set the public key of a Gateway, replacing any existing key.","description":"Registers the key when none is set and replaces it when one is, in a single repeatable call. Replacing causes downtime: the device that uses the current key is disconnected and earlier check results are cleared. confirm must equal the Gateway id. For a first key prefer gateway.keys.register, which cannot disconnect a working device. Next: gateway.config.get, then gateway.test.tunnel.","x-tier":"destructive","x-scope":"gateway:write","x-required-scopes":["gateway:write"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"public_key":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$","description":"WireGuard PUBLIC key of the device (base64, 44 characters). Never send the private key: any other field is refused."},"device_label":{"description":"Your own name for the device, up to 40 characters","type":"string","minLength":1,"maxLength":40},"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Must equal the Gateway id in the URL"}},"required":["public_key","confirm"],"additionalProperties":false},"example":{"public_key":"dGhpcy1pcy1hbi1leGFtcGxlLXB1YmxpYy1rZXktMDE=","confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"registered":{"type":"boolean","const":true},"replaced":{"type":"boolean","description":"True when a different key was registered before; the device using the old key is now disconnected and earlier check results are cleared"},"fingerprint":{"type":"string","minLength":8,"maxLength":8,"description":"First 8 characters of the registered public key"},"registered_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When this key was registered"}},"required":["registered","replaced","fingerprint","registered_at"],"additionalProperties":false},"example":{"registered":true,"replaced":false,"fingerprint":"dGhpcy1p","registered_at":"2026-11-14T10:00:00.000Z"}}}},"400":{"description":"VALIDATION_FAILED: confirm is missing or does not equal the Gateway id in the URL (the refusal carries field: confirm). Nothing is changed.\nVALIDATION_FAILED (reason: public_key): The value is not a WireGuard public key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The Gateway is suspended. Read gateway.status: billing means pay the open invoice, review means open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"ALREADY_EXISTS (reason: key_in_use): That public key is already used by another tunnel. Generate a new key pair on the device and send the new public key.\nNOT_READY: The Gateway is not active yet. Poll gateway.get until state is active; if it is needs_support, open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE (reason: not_applied): The key may or may not have been saved. Send the same key again with a new Idempotency-Key; setting the same key twice is safe.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/keys/register":{"post":{"operationId":"gateway.keys.register","summary":"Register your device's public key.","description":"Setup step 1 of 5. Generate a WireGuard key pair on the device and send only the public key; the private key stays on the device. This works only while no key is registered, so it can never disconnect a working device, and sending the same key again succeeds. Next: gateway.config.get for the configuration, then gateway.test.tunnel. To change an existing key use gateway.keys.rotate.","x-tier":"safe","x-scope":"gateway:write","x-required-scopes":["gateway:write"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"public_key":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$","description":"WireGuard PUBLIC key of the device (base64, 44 characters). Never send the private key: any other field is refused."},"device_label":{"description":"Your own name for the device, up to 40 characters","type":"string","minLength":1,"maxLength":40}},"required":["public_key"],"additionalProperties":false},"example":{"public_key":"dGhpcy1pcy1hbi1leGFtcGxlLXB1YmxpYy1rZXktMDE=","device_label":"Home server"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"registered":{"type":"boolean","const":true},"replaced":{"type":"boolean","description":"True when a different key was registered before; the device using the old key is now disconnected and earlier check results are cleared"},"fingerprint":{"type":"string","minLength":8,"maxLength":8,"description":"First 8 characters of the registered public key"},"registered_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When this key was registered"}},"required":["registered","replaced","fingerprint","registered_at"],"additionalProperties":false},"example":{"registered":true,"replaced":false,"fingerprint":"dGhpcy1p","registered_at":"2026-11-14T10:00:00.000Z"}}}},"400":{"description":"VALIDATION_FAILED (reason: public_key): The value is not a WireGuard public key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The Gateway is suspended. Read gateway.status: billing means pay the open invoice, review means open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"ALREADY_EXISTS (reason: peer_set): A different key is already registered. Use gateway.keys.rotate to replace it; that disconnects the device using the current key.\nALREADY_EXISTS (reason: key_in_use): That public key is already used by another tunnel. Generate a new key pair on the device and send the new public key.\nNOT_READY: The Gateway is not active yet. Poll gateway.get until state is active; if it is needs_support, open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE (reason: not_applied): The key may or may not have been saved. Send the same key again with a new Idempotency-Key; setting the same key twice is safe.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/keys/rotate":{"post":{"operationId":"gateway.keys.rotate","summary":"Replace the registered public key of a Gateway.","description":"Replaces the registered key with a new public key generated on the device. This causes downtime: the device using the old key is disconnected until it loads a configuration with the new private key, and earlier check results are cleared, so run the checks again from gateway.test.tunnel. confirm must equal the Gateway id. A key must already be registered; for the first key use gateway.keys.register.","x-tier":"destructive","x-scope":"gateway:write","x-required-scopes":["gateway:write"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"public_key":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$","description":"WireGuard PUBLIC key of the device (base64, 44 characters). Never send the private key: any other field is refused."},"device_label":{"description":"Your own name for the device, up to 40 characters","type":"string","minLength":1,"maxLength":40},"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Must equal the Gateway id in the URL"}},"required":["public_key","confirm"],"additionalProperties":false},"example":{"public_key":"dGhpcy1pcy1hbi1leGFtcGxlLXB1YmxpYy1rZXktMDE=","device_label":"Home server","confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"registered":{"type":"boolean","const":true},"replaced":{"type":"boolean","description":"True when a different key was registered before; the device using the old key is now disconnected and earlier check results are cleared"},"fingerprint":{"type":"string","minLength":8,"maxLength":8,"description":"First 8 characters of the registered public key"},"registered_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When this key was registered"}},"required":["registered","replaced","fingerprint","registered_at"],"additionalProperties":false},"example":{"registered":true,"replaced":true,"fingerprint":"dGhpcy1p","registered_at":"2026-11-14T10:00:00.000Z"}}}},"400":{"description":"VALIDATION_FAILED: confirm is missing or does not equal the Gateway id in the URL (the refusal carries field: confirm). Nothing is changed.\nVALIDATION_FAILED (reason: public_key): The value is not a WireGuard public key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The Gateway is suspended. Read gateway.status: billing means pay the open invoice, review means open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"PRECONDITION (reason: no_key): No key is registered yet. Use gateway.keys.register.\nALREADY_EXISTS (reason: key_in_use): That public key is already used by another tunnel. Generate a new key pair on the device and send the new public key.\nNOT_READY: The Gateway is not active yet. Poll gateway.get until state is active; if it is needs_support, open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE (reason: not_applied): The key may or may not have been saved. Send the same key again with a new Idempotency-Key; setting the same key twice is safe.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/test/tunnel":{"get":{"operationId":"gateway.test.tunnel","summary":"Check whether the device has connected through the tunnel.","description":"Setup step 3 of 5. Returns pass, waiting or fail with a code that says why. Once the key is registered and the configuration is loaded on the device, poll this every few seconds while verdict is waiting. pass means the tunnel is up: go on to gateway.test.reachable.run. fail needs action first: no_key means register a key, never_connected or lost means check the configuration on the device and that the tunnel is switched on, suspended means read gateway.status. A pass is remembered, so a device that later goes quiet still reads as pass.","x-tier":"read","x-scope":"gateway:read","x-required-scopes":["gateway:read"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["pass","waiting","fail"],"description":"pass: the device has connected with the current key. waiting: not yet; poll again. fail: it will not pass without action; see code."},"code":{"type":"string","enum":["up","idle","connected_earlier","never_connected","no_key","lost","daemon_unreachable","suspended","not_ready"],"description":"up: connected now (pass). connected_earlier: passed before, quiet now (pass). idle: last handshake is over 3 minutes old and no pass is recorded (waiting). never_connected: no handshake with this key; waiting for the first 3 minutes after registration, then fail. no_key: register a key first (fail). lost: no handshake for over an hour (fail). suspended: the Gateway is switched off (fail). not_ready: still being set up (waiting). daemon_unreachable: the live state could not be read; our side (waiting)."},"handshake_age_s":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Seconds since the last handshake with the current key; null when there has been none"},"key_registered_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the current key was registered; null when no key is set"}},"required":["verdict","code","handshake_age_s","key_registered_at"],"additionalProperties":false},"example":{"verdict":"pass","code":"up","handshake_age_s":42,"key_registered_at":"2026-11-14T10:00:00.000Z"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/test/reachable":{"get":{"operationId":"gateway.test.reachable.get","summary":"Read the last reachability result for a Gateway.","description":"Returns the result of the most recent gateway.test.reachable.run without running a new check. Results are cleared when the key is replaced. Changes nothing.","x-tier":"read","x-scope":"gateway:read","x-required-scopes":["gateway:read"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["pass","fail"],"description":"pass: the device answered from the internet (a reply to ping, an open port or a refused port). fail: silence, or an answer that did not come from the device."},"code":{"type":"string","enum":["pass","pass_no_service","partial","device_silent","not_arriving","no_response","suspect_local_answer"],"description":"pass: the port is open. pass_no_service: the device answered but nothing listens on that port (also the result of a ping-only pass). partial: reached from one vantage and not the other; we are alerted. device_silent: packets reached the device and nothing came back; check its firewall and tunnel address. not_arriving: packets did not reach the tunnel; our side, we are alerted. no_response: no answer. suspect_local_answer: an answer came, but not from the device; we are alerted."},"port":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"TCP port that was tried; null for a ping-only run"},"vantages":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","description":"Where this probe ran from"},"icmp":{"anyOf":[{"type":"string","enum":["reply","timeout"]},{"type":"null"}],"description":"Ping result; null when not measured"},"tcp":{"anyOf":[{"type":"string","enum":["open","refused","timeout"]},{"type":"null"}],"description":"TCP result on the port; null for a ping-only run"}},"required":["region","icmp","tcp"],"additionalProperties":false}},"forwarded":{"anyOf":[{"type":"object","properties":{"to_device":{"type":"boolean","description":"Traffic went through the tunnel to the device during the probe"},"from_device":{"type":"boolean","description":"Traffic came back from the device during the probe"}},"required":["to_device","from_device"],"additionalProperties":false},{"type":"null"}],"description":"null when tunnel traffic could not be measured"},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When this check ran"}},"required":["verdict","code","port","vantages","forwarded","checked_at"],"additionalProperties":false},"example":{"verdict":"pass","code":"pass","port":443,"vantages":[{"region":"a server in London","icmp":"reply","tcp":"open"},{"region":"a server in Amsterdam","icmp":"reply","tcp":"open"}],"forwarded":{"to_device":true,"from_device":true},"checked_at":"2026-11-14T10:06:00.000Z"}}}},"409":{"description":"PRECONDITION (reason: no_test): No result is stored for this Gateway. Run gateway.test.reachable.run.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"gateway.test.reachable.run","summary":"Check that the internet can reach the Gateway IP.","description":"Setup step 4 of 5. Probes the Gateway's own IP address from outside (ping, plus one TCP port if you give one) and returns the verdict; allow up to half a minute. The tunnel must be up at that moment (gateway.test.tunnel code up). A reply to ping, an open port or a refused port all pass; only silence fails. The target is always the Gateway IP and cannot be changed. Next: gateway.test.egress.start.","x-tier":"safe","x-scope":"gateway:write","x-required-scopes":["gateway:write"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"port":{"description":"TCP port to try as well as ping. Omit for a ping-only check. Mail and Windows file-sharing ports are refused.","type":"integer","minimum":1,"maximum":65535}},"additionalProperties":false},"example":{"port":443}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"verdict":{"type":"string","enum":["pass","fail"],"description":"pass: the device answered from the internet (a reply to ping, an open port or a refused port). fail: silence, or an answer that did not come from the device."},"code":{"type":"string","enum":["pass","pass_no_service","partial","device_silent","not_arriving","no_response","suspect_local_answer"],"description":"pass: the port is open. pass_no_service: the device answered but nothing listens on that port (also the result of a ping-only pass). partial: reached from one vantage and not the other; we are alerted. device_silent: packets reached the device and nothing came back; check its firewall and tunnel address. not_arriving: packets did not reach the tunnel; our side, we are alerted. no_response: no answer. suspect_local_answer: an answer came, but not from the device; we are alerted."},"port":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"TCP port that was tried; null for a ping-only run"},"vantages":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","description":"Where this probe ran from"},"icmp":{"anyOf":[{"type":"string","enum":["reply","timeout"]},{"type":"null"}],"description":"Ping result; null when not measured"},"tcp":{"anyOf":[{"type":"string","enum":["open","refused","timeout"]},{"type":"null"}],"description":"TCP result on the port; null for a ping-only run"}},"required":["region","icmp","tcp"],"additionalProperties":false}},"forwarded":{"anyOf":[{"type":"object","properties":{"to_device":{"type":"boolean","description":"Traffic went through the tunnel to the device during the probe"},"from_device":{"type":"boolean","description":"Traffic came back from the device during the probe"}},"required":["to_device","from_device"],"additionalProperties":false},{"type":"null"}],"description":"null when tunnel traffic could not be measured"},"checked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When this check ran"}},"required":["verdict","code","port","vantages","forwarded","checked_at"],"additionalProperties":false},"example":{"verdict":"pass","code":"pass","port":443,"vantages":[{"region":"a server in London","icmp":"reply","tcp":"open"},{"region":"a server in Amsterdam","icmp":"reply","tcp":"open"}],"forwarded":{"to_device":true,"from_device":true},"checked_at":"2026-11-14T10:06:00.000Z"}}}},"400":{"description":"VALIDATION_FAILED (reason: port_denied): That port is never probed (mail and Windows file-sharing ports). Choose another port, or omit port for a ping-only check.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The Gateway is suspended. Read gateway.status: billing means pay the open invoice, review means open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"PRECONDITION (reason: tunnel_not_up): The device is not connected right now. Switch the tunnel on, poll gateway.test.tunnel until code is up, then run again.\nPRECONDITION (reason: probe_target_refused): The check cannot be run for this address. Nothing in the request changes that; open a support ticket.\nIN_PROGRESS: A check for this Gateway is already running. Wait a few seconds, then read gateway.test.reachable.get.\nNOT_READY: The Gateway is not active yet. Poll gateway.get until state is active; if it is needs_support, open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"RATE_LIMITED (reason: cooldown): Runs for one Gateway must be a few seconds apart. Wait for Retry-After.\nRATE_LIMITED (reason: hourly): Too many runs for this Gateway. Wait for Retry-After.\nRATE_LIMITED (reason: ports): Too many different ports in a short time. Wait for Retry-After, or reuse a port already checked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The check could not be run from our side. This is not a verdict on the device; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/test/egress":{"get":{"operationId":"gateway.test.egress.get","summary":"Read the result of the device-IP check.","description":"Returns the state of the check started with gateway.test.egress.start. Poll every few seconds while state is waiting. passed completes setup. not_routed means the device opened the link from another address (given in observed.ip): switch the tunnel on and open the link again. After expired, start a new check.","x-tier":"read","x-scope":"gateway:read","x-required-scopes":["gateway:read"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"test_id","in":"query","required":false,"schema":{"type":"string"},"description":"test_id from gateway.test.egress.start. Omit to read the latest check. An id that is no longer the active check reads as expired."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["waiting","passed","not_routed","expired"],"description":"waiting: the link has not been opened yet; poll again. passed: the device reached us from the Gateway IP. not_routed: the device reached us from another address (see observed); switch the tunnel on and open the link again. expired: the link ran out before a pass; start a new check."},"hits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many times the link was opened"},"last_hit_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the link was last opened; null when it has not been"},"observed":{"description":"Only for not_routed: the address the device actually used","type":"object","properties":{"ip":{"type":"string"}},"required":["ip"],"additionalProperties":false}},"required":["state","hits","last_hit_at"],"additionalProperties":false},"example":{"state":"passed","hits":1,"last_hit_at":"2026-11-14T10:12:30.000Z"}}}},"409":{"description":"PRECONDITION (reason: no_test): No check has been started for this Gateway, or the last one is gone. Call gateway.test.egress.start.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"gateway.test.egress.start","summary":"Check that the device goes out with the Gateway IP.","description":"Setup step 5 of 5. Returns a link that is valid until expires_at (about ten minutes). The link must be opened from the device that uses the Gateway, with the tunnel switched on: in its browser, by scanning qr_payload, or on a server by running command (mode bound). Then poll gateway.test.egress.get with the test_id until state is passed, not_routed or expired. Calling again while a link is active returns the same link with reused true; send fresh true to get a new one.","x-tier":"safe","x-scope":"gateway:write","x-required-scopes":["gateway:write"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"default":"browser","description":"browser: open the link in a browser on the device. bound: for a server; the response also carries a command that sends the request from the Gateway address.","type":"string","enum":["browser","bound"]},"fresh":{"description":"true issues a new link even if one is still active; the old link stops working","type":"boolean"}},"additionalProperties":false},"example":{"mode":"browser"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"test_id":{"type":"string","description":"Id of this check, for gateway.test.egress.get"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The link stops working at this time"},"url":{"type":"string","description":"Open this from the device that uses the Gateway, with the tunnel switched on"},"qr_payload":{"type":"string","description":"Text to show as a QR code for a phone; the same link"},"command":{"description":"Only for mode bound: a command to run on the server, which sends the request from the Gateway address","type":"string"},"reused":{"description":"True when this is the link that was already active, not a new one","type":"boolean"}},"required":["test_id","expires_at","url","qr_payload"],"additionalProperties":false},"example":{"test_id":"0123456789abcdef","expires_at":"2026-11-14T10:20:00.000Z","url":"https://check.example.com/c/EXAMPLEexampleTOKEN000","qr_payload":"https://check.example.com/c/EXAMPLEexampleTOKEN000"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The Gateway is suspended. Read gateway.status: billing means pay the open invoice, review means open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"NOT_READY: The Gateway is not active or has no IP address yet. Poll gateway.get until state is active.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"UNAVAILABLE: This check is not available at the moment. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/stats":{"get":{"operationId":"gateway.stats","summary":"Read recent traffic samples for a Gateway.","description":"Returns throughput samples in Mbps for the last hour (the default) or the last 24 hours, oldest first. The list is empty until the Gateway is active. Changes nothing.","x-tier":"read","x-scope":"gateway:read","x-required-scopes":["gateway:read"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"window","in":"query","required":false,"schema":{"type":"string","enum":["1h","24h"]},"description":"How far back the samples go; defaults to 1h"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","properties":{"sampled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},"rx_mbps":{"type":"number","description":"Megabits per second received from the device (its upload)"},"tx_mbps":{"type":"number","description":"Megabits per second sent to the device (its download)"}},"required":["sampled_at","rx_mbps","tx_mbps"],"additionalProperties":false},"description":"Traffic samples, oldest first; empty until the Gateway is active"}},"required":["points"],"additionalProperties":false},"example":{"points":[{"sampled_at":"2026-11-14T10:00:00.000Z","rx_mbps":1.5,"tx_mbps":12.25},{"sampled_at":"2026-11-14T10:01:00.000Z","rx_mbps":0.8,"tx_mbps":9.5}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/tier":{"post":{"operationId":"gateway.tier.change","summary":"Change the speed of a Gateway.","description":"Requests another speed tier (25, 50, 100 or 250 Mbps). The call itself takes no payment and needs no confirm: what can be charged is bounded by the tier you name. A higher tier returns kind invoice, one unpaid invoice (invoice_id, amount_minor in USD) for the prorated price difference up to the next renewal; the new speed applies as soon as that invoice is paid, for example with invoices.credit.create, which takes its own spending cap, and nothing changes while it is unpaid. A lower tier returns kind scheduled: no invoice, the lower price is set for the next renewal and the lower speed applies when that renewal invoice is paid. Repeating the same upgrade request returns the same invoice.","x-tier":"money","x-scope":"gateway:write","x-required-scopes":["gateway:write","billing:pay"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:write","billing:pay"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"anyOf":[{"type":"number","const":25},{"type":"number","const":50},{"type":"number","const":100},{"type":"number","const":250}],"description":"Speed in Mbps: 25, 50, 100 or 250. Traffic is unmetered at that speed."}},"required":["tier"],"additionalProperties":false},"example":{"tier":100}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"invoice"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Unpaid invoice for the prorated difference. The new speed applies when it is paid."},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Whole minor units (cents) of the currency beside it"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"ISO 4217 currency of the amounts beside it"},"pay_url":{"type":"string","format":"uri","description":"Link in the client area where a person can pay this invoice"}},"required":["kind","invoice_id","amount_minor","currency","pay_url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"scheduled"},"effective":{"type":"string","const":"renewal","description":"The lower speed applies when the next renewal invoice is paid"}},"required":["kind","effective"],"additionalProperties":false}]},"example":{"kind":"invoice","invoice_id":90117,"amount_minor":237,"currency":"USD","pay_url":"https://portal.example.com/pay/90117"}}}},"409":{"description":"PRECONDITION (reason: same_tier): The Gateway is already on that speed.\nPRECONDITION (reason: not_active): The Gateway is not active yet. Poll gateway.get until state is active.\nPRECONDITION (reason: suspended): The Gateway is suspended. Read gateway.status: pay the open invoice (billing) or open a support ticket (review), then retry.\nPRECONDITION (reason: tier_not_sold_here): That speed is not offered in this location. Choose another tier.\nPRECONDITION (reason: currency_unsupported): The Gateway is not billed in USD, and speed changes are USD only. Open a support ticket to change speed.\nPRECONDITION (reason: custom_price): The Gateway has a custom price. Open a support ticket to change speed.\nPRECONDITION (reason: invoice_open): An unpaid invoice for this Gateway exists. Find it with invoices.list, pay it, then retry.\nPRECONDITION (reason: renewal_invoice_open): The renewal invoice is open, so a lower speed cannot be scheduled. Pay it, then retry.\nPRECONDITION (reason: renewal_due): Renewal is less than a day away. Retry after the Gateway has renewed.\nPRECONDITION (reason: upgrade_pending): A speed upgrade is already waiting for payment or being applied. Pay its invoice (invoices.list) and let it apply before asking for another change.\nPRECONDITION (reason: downgrade_pending): A lower speed is already scheduled for the next renewal (pending_downgrade_tier on gateway.get). Wait for the renewal, or open a support ticket.\nPRECONDITION (reason: nothing_to_prorate): The prorated difference rounds to zero. Retry after the Gateway has renewed.\nPRECONDITION (reason: bad_expiry): The renewal date of the Gateway could not be read. Open a support ticket.\nPRECONDITION (reason: changed): The Gateway changed while the request ran. Read gateway.get and retry.\nPRECONDITION (reason: busy): Another change to this Gateway is in progress. Retry in a few minutes.\nPRECONDITION (reason: invoice_failed): The invoice could not be raised and nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The outcome is unknown. Read gateway.get (pending_downgrade_tier) and invoices.list before trying again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/gateways/{id}/cancel":{"post":{"operationId":"gateway.cancel","summary":"Cancel a Gateway now and release its IP address.","description":"Destructive and immediate: billing for the Gateway stops and its IP address goes back to the pool, where it may be issued to someone else. It cannot be undone and the same address cannot be recovered. confirm must equal the Gateway id in the URL. released true means the address is already released; false means the cancellation is done and we finish the release ourselves. Once released, the Gateway is no longer listed and its id answers 404.","x-tier":"destructive","x-scope":"gateway:write","x-required-scopes":["gateway:write","services:cancel"],"x-auth-mode":"bearer","security":[{"bearer":["gateway:write","services:cancel"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your Gateway id (service_id from gateway.list)"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Must equal the Gateway id in the URL"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"released":{"type":"boolean","description":"true: the IP address is released. false: billing is cancelled and we finish releasing the address ourselves; nothing more to do."}},"required":["ok","released"],"additionalProperties":false},"example":{"ok":true,"released":true}}}},"400":{"description":"VALIDATION_FAILED: confirm is missing or does not equal the Gateway id in the URL (the refusal carries field: confirm). Nothing is changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED (reason: cancel_blocked): The Gateway is held by our team (cancel_blocked is true on gateway.get) and cannot be cancelled through the API. Open a support ticket.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The outcome is unknown. Read gateway.get before trying again: 404 means the Gateway was cancelled.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/metrics/history":{"get":{"operationId":"vm.metrics.history","summary":"Read up to 24 past resource samples for a server.","description":"Returns samples of CPU, memory, disk space, disk activity and network activity over the chosen `range` (1h, 6h, 24h or 7d; default 1h), oldest first. When more than 24 samples exist the period is split into 24 equal parts and the latest sample of each part is returned. History is kept for 7 days. A missing sample or a null value means nothing was measured then, not zero usage; an empty list means nothing has been collected for that period.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"range","in":"query","required":false,"schema":{"type":"string","enum":["1h","6h","24h","7d"]},"description":"History period; defaults to 1h."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"history":{"maxItems":24,"type":"array","items":{"type":"object","properties":{"sampled_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the sample was taken."},"cpu_usage_percent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"CPU in use, 0 to 100, averaged across the server's vCPUs. Null when it could not be measured."},"memory_usage_percent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Memory in use, 0 to 100. Null when it could not be measured."},"disk_usage_percent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Space used on the main disk, 0 to 100. Null when it could not be measured."},"disk_read_kb_per_sec":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Disk reads. A rate in kilobytes per second around the time of the sample, not a running total. Null when it could not be measured."},"disk_write_kb_per_sec":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Disk writes. A rate in kilobytes per second around the time of the sample, not a running total. Null when it could not be measured."},"network_in_kb_per_sec":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Traffic received. A rate in kilobytes per second around the time of the sample, not a running total. Null when it could not be measured."},"network_out_kb_per_sec":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Traffic sent. A rate in kilobytes per second around the time of the sample, not a running total. Null when it could not be measured."},"bandwidth_used_gb":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Traffic counted so far, in gigabytes: a running total, not a rate. Null on samples that do not carry it."}},"required":["sampled_at","cpu_usage_percent","memory_usage_percent","disk_usage_percent","disk_read_kb_per_sec","disk_write_kb_per_sec","network_in_kb_per_sec","network_out_kb_per_sec","bandwidth_used_gb"],"additionalProperties":false},"description":"Oldest first. A gap means no sample was collected, not zero usage."}},"required":["history"],"additionalProperties":false},"example":{"history":[{"sampled_at":"2026-11-14T09:00:00.000Z","cpu_usage_percent":11.5,"memory_usage_percent":37.2,"disk_usage_percent":41,"disk_read_kb_per_sec":3.1,"disk_write_kb_per_sec":98.4,"network_in_kb_per_sec":75,"network_out_kb_per_sec":280.9,"bandwidth_used_gb":null},{"sampled_at":"2026-11-14T09:05:00.000Z","cpu_usage_percent":64,"memory_usage_percent":39.8,"disk_usage_percent":41,"disk_read_kb_per_sec":null,"disk_write_kb_per_sec":null,"network_in_kb_per_sec":1250.3,"network_out_kb_per_sec":4100,"bandwidth_used_gb":182.44}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/ping":{"post":{"operationId":"vm.ping","summary":"Ping a server's primary address from our network.","description":"Sends three pings from our side to the server's primary IP address and reports whether it answered and the average round-trip time. It changes nothing on the server. `unreachable` only means ping got no answer: a server whose firewall drops ping reports unreachable while working normally, so check vm.get `power_state` before concluding it is down.","x-tier":"safe","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"latency":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Average round-trip time in whole milliseconds; null when unreachable or not measured"},"status":{"type":"string","enum":["reachable","unreachable"],"description":"unreachable means no reply to ping within a few seconds. A server whose firewall drops ping reports unreachable while working normally"}},"required":["latency","status"],"additionalProperties":false},"example":{"latency":12,"status":"reachable"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"NOT_READY (reason: no_ip_address): The server has no IP address yet, usually because it is still being set up. Retry once vm.get lists an address in `ips`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/isp-static/credentials":{"get":{"operationId":"proxy.isp_static.credentials.get","summary":"Read the credential for your dedicated static proxy IPs.","description":"Returns the secret key that authenticates you to your dedicated static IPs. It is a different key from the one proxy.credentials.get returns and is not changed by proxy.credentials.rotate. `api_key` is null when you have no dedicated IP in use yet. Treat it like a password.","x-tier":"read","x-scope":"proxy:credentials","x-required-scopes":["proxy:credentials"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:credentials"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Opaque credential for your dedicated static IPs. A secret: do not parse, log or share it. Null when you have no usable dedicated IP yet."}},"required":["api_key"],"additionalProperties":false},"example":{"api_key":"EXAMPLE-STATIC-KEY-DO-NOT-USE"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/isp-static":{"get":{"operationId":"proxy.isp_static.get","summary":"List your dedicated static proxy IPs.","description":"Returns each dedicated static IP you rent: its address, country, status, the day it is paid through and the service it is billed under. A row with status `setting_up` has been paid for and has no address yet; it usually becomes `active` within minutes. An `expired` address is past its paid-through day and is refused. The credential for these addresses is separate from the pay-per-gigabyte proxy: read it with proxy.isp_static.credentials.get.","x-tier":"read","x-scope":"proxy:read","x-required-scopes":["proxy:read"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"ip":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"null"}],"description":"The dedicated address; null while it is being set up"},"country":{"type":"string","description":"Country code of the address (two letters; three letters while it is being set up)"},"renewal_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}],"description":"Paid through the end of this UTC day, YYYY-MM-DD; null while it is being set up"},"status":{"type":"string","enum":["active","expired","setting_up"],"description":"active: usable. expired: past its paid-through day and refused. setting_up: paid for, not usable yet."},"service_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"The service this address is billed under; null when it is not linked to one"}},"required":["ip","country","renewal_date","status","service_id"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"ip":"203.0.113.25","country":"GB","renewal_date":"2026-12-01","status":"active","service_id":4830},{"ip":null,"country":"USA","renewal_date":null,"status":"setting_up","service_id":4831}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/activity":{"get":{"operationId":"vm.activity.list","summary":"List recent activity on a server.","description":"Returns the newest events on the server (started, stopped, reinstalled, backup created and so on), newest first, each with a plain label, an outcome and a time. Routine housekeeping is left out. It is meant for showing a person what happened; entries carry no ids, so it cannot follow a specific request. To follow a 202 response poll vm.operations.get, and for cancellable or retryable work use vm.tasks.list.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["Server operation","Server created","Server started","Server stopped","Server restarted","Operating system reinstalled","Server suspended","Server resumed","Plan changed","Boot mode changed","Root password reset","Server settings changed","Server powered off","IP address added","IP address removed","Reverse DNS updated","Backup created","Backup restored","Backup deleted","Snapshot created","Snapshot restored","Snapshot deleted"],"description":"What happened, as a label for people. `Server operation` covers anything without a label of its own"},"status":{"type":"string","enum":["success","failed","pending"],"description":"pending means still running"},"occurred_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When it finished, or when it started if it is still running"}},"required":["action","status","occurred_at"],"additionalProperties":false},"description":"Newest first"}},"required":["data"],"additionalProperties":false},"example":{"data":[{"action":"Server restarted","status":"success","occurred_at":"2026-11-14T10:00:21.000Z"},{"action":"Backup created","status":"success","occurred_at":"2026-11-13T02:10:05.000Z"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/account/alerts":{"get":{"operationId":"account.alerts.list","summary":"List the alerts that need your attention.","description":"Returns the same alert feed the customer sees in the client area, newest first, built fresh on every call. Each alert has a kind and, where it concerns one thing, that thing's id in resource_id. What to do per kind: invoice (unpaid or overdue) means read the invoice and pay it or tell the customer, because unpaid invoices lead to suspension; renewal means a service renews soon, so make sure it can be paid; ticket_reply means support staff answered, so read it with tickets.get and answer with tickets.reply or finish with tickets.close; ticket_new, ticket_pending and ticket_progress mean a ticket is waiting for staff and need no action; ticket_closed is informational; announcement and notice are messages to pass on to the customer. Invoice, renewal and ticket alerts disappear by themselves once their cause is gone; notices stay until the customer dismisses them in the client area. title and message are written for people; do not parse them.","x-tier":"read","x-scope":"account:read","x-required-scopes":["account:read"],"x-auth-mode":"bearer","security":[{"bearer":["account:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"alerts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable id of the alert"},"kind":{"type":"string","enum":["invoice","renewal","ticket_reply","ticket_new","ticket_pending","ticket_progress","ticket_closed","announcement","notice"],"description":"invoice: an unpaid invoice (resource_id is the invoice id). renewal: an active service renews soon (service id). ticket_reply: support staff answered a ticket and it waits for you (ticket id). ticket_new: a ticket was opened in the last 48 hours (ticket id). ticket_pending / ticket_progress: a ticket is with support staff (ticket id). ticket_closed: a ticket was closed in the last 48 hours (ticket id). announcement: a published announcement (announcement id). notice: any other account notice, such as a reverse-DNS decision or an API-key review; read the message"},"resource_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Id of the invoice, service, ticket or announcement the alert is about, as described under kind. null for a notice"},"title":{"type":"string","description":"Short heading, written for a person"},"message":{"type":"string","description":"One-line explanation, written for a person. Do not parse it; use kind and resource_id"},"event_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"The moment the alert refers to, ISO 8601 UTC: the due date (at 00:00 UTC) for an invoice or renewal, the latest activity for a ticket, the publication time for an announcement or notice. null when unknown"},"read":{"type":"boolean","description":"false while the alert still needs attention; true for older, informational entries"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Path of the matching page in the client area (e.g. /invoices/91), null when there is none"}},"required":["id","kind","resource_id","title","message","event_at","read","link"],"additionalProperties":false},"description":"Newest event first. Not paginated"}},"required":["alerts"],"additionalProperties":false},"example":{"alerts":[{"id":"ticket-reply-1042","kind":"ticket_reply","resource_id":1042,"title":"Staff Reply","message":"Support replied to: Server 4821 unreachable after reboot","event_at":"2026-11-14T09:41:03.000Z","read":false,"link":"/support/1042"},{"id":"invoice-7731","kind":"invoice","resource_id":7731,"title":"Invoice Due","message":"Invoice #7731 is due in 3 days","event_at":"2026-11-17T00:00:00.000Z","read":false,"link":"/invoices/7731"},{"id":"renewal-4821","kind":"renewal","resource_id":4821,"title":"Renewal Due Soon","message":"web-1.example.com renews in 6 days","event_at":"2026-11-20T00:00:00.000Z","read":false,"link":"/services/4821"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/orders/{order_id}/cancellation":{"post":{"operationId":"orders.cancel","summary":"Cancel an unpaid order and return its reserved stock.","description":"Cancels an order that was created through this API and has not been paid. Its reserved stock is returned, its invoice and its pending services are cancelled, and anything already part-paid towards it is credited to your wallet in the same currency (wallet_credit_minor). A paid order is refused: this never stops or deletes a server; use services.cancel for a running service. confirm must equal the order id. Calling it again returns the same release record.","x-tier":"destructive","x-scope":"orders:cancel","x-required-scopes":["orders:cancel","billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["orders:cancel","billing:read"]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":2147483647},"description":"Your order id, from orders.list or orders.create"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Must equal the order id in the URL"},"credit_partial_payments_to_wallet":{"type":"boolean","const":true,"description":"Must be true: you agree that anything already paid towards the order invoice is returned as wallet credit in the same currency, not to the original payment method"}},"required":["confirm","credit_partial_payments_to_wallet"],"additionalProperties":false,"description":"Cancels an unpaid order, returns its reserved stock and credits any part payment to your wallet. A paid order is refused; this never stops or deletes a server."},"example":{"confirm":5012,"credit_partial_payments_to_wallet":true}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","const":"order_release"},"order_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"invoice_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"null"}]},"service_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647}},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"ISO 4217 currency of the amounts beside it"},"state":{"type":"string","const":"released"},"reason":{"type":"string","enum":["customer_cancelled","expired"],"description":"customer_cancelled: you cancelled it. expired: the reservation ran out unpaid first"},"released_at":{"description":"When the order was released, ISO 8601 UTC","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"wallet_credit_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Part payment returned to your wallet when the order was released, in whole minor units of currency. Zero when nothing had been paid"}},"required":["kind","order_id","invoice_id","service_ids","currency","state","reason","released_at","wallet_credit_minor"],"additionalProperties":false,"description":"The record of an order being released. It is fixed at release time: it is not your current wallet balance."},"example":{"kind":"order_release","order_id":5012,"invoice_id":9031,"service_ids":[7044],"currency":"USD","state":"released","reason":"customer_cancelled","released_at":"2026-11-14T10:06:30.000Z","wallet_credit_minor":0}}}},"400":{"description":"VALIDATION_FAILED: confirm is missing or does not equal the order id in the URL (the refusal carries field: confirm), or credit_partial_payments_to_wallet is not true. Nothing is changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"RESOURCE_STATE_CONFLICT (reason: order_not_cancellable): The order is paid, has a payment in progress, has a server, or was not created through this API. Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The cancellation may or may not have happened. Read orders.cancellation.get before trying again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"get":{"operationId":"orders.cancellation.get","summary":"Read how an order was cancelled or ran out of time.","description":"Returns the release record of an order: why it was released (you cancelled it, or it ran out of time unpaid), when, and how much part payment was credited to your wallet. It changes nothing. release is null when the order has not been released.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":2147483647},"description":"Your order id, from orders.list or orders.create"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"release":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"order_release"},"order_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"invoice_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"null"}]},"service_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647}},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"ISO 4217 currency of the amounts beside it"},"state":{"type":"string","const":"released"},"reason":{"type":"string","enum":["customer_cancelled","expired"],"description":"customer_cancelled: you cancelled it. expired: the reservation ran out unpaid first"},"released_at":{"description":"When the order was released, ISO 8601 UTC","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"wallet_credit_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Part payment returned to your wallet when the order was released, in whole minor units of currency. Zero when nothing had been paid"}},"required":["kind","order_id","invoice_id","service_ids","currency","state","reason","released_at","wallet_credit_minor"],"additionalProperties":false,"description":"The record of an order being released. It is fixed at release time: it is not your current wallet balance."},{"type":"null"}]}},"required":["release"],"additionalProperties":false,"description":"release is null when the order has not been released (or is not yours). Null does not prove a cancellation is not in progress."},"example":{"release":{"kind":"order_release","order_id":5012,"invoice_id":9031,"service_ids":[7044],"currency":"USD","state":"released","reason":"customer_cancelled","released_at":"2026-11-14T10:06:30.000Z","wallet_credit_minor":0}}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/orders":{"get":{"operationId":"orders.list","summary":"List your orders, newest first.","description":"Returns your orders with their stock reservation and the billing status of each service. Filter by currency and page with cursor (descending order ids). It gives no totals: read the invoice for amounts, and orders.get for one order.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1–100 orders, default 20"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from the previous page; descending order IDs"},{"name":"currency","in":"query","required":false,"schema":{"type":"string","enum":["USD","EUR","GBP"]},"description":"Exact order currency"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of every amount in this order"},"created_at":{"description":"When the order was placed, ISO 8601 UTC. Null when not recorded","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}]},"reservation":{"anyOf":[{"type":"object","properties":{"created_at":{"description":"When the stock was reserved, ISO 8601 UTC","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"expires_at":{"description":"When the reservation ends, ISO 8601 UTC. Pay before this; an order still unpaid after it can be released and its stock returned","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"type":"string","enum":["held","funded","released"],"description":"held: stock is reserved and the order is unpaid. funded: the order was paid in time. released: the order was cancelled or ran out of time and its stock was returned"}},"required":["created_at","expires_at","state"],"additionalProperties":false,"description":"The stock reservation of this order. funded does not by itself mean the server is built."},{"type":"null"}],"description":"Null when the order has no stock reservation, for example an order placed outside the API."},"services":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Service id. Read it with the services operations; it is also the server id once the server exists"},"product_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"null"}]},"status":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,49}$","description":"Billing status of the service: pending (order not yet paid), active, suspended or cancelled"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"recurring_amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recurring price per unit and billing cycle, in whole minor units of the order currency"}},"required":["id","product_id","status","quantity","recurring_amount_minor"],"additionalProperties":false}}},"required":["id","currency","created_at","reservation","services"],"additionalProperties":false,"description":"An order and the billing state of its services, as they are now. A billing status does not say whether the server is built: read the server for that. No order total is given; read the invoice."}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to read the next page. Null on the last page"}},"required":["data","next_cursor"],"additionalProperties":false},"example":{"data":[{"id":5012,"currency":"USD","created_at":"2026-11-14T10:00:00.000Z","reservation":{"created_at":"2026-11-14T10:00:00.000Z","expires_at":"2026-11-14T10:15:00.000Z","state":"held"},"services":[{"id":7044,"product_id":1201,"status":"pending","quantity":1,"recurring_amount_minor":599}]}],"next_cursor":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"orders.create","summary":"Create an order from a previewed price.","description":"Creates the order, one service per unit and one unpaid invoice, and holds the stock until reservation.expires_at (15 minutes). It takes no payment itself: max_invoice_minor is the spending ceiling, the most the first invoice may come to, and the order is refused if a price has changed since orders.preview. Next, pay invoice_id before the reservation ends (invoices.credit.create pays it from wallet credit); the server is then built automatically, and each id in service_ids is the service (services.get) and the server (vm.get). An order left unpaid is released, its stock returned, and a later payment becomes wallet credit. If you do not get a reply, call orders.recover with the same Idempotency-Key value instead of ordering again.","x-tier":"money","x-scope":"orders:create","x-required-scopes":["orders:create","billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["orders:create","billing:read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of every amount in this request. Must be your account currency, as returned by the order preview"},"max_invoice_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Spending ceiling: the most the first invoice of this order may come to, in whole minor units of currency. The request is refused when the items add up to more"},"coupon_code":{"description":"coupon_code from the order preview, unchanged","type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"},"reservation_terms":{"description":"reservation_terms from the order preview, unchanged. Required for a new order","type":"object","properties":{"duration_seconds":{"type":"number","const":900,"description":"How long stock is held for an unpaid order, in seconds"},"credit_partial_payments_to_wallet":{"type":"boolean","const":true,"description":"If the order is released unpaid, anything already paid towards it is returned as wallet credit in the same currency"},"credit_late_payments_to_wallet":{"type":"boolean","const":true,"description":"A payment that arrives after the order was released becomes wallet credit; it does not revive the order"}},"required":["duration_seconds","credit_partial_payments_to_wallet","credit_late_payments_to_wallet"],"additionalProperties":false},"items":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"product_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Product id from the catalogue"},"billing_cycle":{"type":"string","enum":["free","onetime","monthly","quarterly","semiannually","annually","biennially","triennially"],"description":"One of the cycles listed in the product prices"},"quantity":{"default":1,"description":"How many identical units. Each unit becomes its own service","type":"integer","minimum":1,"maximum":10},"configuration":{"default":[],"description":"One entry per option chosen. An operating_system option must be chosen where the product has one; other options are optional","maxItems":64,"type":"array","items":{"type":"object","properties":{"option_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Option id from the product"},"value_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Id of the chosen value of that option"}},"required":["option_id","value_id"],"additionalProperties":false}},"hostname":{"description":"Hostname for the server, lower case, for example web1.example.com","type":"string","minLength":1,"maxLength":253},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"unit_price_minor of this item from the order preview, unchanged"},"unit_setup_fee_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"unit_setup_fee_minor of this item from the order preview, unchanged"},"unit_invoice_price_minor":{"description":"unit_invoice_price_minor of this item from the order preview, unchanged. Required when coupon_code is sent","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["product_id","billing_cycle","unit_price_minor","unit_setup_fee_minor"],"additionalProperties":false}}},"required":["currency","max_invoice_minor","items"],"additionalProperties":false,"description":"An order for 1 to 10 units. Copy currency, coupon_code, reservation_terms and each item with its unit amounts from the order preview; the order is refused if any price has changed since. max_invoice_minor is your spending ceiling. Creating the order takes no payment."},"example":{"currency":"USD","max_invoice_minor":599,"reservation_terms":{"duration_seconds":900,"credit_partial_payments_to_wallet":true,"credit_late_payments_to_wallet":true},"items":[{"product_id":1201,"billing_cycle":"monthly","quantity":1,"configuration":[{"option_id":71,"value_id":801}],"hostname":"web1.example.com","unit_price_minor":599,"unit_setup_fee_minor":0}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","const":"order_acceptance"},"coupon_code":{"description":"The coupon applied, when one was requested","type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"},"order_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"invoice_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"null"}],"description":"The unpaid invoice to pay for this order. Null only when nothing is due"},"service_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"description":"One service per unit ordered. A service id is also the server id once the server exists"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"ISO 4217 currency of the amounts beside it"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total of the first invoice, in whole minor units of currency"},"reservation":{"type":"object","properties":{"created_at":{"description":"When the stock was reserved, ISO 8601 UTC","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"expires_at":{"description":"When the reservation ends, ISO 8601 UTC. Pay before this; an order still unpaid after it can be released and its stock returned","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["created_at","expires_at"],"additionalProperties":false,"description":"The window in which stock is held for the unpaid order. Passing expires_at does not by itself mean the order was released: read the order to see its current state. It is separate from the invoice due date."}},"required":["kind","order_id","invoice_id","service_ids","currency","amount_minor","reservation"],"additionalProperties":false,"description":"The order as it was accepted. It does not say whether the invoice has since been paid or the server built: read the order, the invoice and the service for their current state."},"example":{"kind":"order_acceptance","order_id":5012,"invoice_id":9031,"service_ids":[7044],"currency":"USD","amount_minor":599,"reservation":{"created_at":"2026-11-14T10:00:00.000Z","expires_at":"2026-11-14T10:15:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED (reason: price_changed): A unit amount in the request no longer matches the current price. Nothing was created. Call orders.preview again and send the new amounts.\nVALIDATION_FAILED (reason: reservation_terms_required): reservation_terms is missing. Copy it from orders.preview.\nVALIDATION_FAILED (reason: billing_cycle_not_offered): The item at details.item_index asks for a billing cycle the product has no price for. Use a cycle from the product prices.\nVALIDATION_FAILED (reason: option_not_offered): The item at details.item_index names an option or value the product does not have, or one with no price on that billing cycle. Read catalog.products.get again.\nVALIDATION_FAILED (reason: operating_system_required): The item at details.item_index has no choice for an operating_system option. Add one to its configuration.\nVALIDATION_FAILED (reason: country_required): The item at details.item_index is a static proxy address and has no choice for its country option. Add one to its configuration; catalog.products.get lists the countries in stock.\nVALIDATION_FAILED (reason: coupon_invalid): coupon_code cannot be used by this account. Remove it, or check it with catalog.coupons.preview.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED (reason: email_not_verified): The account email address is not verified. The customer must verify it in the client area before ordering.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND: A product_id in the request is not on sale. Read catalog.products.list for the products you can order.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"LIMIT_REACHED (reason: open_order_limit): The account already has the most unpaid orders it may hold at once. Pay or cancel one (orders.cancel), or wait for it to run out.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The order may or may not have been created. Do not order again with a new key: retry with the same Idempotency-Key, or call orders.recover.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"UNAVAILABLE (reason: out_of_stock): An item is sold out in the quantity asked. Nothing was created. Order fewer units, another product, or try later.\nUNAVAILABLE (reason: product_not_orderable): The product (details.product_id) cannot be ordered through the API right now: its configuration_status is unavailable. Try later or choose another product.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/orders/{order_id}":{"get":{"operationId":"orders.get","summary":"Read one order and the status of its services.","description":"Returns when the order was placed, its stock reservation (held while unpaid, funded once paid, released when cancelled or out of time) and the billing status of each service. Use it after orders.create to see whether the order was paid or released. A billing status of active does not by itself mean the server is built: read the server with vm.get using the service id.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"maximum":2147483647},"description":"Your order id, from orders.list or orders.create"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of every amount in this order"},"created_at":{"description":"When the order was placed, ISO 8601 UTC. Null when not recorded","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}]},"reservation":{"anyOf":[{"type":"object","properties":{"created_at":{"description":"When the stock was reserved, ISO 8601 UTC","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"expires_at":{"description":"When the reservation ends, ISO 8601 UTC. Pay before this; an order still unpaid after it can be released and its stock returned","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"state":{"type":"string","enum":["held","funded","released"],"description":"held: stock is reserved and the order is unpaid. funded: the order was paid in time. released: the order was cancelled or ran out of time and its stock was returned"}},"required":["created_at","expires_at","state"],"additionalProperties":false,"description":"The stock reservation of this order. funded does not by itself mean the server is built."},{"type":"null"}],"description":"Null when the order has no stock reservation, for example an order placed outside the API."},"services":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Service id. Read it with the services operations; it is also the server id once the server exists"},"product_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"null"}]},"status":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,49}$","description":"Billing status of the service: pending (order not yet paid), active, suspended or cancelled"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"recurring_amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recurring price per unit and billing cycle, in whole minor units of the order currency"}},"required":["id","product_id","status","quantity","recurring_amount_minor"],"additionalProperties":false}}},"required":["id","currency","created_at","reservation","services"],"additionalProperties":false,"description":"An order and the billing state of its services, as they are now. A billing status does not say whether the server is built: read the server for that. No order total is given; read the invoice."},"example":{"id":5012,"currency":"USD","created_at":"2026-11-14T10:00:00.000Z","reservation":{"created_at":"2026-11-14T10:00:00.000Z","expires_at":"2026-11-14T10:15:00.000Z","state":"held"},"services":[{"id":7044,"product_id":1201,"status":"pending","quantity":1,"recurring_amount_minor":599}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/orders/recover":{"post":{"operationId":"orders.recover","summary":"Find the order made by a request whose reply was lost.","description":"Looks up the order that an earlier orders.create request made, without creating or charging anything. Send that request's Idempotency-Key value as request_key together with the same order body. observation accepted returns the order exactly as orders.create would have; not_observed means no order exists for that key, so it is safe to call orders.create again.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_key":{"type":"string","pattern":"^[\\x21-\\x7e]{8,128}$","description":"The Idempotency-Key header value you sent with the original order request"},"order":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of every amount in this request. Must be your account currency, as returned by the order preview"},"max_invoice_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Spending ceiling: the most the first invoice of this order may come to, in whole minor units of currency. The request is refused when the items add up to more"},"coupon_code":{"description":"coupon_code from the order preview, unchanged","type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"},"reservation_terms":{"description":"reservation_terms from the order preview, unchanged. Required for a new order","type":"object","properties":{"duration_seconds":{"type":"number","const":900,"description":"How long stock is held for an unpaid order, in seconds"},"credit_partial_payments_to_wallet":{"type":"boolean","const":true,"description":"If the order is released unpaid, anything already paid towards it is returned as wallet credit in the same currency"},"credit_late_payments_to_wallet":{"type":"boolean","const":true,"description":"A payment that arrives after the order was released becomes wallet credit; it does not revive the order"}},"required":["duration_seconds","credit_partial_payments_to_wallet","credit_late_payments_to_wallet"],"additionalProperties":false},"items":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"product_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Product id from the catalogue"},"billing_cycle":{"type":"string","enum":["free","onetime","monthly","quarterly","semiannually","annually","biennially","triennially"],"description":"One of the cycles listed in the product prices"},"quantity":{"default":1,"description":"How many identical units. Each unit becomes its own service","type":"integer","minimum":1,"maximum":10},"configuration":{"default":[],"description":"One entry per option chosen. An operating_system option must be chosen where the product has one; other options are optional","maxItems":64,"type":"array","items":{"type":"object","properties":{"option_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Option id from the product"},"value_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Id of the chosen value of that option"}},"required":["option_id","value_id"],"additionalProperties":false}},"hostname":{"description":"Hostname for the server, lower case, for example web1.example.com","type":"string","minLength":1,"maxLength":253},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"unit_price_minor of this item from the order preview, unchanged"},"unit_setup_fee_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"unit_setup_fee_minor of this item from the order preview, unchanged"},"unit_invoice_price_minor":{"description":"unit_invoice_price_minor of this item from the order preview, unchanged. Required when coupon_code is sent","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["product_id","billing_cycle","unit_price_minor","unit_setup_fee_minor"],"additionalProperties":false}}},"required":["currency","max_invoice_minor","items"],"additionalProperties":false,"description":"The original order request body, unchanged"}},"required":["request_key","order"],"additionalProperties":false},"example":{"request_key":"order-web1-2026-11-14","order":{"currency":"USD","max_invoice_minor":599,"reservation_terms":{"duration_seconds":900,"credit_partial_payments_to_wallet":true,"credit_late_payments_to_wallet":true},"items":[{"product_id":1201,"billing_cycle":"monthly","quantity":1,"configuration":[{"option_id":71,"value_id":801}],"hostname":"web1.example.com","unit_price_minor":599,"unit_setup_fee_minor":0}]}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"order_acceptance"},"coupon_code":{"description":"The coupon applied, when one was requested","type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"},"order_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"invoice_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"null"}],"description":"The unpaid invoice to pay for this order. Null only when nothing is due"},"service_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"description":"One service per unit ordered. A service id is also the server id once the server exists"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"ISO 4217 currency of the amounts beside it"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total of the first invoice, in whole minor units of currency"},"reservation":{"type":"object","properties":{"created_at":{"description":"When the stock was reserved, ISO 8601 UTC","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"expires_at":{"description":"When the reservation ends, ISO 8601 UTC. Pay before this; an order still unpaid after it can be released and its stock returned","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["created_at","expires_at"],"additionalProperties":false,"description":"The window in which stock is held for the unpaid order. Passing expires_at does not by itself mean the order was released: read the order to see its current state. It is separate from the invoice due date."}},"required":["kind","order_id","invoice_id","service_ids","currency","amount_minor","reservation"],"additionalProperties":false,"description":"The order as it was accepted. It does not say whether the invoice has since been paid or the server built: read the order, the invoice and the service for their current state."},{"type":"null"}],"description":"The accepted order, or null when none was found for this request key"},"observation":{"type":"string","enum":["accepted","not_observed"],"description":"accepted: the original request created the order returned here. not_observed: no order exists for this request key, so it is safe to send the order again"}},"required":["order","observation"],"additionalProperties":false},"example":{"order":{"kind":"order_acceptance","order_id":5012,"invoice_id":9031,"service_ids":[7044],"currency":"USD","amount_minor":599,"reservation":{"created_at":"2026-11-14T10:00:00.000Z","expires_at":"2026-11-14T10:15:00.000Z"}},"observation":"accepted"}}}},"409":{"description":"IDEMPOTENCY_CONFLICT: The request key belongs to an order with a different body. Send the original body unchanged.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/orders/preview":{"post":{"operationId":"orders.preview","summary":"Price an order exactly, without creating it.","description":"Returns the exact price of an order: per-unit recurring price and setup fee with the chosen options, volume and coupon discounts, the first-invoice total (subtotal_minor) and whether every item is in stock. Nothing is reserved, created or charged, and the prices are not held. Take product_id, billing_cycle and the option ids from catalog.products.get; a server needs an operating system choice. To buy, copy currency, coupon_code, reservation_terms and each item with its unit amounts into orders.create.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"product_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Product id from the catalogue"},"billing_cycle":{"type":"string","enum":["free","onetime","monthly","quarterly","semiannually","annually","biennially","triennially"],"description":"One of the cycles listed in the product prices"},"quantity":{"default":1,"description":"How many identical units. Each unit becomes its own service","type":"integer","minimum":1,"maximum":10},"configuration":{"default":[],"description":"One entry per option chosen. An operating_system option must be chosen where the product has one; other options are optional","maxItems":64,"type":"array","items":{"type":"object","properties":{"option_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Option id from the product"},"value_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Id of the chosen value of that option"}},"required":["option_id","value_id"],"additionalProperties":false}}},"required":["product_id","billing_cycle"],"additionalProperties":false}},"coupon_code":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},"required":["items"],"additionalProperties":false,"description":"What you want to order: 1 to 10 items and at most 10 units in total. Each option may be chosen once per item. Nothing is reserved, charged or created.","examples":[{"items":[{"product_id":1201,"billing_cycle":"monthly","quantity":1,"configuration":[{"option_id":71,"value_id":801}]}]}]},"example":{"items":[{"product_id":1201,"billing_cycle":"monthly","quantity":1,"configuration":[{"option_id":71,"value_id":801}]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"reservation_terms":{"type":"object","properties":{"duration_seconds":{"type":"number","const":900,"description":"How long stock is held for an unpaid order, in seconds"},"credit_partial_payments_to_wallet":{"type":"boolean","const":true,"description":"If the order is released unpaid, anything already paid towards it is returned as wallet credit in the same currency"},"credit_late_payments_to_wallet":{"type":"boolean","const":true,"description":"A payment that arrives after the order was released becomes wallet credit; it does not revive the order"}},"required":["duration_seconds","credit_partial_payments_to_wallet","credit_late_payments_to_wallet"],"additionalProperties":false,"description":"Copy unchanged into the order. By sending it back you accept these terms"},"kind":{"type":"string","const":"estimate"},"coupon_code":{"description":"The coupon as stored. Copy it unchanged into the order","type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Your account currency. Every amount in this response is in it"},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total of the first invoice for all items, in whole minor units of currency: recurring price plus setup fees, less discounts"},"tax_included":{"type":"boolean","const":false,"description":"Always false: no tax is added"},"discounts_included":{"type":"boolean","description":"True when a volume discount or the requested coupon lowered any price"},"quantity":{"type":"integer","minimum":1,"maximum":10,"description":"Total units across all items"},"availability":{"type":"string","enum":["available","unavailable","unknown"],"description":"available: every item is in stock in the quantity asked. unavailable: at least one item is not; the order would be refused. unknown: stock could not be read just now; the order would be refused, try again shortly"},"items":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"item_index":{"type":"integer","minimum":0,"maximum":9,"description":"Position of this item in the request, from 0"},"product_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"name":{"type":"string"},"category":{"type":"string","enum":["vps","hosting","dedicated","proxies","gateway"]},"billing_cycle":{"type":"string","enum":["free","onetime","monthly","quarterly","semiannually","annually","biennially","triennially"]},"quantity":{"type":"integer","minimum":1,"maximum":10},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recurring price per unit and billing cycle, with the chosen options, after any volume discount and recurring coupon"},"unit_setup_fee_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"One-off fee per unit on the first invoice"},"unit_invoice_price_minor":{"description":"First-invoice amount per unit, including setup and coupon. Present only when a coupon was requested; copy it into the order","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"First-invoice amount for this item: per-unit amount times quantity"},"availability":{"type":"string","enum":["available","unavailable","unknown"]},"configuration":{"type":"array","items":{"type":"object","properties":{"option_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"value_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"name":{"type":"string","description":"Name of the chosen value"}},"required":["option_id","value_id","name"],"additionalProperties":false}}},"required":["item_index","product_id","name","category","billing_cycle","quantity","unit_price_minor","unit_setup_fee_minor","subtotal_minor","availability","configuration"],"additionalProperties":false}}},"required":["reservation_terms","kind","currency","subtotal_minor","tax_included","discounts_included","quantity","availability","items"],"additionalProperties":false},"example":{"reservation_terms":{"duration_seconds":900,"credit_partial_payments_to_wallet":true,"credit_late_payments_to_wallet":true},"kind":"estimate","currency":"USD","subtotal_minor":599,"tax_included":false,"discounts_included":false,"quantity":1,"availability":"available","items":[{"item_index":0,"product_id":1201,"name":"Example VPS 2 GB","category":"vps","billing_cycle":"monthly","quantity":1,"unit_price_minor":599,"unit_setup_fee_minor":0,"subtotal_minor":599,"availability":"available","configuration":[{"option_id":71,"value_id":801,"name":"Ubuntu 24.04"}]}]}}}},"400":{"description":"VALIDATION_FAILED (reason: billing_cycle_not_offered): The item at details.item_index asks for a billing cycle the product has no price for. Use a cycle from the product prices.\nVALIDATION_FAILED (reason: option_not_offered): The item at details.item_index names an option or value the product does not have, or one with no price on that billing cycle. Read catalog.products.get again.\nVALIDATION_FAILED (reason: operating_system_required): The item at details.item_index has no choice for an operating_system option. Add one to its configuration.\nVALIDATION_FAILED (reason: country_required): The item at details.item_index is a static proxy address and has no choice for its country option. Add one to its configuration; catalog.products.get lists the countries in stock.\nVALIDATION_FAILED (reason: coupon_invalid): coupon_code cannot be used by this account. Remove it, or check it with catalog.coupons.preview.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND: A product_id in the request is not on sale. Read catalog.products.list for the products you can order.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"UNAVAILABLE (reason: product_not_orderable): The product (details.product_id) cannot be ordered through the API right now: its configuration_status is unavailable. Try later or choose another product.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/rewards":{"get":{"operationId":"rewards.get","summary":"Read your rewards points balance and tier.","description":"Returns the points you can redeem now, the totals earned and redeemed, and your tier with its earning multiplier and progress to the next tier. Points are earned on purchases and referrals. Redeem them for wallet credit with rewards.redeem.","x-tier":"read","x-scope":"rewards:read","x-required-scopes":["rewards:read"],"x-auth-mode":"bearer","security":[{"bearer":["rewards:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"balance_points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Points you can redeem now"},"pending_points":{"type":"number","const":0,"description":"Always 0: points are credited at once"},"total_earned_points":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Points earned over the life of the account; this decides your tier"},"total_redeemed_points":{"type":"integer","minimum":0,"maximum":9007199254740991},"tier":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"min_points":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_points":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"earning_multiplier":{"type":"number","exclusiveMinimum":0,"description":"Points earned on purchases are multiplied by this in your tier"},"perks":{"type":"array","items":{"type":"string"}}},"required":["id","name","min_points","max_points","earning_multiplier","perks"],"additionalProperties":false},"tier_progress":{"type":"number","minimum":0,"maximum":100,"description":"Percent of the way from your tier to the next, 0 to 100"},"next_tier_points":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Total earned points at which the next tier starts. Null in the top tier"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When your rewards last changed, ISO 8601 UTC"}},"required":["balance_points","pending_points","total_earned_points","total_redeemed_points","tier","tier_progress","next_tier_points","updated_at"],"additionalProperties":false},"example":{"balance_points":1240,"pending_points":0,"total_earned_points":2240,"total_redeemed_points":1000,"tier":{"id":"silver","name":"Silver","min_points":1000,"max_points":4999,"earning_multiplier":1.25,"perks":["Priority support"]},"tier_progress":31,"next_tier_points":5000,"updated_at":"2026-11-12T08:30:00.000Z"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/rewards/redeem":{"post":{"operationId":"rewards.redeem","summary":"Turn rewards points into wallet credit.","description":"Takes exactly the number of points you name from your balance and adds wallet credit for them: 100 points are 1.00 in your account currency (USD, EUR or GBP), and the minimum is 100 points. The points amount in the request is your consent; nothing more is taken. The credit is added at once to your wallet in your account currency, and the response names that currency. A redemption cannot be undone. Read rewards.get first for the balance.","x-tier":"money","x-scope":"rewards:redeem","x-required-scopes":["rewards:redeem"],"x-auth-mode":"bearer","security":[{"bearer":["rewards:redeem"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"integer","minimum":100,"maximum":90071992547409,"description":"Exactly how many points to redeem, at least 100. 100 points become 1.00 of wallet credit in your account currency"}},"required":["points"],"additionalProperties":false},"example":{"points":1000}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"redeemed_points":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Points taken from your balance"},"credit_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Wallet credit added, in whole minor units (cents) of currency"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Your account currency: the credit is added to your wallet in it"},"balance_points":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Your points balance after the redemption"}},"required":["redeemed_points","credit_minor","currency","balance_points"],"additionalProperties":false},"example":{"redeemed_points":1000,"credit_minor":1000,"currency":"USD","balance_points":1240}}}},"409":{"description":"RESOURCE_STATE_CONFLICT (reason: insufficient_points): The balance is lower than the points asked for. Nothing was taken. Read rewards.get and ask for less.\nIN_PROGRESS: Another redemption for this account is being applied. Wait for Retry-After and send the same request again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The redemption may or may not have happened. Retry with the same Idempotency-Key (it cannot redeem twice), or read rewards.history.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/rewards/history":{"get":{"operationId":"rewards.history","summary":"List your rewards points transactions, newest first.","description":"Returns the points you earned and redeemed, each with the balance after it. Filter with type and page with cursor. This is the points history only: wallet credit from a redemption appears in billing.transactions.list.","x-tier":"read","x-scope":"rewards:read","x-required-scopes":["rewards:read"],"x-auth-mode":"bearer","security":[{"bearer":["rewards:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1–100 retained transactions, default 20"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from the previous page; bound to this account and transaction type"},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["purchase","first_purchase","monthly_loyalty","referral_reward","referral_bonus","milestone","redemption","manual","expiration"]},"description":"Filter by exact reward transaction type"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","enum":["purchase","first_purchase","monthly_loyalty","referral_reward","referral_bonus","milestone","redemption","manual","expiration"]},"amount_points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Points added (positive) or taken (negative) by this transaction"},"balance_points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Points balance after this transaction"},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the transaction happened, ISO 8601 UTC"}},"required":["id","type","amount_points","balance_points","description","created_at"],"additionalProperties":false},"description":"Your points transactions, newest first. This is the points history, not the wallet ledger."},"next_cursor":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Pass as cursor to read the next page. Null on the last page"}},"required":["data","next_cursor"],"additionalProperties":false},"example":{"data":[{"id":"pt_20261112_a1","type":"redemption","amount_points":-1000,"balance_points":1240,"description":"Redeemed for wallet credit","created_at":"2026-11-12T08:30:00.000Z"},{"id":"pt_20261101_9f","type":"purchase","amount_points":12,"balance_points":2240,"description":"Points for a purchase","created_at":"2026-11-01T12:00:00.000Z"}],"next_cursor":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/referrals":{"get":{"operationId":"referrals.get","summary":"Read your referral code and what it has earned.","description":"Returns your referral code if one has been issued, the number of people who signed up with it, and the points you and the person you refer each receive. code is null until you call referrals.issue; this read never creates one.","x-tier":"read","x-scope":"rewards:read","x-required-scopes":["rewards:read"],"x-auth-mode":"bearer","security":[{"bearer":["rewards:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Existing issued referral code, or null when none has been issued. This read never generates a code."},"referral_count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many people have signed up with your code"},"reward_points_per_referral":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Points you earn for each person you refer"},"referred_user_bonus_points":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Points the person you refer receives"}},"required":["code","referral_count","reward_points_per_referral","referred_user_bonus_points"],"additionalProperties":false},"example":{"code":"EXAMPLE-7K2M","referral_count":3,"reward_points_per_referral":200,"referred_user_bonus_points":200}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"referrals.issue","summary":"Get your referral code, creating it the first time.","description":"Returns your referral code. The first call creates it; later calls return the same code and never replace it. Share the code: you earn points for each person who signs up with it (see referrals.get).","x-tier":"safe","x-scope":"account:write","x-required-scopes":["account:write"],"x-auth-mode":"bearer","security":[{"bearer":["account:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":128,"description":"Your referral code. Share it with people you refer"}},"required":["code"],"additionalProperties":false},"example":{"code":"EXAMPLE-7K2M"}}}},"409":{"description":"IN_PROGRESS: Another referral code is being issued. Wait for Retry-After and call again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/account/telegram":{"get":{"operationId":"account.telegram.get","summary":"Read your Telegram link status.","description":"Says whether a Telegram account is linked to your PrivateByte account, and if so its username and when it was linked. A linked Telegram account receives billing and server notifications and can manage the account through the PrivateByte bot. If linked is false, start linking with account.telegram.link.","x-tier":"read","x-scope":"account:read","x-required-scopes":["account:read"],"x-auth-mode":"bearer","security":[{"bearer":["account:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"linked":{"type":"boolean","const":false}},"required":["linked"],"additionalProperties":false},{"type":"object","properties":{"linked":{"type":"boolean","const":true},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Telegram username of the linked chat, null when that Telegram account has none"},"linked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the Telegram account was linked, ISO 8601 UTC"}},"required":["linked","username","linked_at"],"additionalProperties":false}]},"example":{"linked":true,"username":"sam_example","linked_at":"2026-11-10T08:30:00.000Z"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"account.telegram.link","summary":"Get a code to link a Telegram account.","description":"Creates a single-use code that links a Telegram account to yours. The customer must send the code as a message to the PrivateByte bot on Telegram within 15 minutes (expires_in is in seconds); the API cannot complete the link by itself. Each call replaces any earlier unused code, which stops working. Poll account.telegram.get until linked is true to see that the customer has done it. Linking gives that Telegram chat control of the account, so only pass the code to the account owner. This operation needs a key with the Telegram-link permission and takes no Idempotency-Key.","x-tier":"destructive","x-scope":"account:telegram:link","x-required-scopes":["account:telegram:link"],"x-auth-mode":"bearer","security":[{"bearer":["account:telegram:link"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":32,"description":"Single-use linking code. The customer sends it as a message to @privatebyte_bot on Telegram to complete linking. A new request replaces your earlier code."},"expires_in":{"type":"number","const":900,"description":"Seconds until the code expires (15 minutes)"}},"required":["code","expires_in"],"additionalProperties":false},"example":{"code":"K7M2QX","expires_in":900}}}},"409":{"description":"RESOURCE_STATE_CONFLICT (reason: telegram_already_linked): A Telegram account is already linked. Call account.telegram.unlink first if the customer wants to link a different one.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"RATE_LIMITED: Only a few linking codes can be created per hour. Wait for Retry-After (up to an hour) and reuse the code you have while it is valid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"delete":{"operationId":"account.telegram.unlink","summary":"Unlink your Telegram account.","description":"Removes the link between your account and its Telegram account. This affects the whole account: Telegram notifications stop, the bot can no longer manage the account, the open support conversation in Telegram is closed and the notification preferences are discarded. Pass confirm=true as a query parameter. Returns linked: false; calling it when nothing is linked also returns linked: false. To link again, start over with account.telegram.link.","x-tier":"destructive","x-scope":"account:write","x-required-scopes":["account:write"],"x-auth-mode":"bearer","security":[{"bearer":["account:write"]}],"parameters":[{"name":"confirm","in":"query","required":true,"schema":{"type":"string","enum":["true"]},"description":"Must be true to unlink your Telegram account."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"linked":{"type":"boolean","const":false}},"required":["linked"],"additionalProperties":false},{"type":"object","properties":{"linked":{"type":"boolean","const":true},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Telegram username of the linked chat, null when that Telegram account has none"},"linked_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the Telegram account was linked, ISO 8601 UTC"}},"required":["linked","username","linked_at"],"additionalProperties":false}]},"example":{"linked":false}}}},"400":{"description":"VALIDATION_FAILED: confirm is missing or is not true (`field` is confirm). Nothing is changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"RESOURCE_STATE_CONFLICT (reason: support_reply_in_delivery): A support reply is being delivered to the Telegram chat right now. Try again in a minute.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/account/telegram/preferences":{"get":{"operationId":"account.telegram.preferences.get","summary":"Read your linked Telegram notification preferences.","description":"Returns which notifications are sent to the linked Telegram account, one true/false switch per event: invoice_generated, invoice_due_soon, payment_received, low_balance, server_started, server_stopped, server_restarted, server_suspended, server_unsuspended, service_activated and service_terminated. Every switch is on until it is turned off. A Telegram account must be linked first.","x-tier":"read","x-scope":"account:read","x-required-scopes":["account:read"],"x-auth-mode":"bearer","security":[{"bearer":["account:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","properties":{"invoice_generated":{"type":"boolean","description":"Send a Telegram message when a new invoice is issued"},"invoice_due_soon":{"type":"boolean","description":"Send a Telegram message when an unpaid invoice is close to its due date"},"payment_received":{"type":"boolean","description":"Send a Telegram message when a payment is received"},"low_balance":{"type":"boolean","description":"Send a Telegram message when an account balance runs low"},"server_started":{"type":"boolean","description":"Send a Telegram message when a server is powered on"},"server_stopped":{"type":"boolean","description":"Send a Telegram message when a server is powered off"},"server_restarted":{"type":"boolean","description":"Send a Telegram message when a server is restarted"},"server_suspended":{"type":"boolean","description":"Send a Telegram message when a server is suspended"},"server_unsuspended":{"type":"boolean","description":"Send a Telegram message when a suspended server is restored"},"service_activated":{"type":"boolean","description":"Send a Telegram message when a new service becomes active"},"service_terminated":{"type":"boolean","description":"Send a Telegram message when a service is terminated"}},"required":["invoice_generated","invoice_due_soon","payment_received","low_balance","server_started","server_stopped","server_restarted","server_suspended","server_unsuspended","service_activated","service_terminated"],"additionalProperties":false}},"required":["preferences"],"additionalProperties":false},"example":{"preferences":{"invoice_generated":true,"invoice_due_soon":true,"payment_received":true,"low_balance":true,"server_started":false,"server_stopped":true,"server_restarted":true,"server_suspended":true,"server_unsuspended":true,"service_activated":true,"service_terminated":true}}}}},"409":{"description":"RESOURCE_STATE_CONFLICT (reason: telegram_not_linked): No Telegram account is linked. Call account.telegram.link and have the customer send the code to the bot first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"put":{"operationId":"account.telegram.preferences.update","summary":"Change your Telegram notification settings.","description":"Turns individual Telegram notifications on or off. Send only the switches you want to change inside preferences; the others keep their value. Returns the full set after the change. The same switches are shown in the client area and in the bot, so a change here appears there too. A Telegram account must be linked first.","x-tier":"safe","x-scope":"account:write","x-required-scopes":["account:write"],"x-auth-mode":"bearer","security":[{"bearer":["account:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","properties":{"invoice_generated":{"type":"boolean","description":"Send a Telegram message when a new invoice is issued"},"invoice_due_soon":{"type":"boolean","description":"Send a Telegram message when an unpaid invoice is close to its due date"},"payment_received":{"type":"boolean","description":"Send a Telegram message when a payment is received"},"low_balance":{"type":"boolean","description":"Send a Telegram message when an account balance runs low"},"server_started":{"type":"boolean","description":"Send a Telegram message when a server is powered on"},"server_stopped":{"type":"boolean","description":"Send a Telegram message when a server is powered off"},"server_restarted":{"type":"boolean","description":"Send a Telegram message when a server is restarted"},"server_suspended":{"type":"boolean","description":"Send a Telegram message when a server is suspended"},"server_unsuspended":{"type":"boolean","description":"Send a Telegram message when a suspended server is restored"},"service_activated":{"type":"boolean","description":"Send a Telegram message when a new service becomes active"},"service_terminated":{"type":"boolean","description":"Send a Telegram message when a service is terminated"}},"additionalProperties":false,"description":"Only the switches you send are changed; the others keep their value"}},"required":["preferences"],"additionalProperties":false},"example":{"preferences":{"server_started":false}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","properties":{"invoice_generated":{"type":"boolean","description":"Send a Telegram message when a new invoice is issued"},"invoice_due_soon":{"type":"boolean","description":"Send a Telegram message when an unpaid invoice is close to its due date"},"payment_received":{"type":"boolean","description":"Send a Telegram message when a payment is received"},"low_balance":{"type":"boolean","description":"Send a Telegram message when an account balance runs low"},"server_started":{"type":"boolean","description":"Send a Telegram message when a server is powered on"},"server_stopped":{"type":"boolean","description":"Send a Telegram message when a server is powered off"},"server_restarted":{"type":"boolean","description":"Send a Telegram message when a server is restarted"},"server_suspended":{"type":"boolean","description":"Send a Telegram message when a server is suspended"},"server_unsuspended":{"type":"boolean","description":"Send a Telegram message when a suspended server is restored"},"service_activated":{"type":"boolean","description":"Send a Telegram message when a new service becomes active"},"service_terminated":{"type":"boolean","description":"Send a Telegram message when a service is terminated"}},"required":["invoice_generated","invoice_due_soon","payment_received","low_balance","server_started","server_stopped","server_restarted","server_suspended","server_unsuspended","service_activated","service_terminated"],"additionalProperties":false}},"required":["preferences"],"additionalProperties":false},"example":{"preferences":{"invoice_generated":true,"invoice_due_soon":true,"payment_received":true,"low_balance":true,"server_started":false,"server_stopped":true,"server_restarted":true,"server_suspended":true,"server_unsuspended":true,"service_activated":true,"service_terminated":true}}}}},"400":{"description":"VALIDATION_FAILED: preferences is missing, names a switch that does not exist, or a value is not true or false. `field` names it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"RESOURCE_STATE_CONFLICT (reason: telegram_not_linked): No Telegram account is linked. Call account.telegram.link and have the customer send the code to the bot first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/billing/deposits":{"post":{"operationId":"billing.deposits.create","summary":"Create an invoice that adds funds to your wallet.","description":"Creates one unpaid funding invoice for the amount and currency you state. It does not take a payment and the wallet does not change yet. Next, the invoice (`invoice_id`) has to be paid in the client area by card, PayPal or crypto; the API cannot take that payment. When it is paid the amount is added to the wallet: check with invoices.get (status paid) or billing.balance. The amount must be within billing.deposits.limits and the account email must be verified. If the reply is lost, or the answer is 502 UPSTREAM_UNAVAILABLE, the outcome is unknown: do not send it again with a new Idempotency-Key. Call billing.deposits.find instead.","x-tier":"money","x-scope":"billing:pay","x-required-scopes":["billing:pay","billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:pay","billing:read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of the funding invoice and of the wallet credit it adds. Credit only pays invoices in the same currency; nothing is converted"},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount to add to the wallet, in whole minor units (cents). Must be within the limits for this currency"}},"required":["currency","amount_minor"],"additionalProperties":false},"example":{"currency":"USD","amount_minor":2500}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deposit_id":{"type":"string","pattern":"^dep_[a-f0-9]{32}$","description":"Id of this funding request; read it back with the deposit read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The unpaid funding invoice that was created. Paying it adds amount_minor to the wallet"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount the invoice is for and the wallet will receive, in whole minor units (cents)"}},"required":["deposit_id","invoice_id","currency","amount_minor"],"additionalProperties":false,"description":"Record that a funding invoice was created. It never changes: it does not say whether the invoice has since been paid or the wallet credited."},"example":{"deposit_id":"dep_0123456789abcdef0123456789abcdef","invoice_id":9110,"currency":"USD","amount_minor":2500}}}},"400":{"description":"VALIDATION_FAILED (reason: deposit_below_minimum): amount_minor is under the minimum. `details` carries currency, minimum_amount_minor and maximum_amount_minor.\nVALIDATION_FAILED (reason: deposit_above_maximum): amount_minor is over the maximum. `details` carries currency, minimum_amount_minor and maximum_amount_minor.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The account email is not verified yet, or the account is restricted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"IDEMPOTENCY_CONFLICT: This Idempotency-Key was already used with a different currency, amount or selection. Nothing was done.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: Billing did not answer. The outcome may be unknown: call billing.deposits.find with the original Idempotency-Key before doing anything else.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"get":{"operationId":"billing.deposits.find","summary":"Find a funding invoice by its Idempotency-Key.","description":"Use this when the reply to billing.deposits.create was lost or the outcome was unknown. Send the original Idempotency-Key as `request_key` with the same currency and amount_minor. `deposit` is the original record, or null when no funding invoice exists for that request; if the original request may still be running, ask again shortly before creating a new one. It changes nothing.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"request_key","in":"query","required":true,"schema":{"type":"string"},"description":"Exact original Idempotency-Key used to accept this wallet funding invoice"},{"name":"currency","in":"query","required":true,"schema":{"type":"string","enum":["USD","EUR","GBP"]},"description":"Original requested currency"},{"name":"amount_minor","in":"query","required":true,"schema":{"type":"integer"},"description":"Exact original requested amount in minor currency units"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deposit":{"anyOf":[{"type":"object","properties":{"deposit_id":{"type":"string","pattern":"^dep_[a-f0-9]{32}$","description":"Id of this funding request; read it back with the deposit read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The unpaid funding invoice that was created. Paying it adds amount_minor to the wallet"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount the invoice is for and the wallet will receive, in whole minor units (cents)"}},"required":["deposit_id","invoice_id","currency","amount_minor"],"additionalProperties":false,"description":"Record that a funding invoice was created. It never changes: it does not say whether the invoice has since been paid or the wallet credited."},{"type":"null"}],"description":"The receipt of the original request, or null when no funding invoice was created for that key, currency and amount"}},"required":["deposit"],"additionalProperties":false},"example":{"deposit":{"deposit_id":"dep_0123456789abcdef0123456789abcdef","invoice_id":9110,"currency":"USD","amount_minor":2500}}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/billing/deposits/{deposit_id}":{"get":{"operationId":"billing.deposits.get","summary":"Read the record of a funding invoice you created.","description":"Returns the record made by billing.deposits.create: the funding invoice id, currency and amount. The record never changes, so it does not say whether the invoice has been paid; read invoices.get with its `invoice_id` for that, or billing.balance for the wallet.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"deposit_id","in":"path","required":true,"schema":{"type":"string","pattern":"^dep_[a-f0-9]{32}$"},"description":"Id of a funding request, from billing.deposits.create"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deposit_id":{"type":"string","pattern":"^dep_[a-f0-9]{32}$","description":"Id of this funding request; read it back with the deposit read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The unpaid funding invoice that was created. Paying it adds amount_minor to the wallet"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount the invoice is for and the wallet will receive, in whole minor units (cents)"}},"required":["deposit_id","invoice_id","currency","amount_minor"],"additionalProperties":false,"description":"Record that a funding invoice was created. It never changes: it does not say whether the invoice has since been paid or the wallet credited."},"example":{"deposit_id":"dep_0123456789abcdef0123456789abcdef","invoice_id":9110,"currency":"USD","amount_minor":2500}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/billing/deposit-limits":{"get":{"operationId":"billing.deposits.limits","summary":"Read the smallest and largest funding amount.","description":"Returns `minimum_amount_minor` and `maximum_amount_minor` for one funding request in the currency you name, in whole minor units (cents). The limits are per request, not per day, and are not converted between currencies. Read it before billing.deposits.create so the amount is not refused.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"currency","in":"query","required":true,"schema":{"type":"string","enum":["USD","EUR","GBP"]},"description":"Currency in which these numeric funding limits apply; no FX conversion"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP"]},"minimum_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Smallest amount one funding request may ask for, in whole minor units (cents)"},"maximum_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Largest amount one funding request may ask for, in whole minor units (cents)"}},"required":["currency","minimum_amount_minor","maximum_amount_minor"],"additionalProperties":false},"example":{"currency":"USD","minimum_amount_minor":500,"maximum_amount_minor":1000000}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/billing/transactions":{"get":{"operationId":"billing.transactions.list","summary":"List wallet ledger entries in one currency, newest first.","description":"Returns the entries that added to or spent from your wallet in the currency you name: deposits, invoice payments, service credits, rewards and refunds. `amount_minor` is signed and `balance_after_minor` is the balance straight after each entry. Filter with `direction` (credit or debit) and page with `limit` and `cursor`; a null `next_cursor` means there is no older page. It changes nothing.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"currency","in":"query","required":true,"schema":{"type":"string","enum":["USD","EUR","GBP"]},"description":"Wallet currency to read; no automatic conversion or profile default"},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["all","credit","debit"]},"description":"Filter by signed movement; zero amounts appear only in all (default)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1–100 entries, default 20"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from the previous page; entries have descending ledger ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of every amount on this page"},"data":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Ledger entry id. Entries are returned newest first (descending id)"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the entry was written, ISO 8601 UTC"},"description":{"type":"string","description":"What the entry was for, as shown in the client area"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Signed change to the wallet in whole minor units (cents): positive adds credit, negative spends it"},"balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this entry, in whole minor units (cents)"},"type":{"type":"string","enum":["credit","debit"],"description":"credit when amount_minor is zero or more, debit when it is negative"},"category":{"type":"string","enum":["deposit","withdrawal","service_credit","reward","invoice_payment","refund","other"],"description":"Label worked out from the description: deposit, withdrawal, service_credit, reward, invoice_payment, refund or other. A guide for display, not an accounting type"}},"required":["id","created_at","description","amount_minor","balance_after_minor","type","category"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string","pattern":"^[1-9]\\d{0,9}$"},{"type":"null"}],"description":"Pass as `cursor` to get the next (older) page. null on the last page"}},"required":["currency","data","next_cursor"],"additionalProperties":false},"example":{"currency":"USD","data":[{"id":4120,"created_at":"2026-11-14T10:05:00.000Z","description":"Applied to invoice 9101","amount_minor":-599,"balance_after_minor":1901,"type":"debit","category":"invoice_payment"},{"id":4119,"created_at":"2026-11-14T09:58:12.000Z","description":"Manual deposit","amount_minor":2500,"balance_after_minor":2500,"type":"credit","category":"deposit"}],"next_cursor":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/services":{"get":{"operationId":"services.list","summary":"List your services.","description":"Returns every service on the account, including pending and cancelled ones, with its product, price per cycle and renewal date. Filter with status (pending, active, suspended, cancelled) and page with cursor, ascending by service id. For a server product the service id is also the server id used by the vm operations.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1–100, default 20"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from the previous page; ascending service ids"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"Billing status to filter by: pending, active, suspended or cancelled"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Service id. For a server product it is also the server id used by the server operations"},"product_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the product. Null when it could not be read"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name you gave the service, usually the server hostname. Null when none was set"},"status":{"type":"string","description":"Billing status in lower case: pending (its order is not yet paid), active, suspended or cancelled"},"recurring_amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Price charged each billing cycle, in whole minor units of currency"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"ISO 4217 currency of the amounts beside it"},"renewal_date":{"description":"Day the paid period ends and the next renewal is due, YYYY-MM-DD (UTC). Null when the service has no renewal date, for example before its first payment","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date, YYYY-MM-DD"},{"type":"null"}]}},"required":["id","product_id","product_name","label","status","recurring_amount_minor","currency","renewal_date"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to read the next page. Null on the last page"}},"required":["data","next_cursor"],"additionalProperties":false},"example":{"data":[{"id":7044,"product_id":1201,"product_name":"Example VPS 2 GB","label":"web1.example.com","status":"active","recurring_amount_minor":599,"currency":"USD","renewal_date":"2026-12-14"}],"next_cursor":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/services/{id}":{"get":{"operationId":"services.get","summary":"Read one service.","description":"Returns one service, whatever its status. It describes billing only: for the state of the server itself call vm.get with the same id. renewal_date is the day the paid period ends.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your service id, from services.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Service id. For a server product it is also the server id used by the server operations"},"product_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the product. Null when it could not be read"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name you gave the service, usually the server hostname. Null when none was set"},"status":{"type":"string","description":"Billing status in lower case: pending (its order is not yet paid), active, suspended or cancelled"},"recurring_amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Price charged each billing cycle, in whole minor units of currency"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"ISO 4217 currency of the amounts beside it"},"renewal_date":{"description":"Day the paid period ends and the next renewal is due, YYYY-MM-DD (UTC). Null when the service has no renewal date, for example before its first payment","anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date, YYYY-MM-DD"},{"type":"null"}]}},"required":["id","product_id","product_name","label","status","recurring_amount_minor","currency","renewal_date"],"additionalProperties":false},"example":{"id":7044,"product_id":1201,"product_name":"Example VPS 2 GB","label":"web1.example.com","status":"active","recurring_amount_minor":599,"currency":"USD","renewal_date":"2026-12-14"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/services/{id}/cancel":{"post":{"operationId":"services.cancel","summary":"Cancel a service.","description":"Stops billing for the service at once: no further renewal invoice is issued, and this cannot be undone through the API. The server is not deleted. It keeps running until the end of the period already paid for (suspend_at), then it is suspended and its data kept; if no paid time is left it is suspended straight away, which takes it offline. confirm must equal the service id. The server field of the response says which of these happened. Once a service is cancelled its server is no longer listed or reachable through the server operations (they answer 404), even while it is still running: take any backup or copy you need before you cancel.","x-tier":"destructive","x-scope":"services:cancel","x-required-scopes":["services:cancel"],"x-auth-mode":"bearer","security":[{"bearer":["services:cancel"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your service id, from services.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"when":{"type":"string","const":"immediate","description":"Always immediate: billing stops now. The server still runs to the end of the period already paid for"},"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Must equal the service id in the URL"},"reason":{"description":"Why you are cancelling, in your own words","type":"string","maxLength":255}},"required":["when","confirm"],"additionalProperties":false},"example":{"when":"immediate","confirm":7044,"reason":"Project finished"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"status":{"type":"string","const":"cancelled","description":"The billing status of the service after this request"},"effective":{"type":"string","const":"immediate","description":"Billing stopped at once: no further renewal invoice is issued"},"infrastructure_changed":{"type":"boolean","description":"True only when this request suspended the server and the suspension was confirmed"},"server":{"type":"string","enum":["suspended","scheduled","suspend_failed","none"],"description":"suspended: the server is suspended and its data kept. scheduled: the server stays online until suspend_at, then it is suspended and its data kept. suspend_failed: billing is cancelled but the suspension is not confirmed; our team has been alerted. none: the service has no server"},"suspend_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"End of the period already paid for, ISO 8601 UTC; the server is suspended once it has passed. Null unless server is scheduled"}},"required":["id","status","effective","infrastructure_changed","server","suspend_at"],"additionalProperties":false},"example":{"id":7044,"status":"cancelled","effective":"immediate","infrastructure_changed":false,"server":"scheduled","suspend_at":"2026-12-14T00:00:00.000Z"}}}},"400":{"description":"VALIDATION_FAILED: confirm is missing or does not equal the service id in the URL (the refusal carries field: confirm), or when is not immediate. Nothing is changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The service is in a state that cannot be cancelled through the API, or it is on hold. Contact support.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"RESOURCE_STATE_CONFLICT (reason: order_unpaid): The service is pending: it belongs to an order that has not been paid. Cancel the order with orders.cancel instead.\nIN_PROGRESS: Another change to this service is being applied. Try again shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The cancellation may or may not have been recorded. Read services.get: status cancelled means it was.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/power-schedule":{"get":{"operationId":"vm.power_schedule.get","summary":"Read your automatic server start/stop schedule.","description":"Returns the server's automatic start and stop schedule, or `schedule` null when it has none, together with the next time each action will run. The start and stop times are local times in the schedule's own `timezone`; the `next` times are the same moments as UTC timestamps.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","description":"When false the schedule is kept but nothing runs."},"timezone":{"type":"string","description":"IANA time zone the start and stop times are in, e.g. Europe/London."},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"Weekdays the schedule runs on: 0 is Sunday, 6 is Saturday."},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local time the server is started, HH:MM (24-hour). Null when the schedule does not start it."},"stop":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local time the server is shut down, HH:MM (24-hour). Null when the schedule does not stop it."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the schedule was last saved."}},"required":["enabled","timezone","days","start","stop","updated_at"],"additionalProperties":false},{"type":"null"}],"description":"Null when the server has no schedule."},"next":{"type":"object","properties":{"start_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"The next scheduled start. Null when none falls in the next 8 days."},"stop_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"The next scheduled stop. Null when none falls in the next 8 days."}},"required":["start_at","stop_at"],"additionalProperties":false}},"required":["schedule","next"],"additionalProperties":false},"example":{"schedule":{"enabled":true,"timezone":"Europe/London","days":[1,2,3,4,5],"start":"08:00","stop":"19:00","updated_at":"2026-11-14T10:00:00.000Z"},"next":{"start_at":"2026-11-16T08:00:00.000Z","stop_at":"2026-11-16T19:00:00.000Z"}}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"put":{"operationId":"vm.power_schedule.set","summary":"Set when a server starts and stops automatically.","description":"Saves the schedule, replacing any earlier one. A schedule has one start time and one stop time (either may be null), used on every chosen weekday, in the IANA time zone you name; it does not run in UTC unless you set `timezone` to UTC. The server is acted on only at those times, so starting or stopping it yourself in between is left alone until the next scheduled time. A scheduled stop shuts the operating system down and powers the server off if it has not stopped after a few minutes, so everything it serves is down until the next start. A schedule can be saved for a suspended server but only runs while the server is active. Returns the saved schedule and the next run times.","x-tier":"safe","x-scope":"vm:power","x-required-scopes":["vm:power"],"x-auth-mode":"bearer","security":[{"bearer":["vm:power"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"timezone":{"type":"string","minLength":1,"maxLength":64},"days":{"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"start":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},{"type":"null"}]},"stop":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):([0-5]\\d)$"},{"type":"null"}]}},"required":["enabled","timezone","days","start","stop"],"additionalProperties":false,"description":"enabled: whether the schedule runs. timezone: the IANA time zone the times are in, e.g. Europe/London. days: the weekdays it runs on, 0 (Sunday) to 6 (Saturday). start and stop: local time as HH:MM (24-hour), or null to leave that action out. An enabled schedule needs at least one day and at least one of start and stop. Start and stop must be at least 15 minutes apart. On a daylight-saving change a time that does not exist that day is skipped, and a time that occurs twice runs once."},"example":{"enabled":true,"timezone":"Europe/London","days":[1,2,3,4,5],"start":"08:00","stop":"19:00"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","description":"When false the schedule is kept but nothing runs."},"timezone":{"type":"string","description":"IANA time zone the start and stop times are in, e.g. Europe/London."},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"Weekdays the schedule runs on: 0 is Sunday, 6 is Saturday."},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local time the server is started, HH:MM (24-hour). Null when the schedule does not start it."},"stop":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local time the server is shut down, HH:MM (24-hour). Null when the schedule does not stop it."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the schedule was last saved."}},"required":["enabled","timezone","days","start","stop","updated_at"],"additionalProperties":false},{"type":"null"}],"description":"Null when the server has no schedule."},"next":{"type":"object","properties":{"start_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"The next scheduled start. Null when none falls in the next 8 days."},"stop_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"The next scheduled stop. Null when none falls in the next 8 days."}},"required":["start_at","stop_at"],"additionalProperties":false}},"required":["schedule","next"],"additionalProperties":false},"example":{"schedule":{"enabled":true,"timezone":"Europe/London","days":[1,2,3,4,5],"start":"08:00","stop":"19:00","updated_at":"2026-11-14T10:00:00.000Z"},"next":{"start_at":"2026-11-16T08:00:00.000Z","stop_at":"2026-11-16T19:00:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED: The schedule is not acceptable: an unknown time zone, a time not written HH:MM, an enabled schedule with no day or with neither start nor stop, or start and stop less than 15 minutes apart.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.power_schedule.get, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"delete":{"operationId":"vm.power_schedule.delete","summary":"Remove your automatic server power schedule.","description":"Removes the schedule, so the server is no longer started or stopped automatically. The server's current power state is not changed. It succeeds when there is no schedule to remove. Returns `schedule` null. Send the server id again as `?confirm=`.","x-tier":"destructive","x-scope":"vm:power","x-required-scopes":["vm:power"],"x-auth-mode":"bearer","security":[{"bearer":["vm:power"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"confirm","in":"query","required":true,"schema":{"type":"integer"},"description":"Must equal the server id in the path ({id})."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean","description":"When false the schedule is kept but nothing runs."},"timezone":{"type":"string","description":"IANA time zone the start and stop times are in, e.g. Europe/London."},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6},"description":"Weekdays the schedule runs on: 0 is Sunday, 6 is Saturday."},"start":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local time the server is started, HH:MM (24-hour). Null when the schedule does not start it."},"stop":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local time the server is shut down, HH:MM (24-hour). Null when the schedule does not stop it."},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the schedule was last saved."}},"required":["enabled","timezone","days","start","stop","updated_at"],"additionalProperties":false},{"type":"null"}],"description":"Null when the server has no schedule."},"next":{"type":"object","properties":{"start_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"The next scheduled start. Null when none falls in the next 8 days."},"stop_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"The next scheduled stop. Null when none falls in the next 8 days."}},"required":["start_at","stop_at"],"additionalProperties":false}},"required":["schedule","next"],"additionalProperties":false},"example":{"schedule":null,"next":{"start_at":null,"stop_at":null}}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the server id in the path.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.power_schedule.get, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/catalog/products":{"get":{"operationId":"catalog.products.list","summary":"List the products you can order.","description":"Returns the products on sale with their billing cycles, prices and whether each is in stock. This is the first step of buying a server: pick a product id here (category vps for servers), then call catalog.products.get for its operating systems and options. Prices are list prices before any discount and without tax; orders.preview gives the exact total. Page with cursor, ascending by product id.","x-tier":"read","x-scope":"account:read","x-required-scopes":["account:read"],"x-auth-mode":"bearer","security":[{"bearer":["account:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1–100, default 20"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from the previous page; ascending product ids"},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["vps","hosting","dedicated","proxies","gateway"]},"description":"Store category"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Product id. Use it as product_id when previewing and creating an order"},"name":{"type":"string"},"category":{"type":"string","enum":["vps","hosting","dedicated","proxies","gateway"]},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Country code of the region the product is hosted in (for example us, nl, uk). Null when the product is not tied to one region"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Your account currency. Every amount in this product, its prices and its options is in this currency"},"prices":{"type":"array","items":{"type":"object","properties":{"cycle":{"type":"string","enum":["free","onetime","monthly","quarterly","semiannually","annually","biennially","triennially"],"description":"Billing cycle this price is for. Use it as billing_cycle when ordering"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recurring price per cycle, in whole minor units (cents) of the product currency. Tax is not included"},"setup_fee_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"One-off fee added to the first invoice, in whole minor units of the product currency"}},"required":["cycle","amount_minor","setup_fee_minor"],"additionalProperties":false},"description":"One entry per billing cycle the product is sold on"},"stock_status":{"type":"string","enum":["available","sold_out","unknown"],"description":"available: can be ordered. sold_out: cannot be ordered now. unknown: stock could not be read just now, so an order may be refused; try again shortly"}},"required":["id","name","category","region","currency","prices","stock_status"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to read the next page. Null on the last page"}},"required":["data","next_cursor"],"additionalProperties":false},"example":{"data":[{"id":1201,"name":"Example VPS 2 GB","category":"vps","region":"uk","currency":"USD","prices":[{"cycle":"monthly","amount_minor":599,"setup_fee_minor":0},{"cycle":"annually","amount_minor":5750,"setup_fee_minor":0}],"stock_status":"available"}],"next_cursor":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/catalog/products/{id}":{"get":{"operationId":"catalog.products.get","summary":"Read one product with its prices and options.","description":"Returns everything needed to order a product: its billing cycles and prices, region, stock status and its options (operating system, extra IPv4 address, extra disk) with the id of every choice. An order item names its choices as option_id and value_id pairs taken from here. Order only when configuration_status is ready and stock_status is available; then call orders.preview for the exact total.","x-tier":"read","x-scope":"account:read","x-required-scopes":["account:read"],"x-auth-mode":"bearer","security":[{"bearer":["account:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Product id from catalog.products.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Product id. Use it as product_id when previewing and creating an order"},"name":{"type":"string"},"category":{"type":"string","enum":["vps","hosting","dedicated","proxies","gateway"]},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Country code of the region the product is hosted in (for example us, nl, uk). Null when the product is not tied to one region"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Your account currency. Every amount in this product, its prices and its options is in this currency"},"prices":{"type":"array","items":{"type":"object","properties":{"cycle":{"type":"string","enum":["free","onetime","monthly","quarterly","semiannually","annually","biennially","triennially"],"description":"Billing cycle this price is for. Use it as billing_cycle when ordering"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recurring price per cycle, in whole minor units (cents) of the product currency. Tax is not included"},"setup_fee_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"One-off fee added to the first invoice, in whole minor units of the product currency"}},"required":["cycle","amount_minor","setup_fee_minor"],"additionalProperties":false},"description":"One entry per billing cycle the product is sold on"},"stock_status":{"type":"string","enum":["available","sold_out","unknown"],"description":"available: can be ordered. sold_out: cannot be ordered now. unknown: stock could not be read just now, so an order may be refused; try again shortly"},"configuration_status":{"type":"string","enum":["ready","unavailable"],"description":"ready: the options below are complete and the product can be ordered through the API. unavailable: it cannot be ordered through the API right now and options may be empty"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Option id. Use it as option_id in an order item configuration"},"name":{"type":"string"},"kind":{"type":"string","enum":["operating_system","additional_ipv4","additional_disk","country","other"],"description":"operating_system: what the server is installed with; an order must choose one. additional_ipv4 and additional_disk: optional paid extras. country: where a static proxy address is located; an order must choose one, and only countries in stock are listed. other: an option the API cannot order yet"},"values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Choice id. Use it as value_id in an order item configuration"},"name":{"type":"string"},"included":{"type":"boolean","description":"True when the choice is free of charge; prices is then empty"},"prices":{"type":"array","items":{"type":"object","properties":{"cycle":{"type":"string","enum":["free","onetime","monthly","quarterly","semiannually","annually","biennially","triennially"],"description":"Billing cycle this price is for. Use it as billing_cycle when ordering"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recurring price per cycle, in whole minor units (cents) of the product currency. Tax is not included"},"setup_fee_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"One-off fee for this choice on the first invoice, in whole minor units of the product currency. Null means the fee is not known and the product cannot be ordered through the API right now"}},"required":["cycle","amount_minor","setup_fee_minor"],"additionalProperties":false},"description":"Extra price of this choice per billing cycle, added to the product price"}},"required":["id","name","included","prices"],"additionalProperties":false}}},"required":["id","name","kind","values"],"additionalProperties":false}}},"required":["id","name","category","region","currency","prices","stock_status","configuration_status","options"],"additionalProperties":false},"example":{"id":1201,"name":"Example VPS 2 GB","category":"vps","region":"uk","currency":"USD","prices":[{"cycle":"monthly","amount_minor":599,"setup_fee_minor":0},{"cycle":"annually","amount_minor":5750,"setup_fee_minor":0}],"stock_status":"available","configuration_status":"ready","options":[{"id":71,"name":"Operating System","kind":"operating_system","values":[{"id":801,"name":"Ubuntu 24.04","included":true,"prices":[]},{"id":803,"name":"Debian 12","included":true,"prices":[]}]},{"id":72,"name":"Additional IPv4","kind":"additional_ipv4","values":[{"id":811,"name":"1 extra address","included":false,"prices":[{"cycle":"monthly","amount_minor":300,"setup_fee_minor":0}]}]}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/account":{"patch":{"operationId":"account.update","summary":"Change your name, company, address or phone.","description":"Updates only the fields you send; send at least one. The fields that can be changed are first_name, last_name, company, address1, address2, city, state, postcode, country and phone_number. An empty string clears a field. country must be a two-letter ISO 3166-1 code and is stored in upper case; no tax number or address lookup is performed. The email, password, currency and sign-in settings cannot be changed here and any other field is refused. Returns ok once the saved profile has been read back and matches; call account.get to see the result.","x-tier":"safe","x-scope":"account:write","x-required-scopes":["account:write"],"x-auth-mode":"bearer","security":[{"bearer":["account:write"]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","maxLength":255},"last_name":{"type":"string","maxLength":255},"company":{"type":"string","maxLength":255,"description":"Company name. An empty string clears it"},"address1":{"type":"string","maxLength":255,"description":"Address line 1"},"address2":{"type":"string","maxLength":255,"description":"Address line 2. An empty string clears it"},"city":{"type":"string","maxLength":128},"state":{"type":"string","maxLength":128,"description":"State, province or region"},"postcode":{"type":"string","maxLength":32},"country":{"description":"ISO 3166-1 alpha-2 country code, two letters (e.g. GB). Stored in upper case","type":"string","pattern":"^[A-Za-z]{2}$"},"phone_number":{"type":"string","maxLength":64,"description":"Phone number, free text up to 64 characters"}},"additionalProperties":false},"example":{"company":"Example Ltd","address1":"1 Example Street","city":"London","postcode":"EC1A 1BB","country":"GB"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},"example":{"ok":true}}}},"400":{"description":"VALIDATION_FAILED: The body is empty, a value is too long, country is not two letters, or the body names a field that cannot be changed here (such as email). `field` names the first offending field.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"get":{"operationId":"account.get","summary":"Your account profile.","description":"Returns the profile of the account that owns the API key: name, email, billing address, phone, company, billing currency, and whether the email is verified and two-factor sign-in is on. It contains only details the customer entered themselves. Address fields that were never filled in are null. Use account.update to change the name, company, address or phone.","x-tier":"read","x-scope":"account:read","x-required-scopes":["account:read"],"x-auth-mode":"bearer","security":[{"bearer":["account:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Your account id"},"email":{"type":"string","description":"Sign-in and billing email. Cannot be changed through the API"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company name, null when not set"},"address1":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Billing address line 1, null when not set"},"address2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Billing address line 2, null when not set"},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State, province or region, null when not set"},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Phone number as you entered it, null when not set"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 3166-1 alpha-2 country code (e.g. GB), null when not set"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 4217 code of the currency the account is billed in (e.g. USD), null when not set"},"email_verified":{"type":"boolean","description":"Whether the account email has been verified. Some operations, such as adding a contact, need it to be true"},"two_factor_enabled":{"type":"boolean","description":"Whether two-factor sign-in is switched on for the client area"}},"required":["id","email","first_name","last_name","company","address1","address2","city","state","postcode","phone_number","country","currency","email_verified","two_factor_enabled"],"additionalProperties":false},"example":{"id":9041,"email":"sam@example.com","first_name":"Sam","last_name":"Okafor","company":"Example Ltd","address1":"1 Example Street","address2":null,"city":"London","state":null,"postcode":"EC1A 1BB","phone_number":"+44 20 7946 0123","country":"GB","currency":"GBP","email_verified":true,"two_factor_enabled":true}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/account/contacts":{"get":{"operationId":"account.contacts.list","summary":"List the additional contacts on your account.","description":"A contact is another person or department stored on your account with its own name, email and address, for example an accounts department. Contacts cannot sign in and hold no permissions. Returns every contact in one response (no pagination); an account with none returns an empty list. Text fields that were never filled in are empty strings.","x-tier":"read","x-scope":"account:read","x-required-scopes":["account:read"],"x-auth-mode":"bearer","security":[{"bearer":["account:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Contact id, used in the contact URLs"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","description":"State, province or region"},"postcode":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, or an empty string when not set"},"phone_number":{"type":"string"},"email":{"type":"string","description":"Contact email address"}},"required":["id","first_name","last_name","company","address1","address2","city","state","postcode","country","phone_number","email"],"additionalProperties":false},"description":"All of your contacts; the list is not paginated"}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":318,"first_name":"Sam","last_name":"Okafor","company":"Example Ltd","address1":"1 Example Street","address2":"","city":"London","state":"","postcode":"EC1A 1BB","country":"GB","phone_number":"+44 20 7946 0123","email":"accounts@example.com"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"account.contacts.create","summary":"Add a contact to your account.","description":"Adds a contact. first_name and email are required; last_name, company, the address fields, country (two-letter ISO 3166-1 code) and phone_number are optional. The email of your own account must already be verified (see email_verified on account.get). The contact gets no sign-in. Returns the stored contact with its id. Send an Idempotency-Key header: repeating the request with the same key returns the same contact instead of adding a second one.","x-tier":"safe","x-scope":"account:contacts:write","x-required-scopes":["account:contacts:write"],"x-auth-mode":"bearer","security":[{"bearer":["account:contacts:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"type":"string","maxLength":255},"company":{"type":"string","maxLength":255,"description":"Company name. An empty string clears it"},"address1":{"type":"string","maxLength":255,"description":"Address line 1"},"address2":{"type":"string","maxLength":255,"description":"Address line 2. An empty string clears it"},"city":{"type":"string","maxLength":128},"state":{"type":"string","maxLength":128,"description":"State, province or region"},"postcode":{"type":"string","maxLength":32},"country":{"description":"ISO 3166-1 alpha-2 country code, two letters (e.g. GB). Stored in upper case","type":"string","pattern":"^[A-Za-z]{2}$"},"phone_number":{"type":"string","maxLength":64,"description":"Phone number, free text up to 64 characters"},"email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Contact email address"}},"required":["first_name","email"],"additionalProperties":false},"example":{"first_name":"Sam","last_name":"Okafor","email":"accounts@example.com","company":"Example Ltd","address1":"1 Example Street","city":"London","postcode":"EC1A 1BB","country":"GB","phone_number":"+44 20 7946 0123"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Contact id, used in the contact URLs"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","description":"State, province or region"},"postcode":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, or an empty string when not set"},"phone_number":{"type":"string"},"email":{"type":"string","description":"Contact email address"}},"required":["id","first_name","last_name","company","address1","address2","city","state","postcode","country","phone_number","email"],"additionalProperties":false},"example":{"id":318,"first_name":"Sam","last_name":"Okafor","company":"Example Ltd","address1":"1 Example Street","address2":"","city":"London","state":"","postcode":"EC1A 1BB","country":"GB","phone_number":"+44 20 7946 0123","email":"accounts@example.com"}}}},"400":{"description":"VALIDATION_FAILED: first_name or email is missing, email is not an email address, country is not two letters, a value is too long, or the body has an unknown field. `field` names it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED (reason: email_not_verified): The email address of your account is not verified yet. The customer must confirm it from the verification email (it can be resent from the client area); then retry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/account/contacts/{id}":{"get":{"operationId":"account.contacts.get","summary":"Read one contact on your account.","description":"Returns one contact by the id from account.contacts.list or account.contacts.create. An id that does not exist or belongs to another account is 404.","x-tier":"read","x-scope":"account:read","x-required-scopes":["account:read"],"x-auth-mode":"bearer","security":[{"bearer":["account:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Contact id from account.contacts.list or account.contacts.create"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Contact id, used in the contact URLs"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","description":"State, province or region"},"postcode":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, or an empty string when not set"},"phone_number":{"type":"string"},"email":{"type":"string","description":"Contact email address"}},"required":["id","first_name","last_name","company","address1","address2","city","state","postcode","country","phone_number","email"],"additionalProperties":false},"example":{"id":318,"first_name":"Sam","last_name":"Okafor","company":"Example Ltd","address1":"1 Example Street","address2":"","city":"London","state":"","postcode":"EC1A 1BB","country":"GB","phone_number":"+44 20 7946 0123","email":"accounts@example.com"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"patch":{"operationId":"account.contacts.update","summary":"Change the details of a contact on your account.","description":"Updates only the fields you send; send at least one. Any field accepted by account.contacts.create can be changed, including email. An empty string clears an optional field. Returns the contact as stored after the change.","x-tier":"safe","x-scope":"account:contacts:write","x-required-scopes":["account:contacts:write"],"x-auth-mode":"bearer","security":[{"bearer":["account:contacts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Contact id from account.contacts.list or account.contacts.create"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":255},"last_name":{"type":"string","maxLength":255},"company":{"type":"string","maxLength":255,"description":"Company name. An empty string clears it"},"address1":{"type":"string","maxLength":255,"description":"Address line 1"},"address2":{"type":"string","maxLength":255,"description":"Address line 2. An empty string clears it"},"city":{"type":"string","maxLength":128},"state":{"type":"string","maxLength":128,"description":"State, province or region"},"postcode":{"type":"string","maxLength":32},"country":{"description":"ISO 3166-1 alpha-2 country code, two letters (e.g. GB). Stored in upper case","type":"string","pattern":"^[A-Za-z]{2}$"},"phone_number":{"type":"string","maxLength":64,"description":"Phone number, free text up to 64 characters"},"email":{"type":"string","maxLength":255,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Contact email address"}},"additionalProperties":false},"example":{"phone_number":"+44 20 7946 0199","email":"billing@example.com"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Contact id, used in the contact URLs"},"first_name":{"type":"string"},"last_name":{"type":"string"},"company":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","description":"State, province or region"},"postcode":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, or an empty string when not set"},"phone_number":{"type":"string"},"email":{"type":"string","description":"Contact email address"}},"required":["id","first_name","last_name","company","address1","address2","city","state","postcode","country","phone_number","email"],"additionalProperties":false},"example":{"id":318,"first_name":"Sam","last_name":"Okafor","company":"Example Ltd","address1":"1 Example Street","address2":"","city":"London","state":"","postcode":"EC1A 1BB","country":"GB","phone_number":"+44 20 7946 0199","email":"billing@example.com"}}}},"400":{"description":"VALIDATION_FAILED: The body is empty, first_name is empty, email is not an email address, country is not two letters, a value is too long, or the body has an unknown field. `field` names it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"delete":{"operationId":"account.contacts.delete","summary":"Delete a contact from your account.","description":"Permanently removes one contact. It cannot be undone; add the contact again with account.contacts.create if it was removed by mistake. Nothing else on the account changes. Returns ok once the contact is confirmed gone; deleting an id that no longer exists is 404. Send the contact id again as `?confirm=`.","x-tier":"destructive","x-scope":"account:contacts:write","x-required-scopes":["account:contacts:write"],"x-auth-mode":"bearer","security":[{"bearer":["account:contacts:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Contact id from account.contacts.list or account.contacts.create"},{"name":"confirm","in":"query","required":true,"schema":{"type":"integer"},"description":"Must equal the contact id in the path ({id})."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},"example":{"ok":true}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the contact id in the path.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/hostname":{"post":{"operationId":"vm.hostname.set","summary":"Change a server's hostname.","description":"Records a new hostname for the server and uses it as the server's name in your account (the `name` in vm.list and vm.get). The server is not restarted and nothing is run inside it, so the hostname the operating system itself reports may stay as it is until you change it there. Returns the hostname that was saved.","x-tier":"safe","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$","description":"A host name of 1 to 253 characters: letters, digits and hyphens in dot-separated labels, e.g. web-1.example.com."}},"required":["hostname"],"additionalProperties":false},"example":{"hostname":"web-1.example.com"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$","description":"A host name of 1 to 253 characters: letters, digits and hyphens in dot-separated labels, e.g. web-1.example.com."}},"required":["hostname"],"additionalProperties":false},"example":{"hostname":"web-1.example.com"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.get, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/name":{"post":{"operationId":"vm.name.set","summary":"Change the name a server is shown under in your account.","description":"Changes only the label shown for the server in your account (the `name` in vm.list and vm.get). The server itself is not touched and keeps running. The name follows the same rules as a hostname. Returns the name that was saved.","x-tier":"safe","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$","description":"A host name of 1 to 253 characters: letters, digits and hyphens in dot-separated labels, e.g. web-1.example.com."}},"required":["name"],"additionalProperties":false},"example":{"name":"web-1.example.com"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$","description":"A host name of 1 to 253 characters: letters, digits and hyphens in dot-separated labels, e.g. web-1.example.com."}},"required":["name"],"additionalProperties":false},"example":{"name":"web-1.example.com"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.get, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/boot-mode":{"post":{"operationId":"vm.boot_mode.set","summary":"Boot a server from its disk or the rescue system.","description":"Sets what the server boots the next time it starts: `disk` is its installed operating system, `rescue` is a temporary recovery system for repairing the disk or recovering files. The change only takes effect at the next boot and this operation does not restart the server: call vm.restart (or vm.start if it is stopped) yourself. While the server runs the rescue system its own operating system and everything it serves are down; set `disk` and restart to go back. `confirm` must equal the server id.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"boot_mode":{"type":"string","enum":["disk","rescue"],"description":"disk boots the installed operating system. rescue boots a temporary recovery system used to repair the disk or recover files."},"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Must equal the server id in the URL."}},"required":["boot_mode","confirm"],"additionalProperties":false},"example":{"boot_mode":"rescue","confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"boot_mode":{"type":"string","enum":["disk","rescue"],"description":"disk boots the installed operating system. rescue boots a temporary recovery system used to repair the disk or recover files."},"restart_required":{"type":"boolean","const":true,"description":"Always true: the change applies the next time the server boots. This operation does not restart or start the server."}},"required":["boot_mode","restart_required"],"additionalProperties":false},"example":{"boot_mode":"rescue","restart_required":true}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the server id as an integer (field: confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"IN_PROGRESS (reason: server_busy): Another change to the server is still being applied. Nothing was changed. Wait a few seconds and send the request again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.get, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/iso-images":{"get":{"operationId":"vm.iso.list","summary":"List the ISO images a server can boot from.","description":"Returns the ISO images that have been uploaded for this server, which is an empty list until one is, and the name of the one it is currently set to boot from, if any. Use an image `id` with vm.iso.mount. If the image you need is not listed, open a support ticket (tickets.create) with a download link to it.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"images":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"size_mb":{"type":"number","minimum":0,"description":"Image size in megabytes."}},"required":["id","name","size_mb"],"additionalProperties":false},"description":"ISO images this server can boot from."},"mounted":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the image the server is set to boot from, or null when none is mounted."}},"required":["images","mounted"],"additionalProperties":false},"example":{"images":[{"id":37,"name":"debian-13-netinst","size_mb":790}],"mounted":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/iso":{"post":{"operationId":"vm.iso.mount","summary":"Set a stopped server to boot from an ISO image.","description":"Attaches an image from vm.iso.list and makes it the boot device. The server must be stopped first (vm.stop, then wait until vm.get shows power_state stopped), must be set to boot from disk, and must not already have an image mounted. This operation does not start the server: call vm.start, and it boots from the image; work in the installer through the console (vm.console). Mounting changes nothing on the disk, but an installer can erase it, and an installer does not get a network address by itself: enter the server's address and gateway by hand. `confirm` must equal the server id.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"iso_image_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"An image id from the ISO image list of this server."},"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Must equal the server id in the URL."}},"required":["iso_image_id","confirm"],"additionalProperties":false},"example":{"iso_image_id":37,"confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"mounted":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the mounted image, or null when none is mounted."},"restart_required":{"type":"boolean","const":true,"description":"Always true: the change applies the next time the server boots. This operation does not restart or start the server."}},"required":["mounted","restart_required"],"additionalProperties":false},"example":{"mounted":"debian-13-netinst","restart_required":true}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the server id as an integer (field: confirm). Nothing was changed.\nVALIDATION_FAILED (reason: iso_already_mounted): An image is already mounted. Remove it with vm.iso.unmount first.\nVALIDATION_FAILED (reason: boot_mode_is_rescue): The server is set to boot the rescue system. Set it back with vm.boot_mode.set (disk) first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: iso_image_not_found): The image id is not one of this server's images. Read the ids with vm.iso.list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"IN_PROGRESS (reason: server_not_stopped): The server is not stopped. Stop it with vm.stop, wait until vm.get shows power_state stopped, then send the request again.\nIN_PROGRESS (reason: server_busy): The server is stopped but another task on it is still running. Wait for it to finish, then send the request again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.iso.list, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/iso/unmount":{"post":{"operationId":"vm.iso.unmount","summary":"Detach the ISO image and boot from disk again.","description":"Removes the mounted image and sets the server to boot from its own disk. The server must be stopped first (vm.stop, then wait until vm.get shows power_state stopped). This operation does not start the server: call vm.start afterwards. It succeeds without changing anything when no image is mounted. `confirm` must equal the server id.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Must equal the server id in the URL."}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"mounted":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the mounted image, or null when none is mounted."},"restart_required":{"type":"boolean","const":true,"description":"Always true: the change applies the next time the server boots. This operation does not restart or start the server."}},"required":["mounted","restart_required"],"additionalProperties":false},"example":{"mounted":null,"restart_required":true}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the server id as an integer (field: confirm). Nothing was changed.\nVALIDATION_FAILED (reason: boot_mode_is_rescue): The server is set to boot the rescue system, not an image. Use vm.boot_mode.set (disk) instead.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"IN_PROGRESS (reason: server_not_stopped): The server is not stopped. Stop it with vm.stop, wait until vm.get shows power_state stopped, then send the request again.\nIN_PROGRESS (reason: server_busy): The server is stopped but another task on it is still running. Wait for it to finish, then send the request again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.iso.list, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/backup-schedule":{"get":{"operationId":"vm.backup_schedule.get","summary":"Read a server's automatic backup schedule.","description":"Returns whether scheduled backups are on, when they run and how many are kept. The time of day is in UTC. Backups taken by the schedule appear in vm.backups.list with type auto.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether scheduled backups run."},"schedule":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly"]},"time":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minutes":{"type":"integer","minimum":0,"maximum":59}},"required":["hour","minutes"],"additionalProperties":false},"days":{"maxItems":31,"type":"array","items":{"type":"integer","minimum":1,"maximum":31}}},"required":["type","time","days"],"additionalProperties":false,"description":"When scheduled backups run. time is in UTC (hour 0 to 23, minutes 0 to 59). days is empty for daily, weekdays 1 (Monday) to 7 (Sunday) for weekly, and days of the month 1 to 31 for monthly, with no repeats."},{"type":"null"}],"description":"Null when no schedule has been set."},"limit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"How many scheduled backups are kept: 3, 5, 7, 14 or 30. Null when not set."}},"required":["enabled","schedule","limit"],"additionalProperties":false},"example":{"enabled":true,"schedule":{"type":"weekly","time":{"hour":3,"minutes":30},"days":[1,4]},"limit":7}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"vm.backup_schedule.set","summary":"Set a server's automatic backup schedule.","description":"Saves the schedule, replacing the earlier one. Backups can run daily, weekly on chosen weekdays (1 is Monday, 7 is Sunday) or monthly on chosen days of the month, at one time of day given in UTC; `limit` is how many scheduled backups are kept (3, 5, 7, 14 or 30, default 7). To turn scheduled backups off send `enabled` false together with the schedule you had, not null. Returns the schedule as saved.","x-tier":"safe","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"schedule":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly"]},"time":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minutes":{"type":"integer","minimum":0,"maximum":59}},"required":["hour","minutes"],"additionalProperties":false},"days":{"maxItems":31,"type":"array","items":{"type":"integer","minimum":1,"maximum":31}}},"required":["type","time","days"],"additionalProperties":false},{"type":"null"}]},"limit":{"default":7,"anyOf":[{"type":"number","const":3},{"type":"number","const":5},{"type":"number","const":7},{"type":"number","const":14},{"type":"number","const":30}]}},"required":["enabled","schedule"],"additionalProperties":false,"description":"enabled turns scheduled backups on or off. schedule says when they run, in UTC: type daily, weekly or monthly; time with hour 0 to 23 and minutes 0 to 59; days empty for daily, weekdays 1 (Monday) to 7 (Sunday) for weekly, days of the month 1 to 31 for monthly. An enabled schedule needs a schedule. limit is how many scheduled backups are kept: 3, 5, 7, 14 or 30, default 7."},"example":{"enabled":true,"schedule":{"type":"weekly","time":{"hour":3,"minutes":30},"days":[1,4]},"limit":7}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether scheduled backups run."},"schedule":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["daily","weekly","monthly"]},"time":{"type":"object","properties":{"hour":{"type":"integer","minimum":0,"maximum":23},"minutes":{"type":"integer","minimum":0,"maximum":59}},"required":["hour","minutes"],"additionalProperties":false},"days":{"maxItems":31,"type":"array","items":{"type":"integer","minimum":1,"maximum":31}}},"required":["type","time","days"],"additionalProperties":false,"description":"When scheduled backups run. time is in UTC (hour 0 to 23, minutes 0 to 59). days is empty for daily, weekdays 1 (Monday) to 7 (Sunday) for weekly, and days of the month 1 to 31 for monthly, with no repeats."},{"type":"null"}],"description":"Null when no schedule has been set."},"limit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"How many scheduled backups are kept: 3, 5, 7, 14 or 30. Null when not set."}},"required":["enabled","schedule","limit"],"additionalProperties":false},"example":{"enabled":true,"schedule":{"type":"weekly","time":{"hour":3,"minutes":30},"days":[1,4]},"limit":7}}}},"400":{"description":"VALIDATION_FAILED: The schedule is not acceptable: `enabled` true with no schedule, days that do not fit the type (none for daily, 1 to 7 for weekly, 1 to 31 for monthly, no repeats), or a `limit` other than 3, 5, 7, 14 or 30.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.backup_schedule.get, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/usage":{"get":{"operationId":"vm.usage","summary":"Read a server's current resource use.","description":"Returns the latest readings for one server: CPU and memory in use, disk and network activity as rates in kilobytes per second, and uptime. These are single recent samples, not averages or totals. For how the figures changed over time use vm.metrics.history; for disk space and bandwidth totals use vm.get.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cpu_usage_percent":{"type":"number","minimum":0,"description":"CPU in use, 0 to 100, averaged across the server's vCPUs. Latest sample."},"memory_used_mb":{"type":"number","minimum":0,"description":"Memory in use, in megabytes. Latest sample. It can read close to the total when real use cannot be measured: see memory_usage_percent."},"memory_total_mb":{"type":"number","minimum":0,"description":"Memory the server has, in megabytes."},"memory_usage_percent":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"memory_used_mb as a share of memory_total_mb, 0 to 100, rounded. Null when the reading is not reliable."},"disk_read_kb_per_sec":{"type":"number","minimum":0,"description":"Disk reads. A rate in kilobytes per second from the latest sample, not a running total."},"disk_write_kb_per_sec":{"type":"number","minimum":0,"description":"Disk writes. A rate in kilobytes per second from the latest sample, not a running total."},"network_in_kb_per_sec":{"type":"number","minimum":0,"description":"Traffic received. A rate in kilobytes per second from the latest sample, not a running total."},"network_out_kb_per_sec":{"type":"number","minimum":0,"description":"Traffic sent. A rate in kilobytes per second from the latest sample, not a running total."},"uptime_seconds":{"description":"Seconds since the server last booted. 0 when not known.","type":"number","minimum":0}},"required":["cpu_usage_percent","memory_used_mb","memory_total_mb","memory_usage_percent","disk_read_kb_per_sec","disk_write_kb_per_sec","network_in_kb_per_sec","network_out_kb_per_sec"],"additionalProperties":false},"example":{"cpu_usage_percent":12,"memory_used_mb":1536,"memory_total_mb":4096,"memory_usage_percent":38,"disk_read_kb_per_sec":4.5,"disk_write_kb_per_sec":120.25,"network_in_kb_per_sec":86,"network_out_kb_per_sec":310.5,"uptime_seconds":345600}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/firewall":{"get":{"operationId":"vm.firewall.list","summary":"List a server's firewall rules.","description":"Returns the rules of the firewall that sits in front of the server, outside its operating system. Rules are checked from the top of the list down and the first one that matches decides; traffic that no rule matches is allowed. With no rules everything is allowed. Rules act on new connections, so sessions that are already open are not cut, and they cover IPv4 only: IPv6 traffic is not filtered. `enabled` says whether the rules can be changed right now.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"False when firewall changes are switched off for this server: rules already in force keep working, but add, remove, move and reset are refused."},"version":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Goes up by one with every change to the rules."},"rules":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["in","out"],"description":"in: traffic arriving at the server. out: traffic leaving it."},"protocol":{"type":"string","enum":["tcp","udp","icmp","any"],"description":"any covers TCP and UDP, and ping as well when no port is given."},"port":{"default":"","description":"Destination port: empty for every port, one port (\"443\") or a range (\"8000-9000\"). Must be empty for icmp.","type":"string","maxLength":11},"ip":{"default":"0.0.0.0/0","description":"IPv4 address or network with no host bits set, e.g. 203.0.113.9 or 198.51.100.0/24. It is the source for direction in and the destination for direction out. Defaults to 0.0.0.0/0 (anywhere). IPv6 is not supported.","type":"string","maxLength":18},"action":{"type":"string","enum":["accept","drop"],"description":"accept lets matching traffic through. drop discards it without a reply."},"comment":{"default":"","description":"Your own note, up to 80 characters: letters, digits, spaces and . _ : / @ ( ) + , -","type":"string","maxLength":80},"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Rule id, used to remove or move the rule. Ids are not reused."}},"required":["direction","protocol","port","ip","action","comment","id"],"additionalProperties":false},"description":"In the order they are checked: the first matching rule decides, and traffic no rule matches is allowed."}},"required":["enabled","version","rules"],"additionalProperties":false},"example":{"enabled":true,"version":2,"rules":[{"id":1,"direction":"in","protocol":"tcp","port":"22","ip":"203.0.113.0/24","action":"accept","comment":"SSH from the office"},{"id":2,"direction":"in","protocol":"tcp","port":"22","ip":"0.0.0.0/0","action":"drop","comment":"Block other SSH"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"vm.firewall.add","summary":"Add a firewall rule at the end of a server's list.","description":"Adds one rule and applies it at once, with no restart. The new rule goes to the bottom of the list, so it is checked last: Rules are checked from the top of the list down and the first one that matches decides; traffic that no rule matches is allowed. Use vm.firewall.move if it must come before an existing rule. A server can have up to 30 rules, and a rule that would drop all UDP or all traffic from everywhere with no port is refused because it would also block replies such as DNS. A wrong rule can lock you out of your own server (for example a drop rule that covers your SSH or remote desktop port). The console (vm.console) and this API are not affected by the firewall, so you can always get back in through the console and undo the change with vm.firewall.remove or vm.firewall.reset. `confirm` must equal the server id. Returns the whole list after the change.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rule":{"type":"object","properties":{"direction":{"type":"string","enum":["in","out"],"description":"in: traffic arriving at the server. out: traffic leaving it."},"protocol":{"type":"string","enum":["tcp","udp","icmp","any"],"description":"any covers TCP and UDP, and ping as well when no port is given."},"port":{"default":"","description":"Destination port: empty for every port, one port (\"443\") or a range (\"8000-9000\"). Must be empty for icmp.","type":"string","maxLength":11},"ip":{"default":"0.0.0.0/0","description":"IPv4 address or network with no host bits set, e.g. 203.0.113.9 or 198.51.100.0/24. It is the source for direction in and the destination for direction out. Defaults to 0.0.0.0/0 (anywhere). IPv6 is not supported.","type":"string","maxLength":18},"action":{"type":"string","enum":["accept","drop"],"description":"accept lets matching traffic through. drop discards it without a reply."},"comment":{"default":"","description":"Your own note, up to 80 characters: letters, digits, spaces and . _ : / @ ( ) + , -","type":"string","maxLength":80}},"required":["direction","protocol","action"],"additionalProperties":false},"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Must equal the server id in the URL."}},"required":["rule","confirm"],"additionalProperties":false},"example":{"rule":{"direction":"in","protocol":"tcp","port":"443","ip":"0.0.0.0/0","action":"accept","comment":"HTTPS"},"confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"False when firewall changes are switched off for this server: rules already in force keep working, but add, remove, move and reset are refused."},"version":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Goes up by one with every change to the rules."},"rules":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["in","out"],"description":"in: traffic arriving at the server. out: traffic leaving it."},"protocol":{"type":"string","enum":["tcp","udp","icmp","any"],"description":"any covers TCP and UDP, and ping as well when no port is given."},"port":{"default":"","description":"Destination port: empty for every port, one port (\"443\") or a range (\"8000-9000\"). Must be empty for icmp.","type":"string","maxLength":11},"ip":{"default":"0.0.0.0/0","description":"IPv4 address or network with no host bits set, e.g. 203.0.113.9 or 198.51.100.0/24. It is the source for direction in and the destination for direction out. Defaults to 0.0.0.0/0 (anywhere). IPv6 is not supported.","type":"string","maxLength":18},"action":{"type":"string","enum":["accept","drop"],"description":"accept lets matching traffic through. drop discards it without a reply."},"comment":{"default":"","description":"Your own note, up to 80 characters: letters, digits, spaces and . _ : / @ ( ) + , -","type":"string","maxLength":80},"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Rule id, used to remove or move the rule. Ids are not reused."}},"required":["direction","protocol","port","ip","action","comment","id"],"additionalProperties":false},"description":"In the order they are checked: the first matching rule decides, and traffic no rule matches is allowed."}},"required":["enabled","version","rules"],"additionalProperties":false},"example":{"enabled":true,"version":3,"rules":[{"id":1,"direction":"in","protocol":"tcp","port":"22","ip":"203.0.113.0/24","action":"accept","comment":"SSH from the office"},{"id":2,"direction":"in","protocol":"tcp","port":"22","ip":"0.0.0.0/0","action":"drop","comment":"Block other SSH"},{"id":3,"direction":"in","protocol":"tcp","port":"443","ip":"0.0.0.0/0","action":"accept","comment":"HTTPS"}]}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the server id as an integer (field: confirm). Nothing was changed.\nVALIDATION_FAILED (reason: invalid_firewall_rule): The rule is not acceptable: the address is not IPv4 or has host bits set, the port is not a port or range between 1 and 65535, an icmp rule has a port, or the rule would drop all UDP or all traffic from everywhere.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"LIMIT_REACHED (reason: firewall_rule_limit): The server already has the most rules it can have (details.max_rules). Remove one with vm.firewall.remove first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.firewall.list, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"UNAVAILABLE (reason: firewall_changes_unavailable): Firewall changes are switched off for this server (`enabled` is false in vm.firewall.list). Rules already in force keep working. Retrying soon will not help.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/firewall/{rule_id}/delete":{"post":{"operationId":"vm.firewall.remove","summary":"Remove one firewall rule from a server.","description":"Deletes the rule and applies the remaining rules at once. Removing a rule changes what the rules below it catch: taking away an accept rule that sits above a drop rule can block that traffic. A wrong rule can lock you out of your own server (for example a drop rule that covers your SSH or remote desktop port). The console (vm.console) and this API are not affected by the firewall, so you can always get back in through the console and undo the change with vm.firewall.remove or vm.firewall.reset. `confirm` must equal the rule id, not the server id. Returns the whole list after the change.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Firewall rule id from vm.firewall.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Must equal the rule id in the URL."}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":2}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"False when firewall changes are switched off for this server: rules already in force keep working, but add, remove, move and reset are refused."},"version":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Goes up by one with every change to the rules."},"rules":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["in","out"],"description":"in: traffic arriving at the server. out: traffic leaving it."},"protocol":{"type":"string","enum":["tcp","udp","icmp","any"],"description":"any covers TCP and UDP, and ping as well when no port is given."},"port":{"default":"","description":"Destination port: empty for every port, one port (\"443\") or a range (\"8000-9000\"). Must be empty for icmp.","type":"string","maxLength":11},"ip":{"default":"0.0.0.0/0","description":"IPv4 address or network with no host bits set, e.g. 203.0.113.9 or 198.51.100.0/24. It is the source for direction in and the destination for direction out. Defaults to 0.0.0.0/0 (anywhere). IPv6 is not supported.","type":"string","maxLength":18},"action":{"type":"string","enum":["accept","drop"],"description":"accept lets matching traffic through. drop discards it without a reply."},"comment":{"default":"","description":"Your own note, up to 80 characters: letters, digits, spaces and . _ : / @ ( ) + , -","type":"string","maxLength":80},"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Rule id, used to remove or move the rule. Ids are not reused."}},"required":["direction","protocol","port","ip","action","comment","id"],"additionalProperties":false},"description":"In the order they are checked: the first matching rule decides, and traffic no rule matches is allowed."}},"required":["enabled","version","rules"],"additionalProperties":false},"example":{"enabled":true,"version":4,"rules":[{"id":1,"direction":"in","protocol":"tcp","port":"22","ip":"203.0.113.0/24","action":"accept","comment":"SSH from the office"},{"id":3,"direction":"in","protocol":"tcp","port":"443","ip":"0.0.0.0/0","action":"accept","comment":"HTTPS"}]}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the rule id as an integer (field: confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: firewall_rule_not_found): The server has no rule with this id. Read the rule ids with vm.firewall.list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.firewall.list, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"UNAVAILABLE (reason: firewall_changes_unavailable): Firewall changes are switched off for this server (`enabled` is false in vm.firewall.list). Rules already in force keep working. Retrying soon will not help.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/firewall/{rule_id}/move":{"post":{"operationId":"vm.firewall.move","summary":"Move a firewall rule one place up or down.","description":"Swaps the rule with the one directly above it (`up`, checked sooner) or below it (`down`, checked later) and applies the new order at once. Rules are checked from the top of the list down and the first one that matches decides; traffic that no rule matches is allowed. Call it again to move a rule further. A wrong rule can lock you out of your own server (for example a drop rule that covers your SSH or remote desktop port). The console (vm.console) and this API are not affected by the firewall, so you can always get back in through the console and undo the change with vm.firewall.remove or vm.firewall.reset. `confirm` must equal the rule id, not the server id. Returns the whole list in its new order.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Firewall rule id from vm.firewall.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"direction":{"type":"string","enum":["up","down"],"description":"up moves the rule one place earlier (checked sooner); down one place later."},"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Must equal the rule id in the URL."}},"required":["direction","confirm"],"additionalProperties":false},"example":{"direction":"up","confirm":3}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"False when firewall changes are switched off for this server: rules already in force keep working, but add, remove, move and reset are refused."},"version":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Goes up by one with every change to the rules."},"rules":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["in","out"],"description":"in: traffic arriving at the server. out: traffic leaving it."},"protocol":{"type":"string","enum":["tcp","udp","icmp","any"],"description":"any covers TCP and UDP, and ping as well when no port is given."},"port":{"default":"","description":"Destination port: empty for every port, one port (\"443\") or a range (\"8000-9000\"). Must be empty for icmp.","type":"string","maxLength":11},"ip":{"default":"0.0.0.0/0","description":"IPv4 address or network with no host bits set, e.g. 203.0.113.9 or 198.51.100.0/24. It is the source for direction in and the destination for direction out. Defaults to 0.0.0.0/0 (anywhere). IPv6 is not supported.","type":"string","maxLength":18},"action":{"type":"string","enum":["accept","drop"],"description":"accept lets matching traffic through. drop discards it without a reply."},"comment":{"default":"","description":"Your own note, up to 80 characters: letters, digits, spaces and . _ : / @ ( ) + , -","type":"string","maxLength":80},"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Rule id, used to remove or move the rule. Ids are not reused."}},"required":["direction","protocol","port","ip","action","comment","id"],"additionalProperties":false},"description":"In the order they are checked: the first matching rule decides, and traffic no rule matches is allowed."}},"required":["enabled","version","rules"],"additionalProperties":false},"example":{"enabled":true,"version":4,"rules":[{"id":1,"direction":"in","protocol":"tcp","port":"22","ip":"203.0.113.0/24","action":"accept","comment":"SSH from the office"},{"id":3,"direction":"in","protocol":"tcp","port":"443","ip":"0.0.0.0/0","action":"accept","comment":"HTTPS"},{"id":2,"direction":"in","protocol":"tcp","port":"22","ip":"0.0.0.0/0","action":"drop","comment":"Block other SSH"}]}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the rule id as an integer (field: confirm). Nothing was changed.\nVALIDATION_FAILED (reason: rule_already_first): The rule is already at the top, so it cannot move up.\nVALIDATION_FAILED (reason: rule_already_last): The rule is already at the bottom, so it cannot move down.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: firewall_rule_not_found): The server has no rule with this id. Read the rule ids with vm.firewall.list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.firewall.list, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"UNAVAILABLE (reason: firewall_changes_unavailable): Firewall changes are switched off for this server (`enabled` is false in vm.firewall.list). Rules already in force keep working. Retrying soon will not help.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/firewall/reset":{"post":{"operationId":"vm.firewall.reset","summary":"Remove every firewall rule from a server.","description":"Deletes all of the server's rules at once, which puts the firewall back to how a new server starts: no rules, all traffic allowed. Use it to recover when a rule has locked you out. The removed rules cannot be brought back, so read them with vm.firewall.list first if you may want them again. `confirm` must equal the server id. Returns the now empty list.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Must equal the server id in the URL."}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"False when firewall changes are switched off for this server: rules already in force keep working, but add, remove, move and reset are refused."},"version":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Goes up by one with every change to the rules."},"rules":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["in","out"],"description":"in: traffic arriving at the server. out: traffic leaving it."},"protocol":{"type":"string","enum":["tcp","udp","icmp","any"],"description":"any covers TCP and UDP, and ping as well when no port is given."},"port":{"default":"","description":"Destination port: empty for every port, one port (\"443\") or a range (\"8000-9000\"). Must be empty for icmp.","type":"string","maxLength":11},"ip":{"default":"0.0.0.0/0","description":"IPv4 address or network with no host bits set, e.g. 203.0.113.9 or 198.51.100.0/24. It is the source for direction in and the destination for direction out. Defaults to 0.0.0.0/0 (anywhere). IPv6 is not supported.","type":"string","maxLength":18},"action":{"type":"string","enum":["accept","drop"],"description":"accept lets matching traffic through. drop discards it without a reply."},"comment":{"default":"","description":"Your own note, up to 80 characters: letters, digits, spaces and . _ : / @ ( ) + , -","type":"string","maxLength":80},"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Rule id, used to remove or move the rule. Ids are not reused."}},"required":["direction","protocol","port","ip","action","comment","id"],"additionalProperties":false},"description":"In the order they are checked: the first matching rule decides, and traffic no rule matches is allowed."}},"required":["enabled","version","rules"],"additionalProperties":false},"example":{"enabled":true,"version":5,"rules":[]}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the server id as an integer (field: confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The change was sent but could not be confirmed, so it may or may not have applied. The same Idempotency-Key keeps returning this answer. Read the current state with vm.firewall.list, and send the change again with a new key only if it did not apply.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"UNAVAILABLE (reason: firewall_changes_unavailable): Firewall changes are switched off for this server (`enabled` is false in vm.firewall.list). Rules already in force keep working. Retrying soon will not help.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/acl":{"get":{"operationId":"proxy.acl.get","summary":"Read whether your proxy accepts whitelisted addresses only.","description":"Returns whether whitelist enforcement is on. When it is on, a connection is accepted only from an address on your whitelist (proxy.whitelist.list), even with the correct credential. When it is off, the credential works from any address, and whitelisted addresses still work without it.","x-tier":"read","x-scope":"proxy:read","x-required-scopes":["proxy:read"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"acl_enabled":{"type":"boolean","description":"True: only whitelisted addresses may connect, even with the correct credential. False: the credential works from anywhere."}},"required":["acl_enabled"],"additionalProperties":false},"example":{"acl_enabled":false}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"proxy.acl.set","summary":"Turn whitelist-only access to your proxy on or off.","description":"Sets whether connections are accepted from whitelisted addresses only. Add your addresses with proxy.whitelist.add before turning it on: with enforcement on and an empty or wrong whitelist, every connection is refused, including ones with the correct credential. Returns the setting as stored. Turning it off again restores access at once.","x-tier":"safe","x-scope":"proxy:whitelist","x-required-scopes":["proxy:whitelist"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:whitelist"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"True to accept connections from whitelisted addresses only"}},"required":["enabled"],"additionalProperties":false},"example":{"enabled":true}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"acl_enabled":{"type":"boolean","description":"True: only whitelisted addresses may connect, even with the correct credential. False: the credential works from anywhere."}},"required":["acl_enabled"],"additionalProperties":false},"example":{"acl_enabled":true}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The outcome is unknown. Read proxy.acl.get to see the stored setting before retrying.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/spend-breakdown":{"get":{"operationId":"proxy.spend","summary":"Read what you were charged for proxy traffic, per tier.","description":"Returns the traffic, request count and amount charged to your proxy balance over the last 1, 7 or 30 days (default 1), in total and for each tier you used, with the published price per gigabyte of each tier. Amounts are whole cents in US dollars, rounded to the nearest cent. Use it to see which tier is consuming the balance.","x-tier":"read","x-scope":"proxy:read","x-required-scopes":["proxy:read"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:read"]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"string","enum":["1","7","30"]},"description":"1, 7 or 30 days; default 1"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":90,"description":"Length of the period in days, ending today"},"first_data_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date, YYYY-MM-DD"},{"type":"null"}],"description":"Earliest day in the period that has per-tier data; null when there is none"},"currency":{"type":"string","const":"USD","description":"Proxy balance, prices and spend are always in US dollars"},"total":{"type":"object","properties":{"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Traffic in bytes"},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of proxied requests"},"spend_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount charged to the proxy balance, in whole cents rounded to the nearest cent"}},"required":["bytes","requests","spend_minor"],"additionalProperties":false},"per_tier":{"type":"array","items":{"type":"object","properties":{"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Traffic in bytes"},"requests":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of proxied requests"},"spend_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount charged to the proxy balance, in whole cents rounded to the nearest cent"},"tier":{"type":"string","enum":["isp","ipv6","essential","standard","cleanproxy","cleanproxy_geo","sticky_clean","mobile"],"description":"Proxy tier key, as shown on the proxy pricing page and used in the proxy password"},"price_per_gb_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Published price of this tier per gigabyte, in whole cents"}},"required":["bytes","requests","spend_minor","tier","price_per_gb_minor"],"additionalProperties":false},"description":"One row per tier used in the period, highest spend first. Rows are rounded separately, so they can differ from the total by a cent."}},"required":["days","first_data_date","currency","total","per_tier"],"additionalProperties":false},"example":{"days":7,"first_data_date":"2026-11-08","currency":"USD","total":{"bytes":6400000000,"requests":91250,"spend_minor":1900},"per_tier":[{"tier":"standard","bytes":5200000000,"requests":88100,"spend_minor":1300,"price_per_gb_minor":250},{"tier":"mobile","bytes":1200000000,"requests":3150,"spend_minor":600,"price_per_gb_minor":500}]}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/test":{"post":{"operationId":"proxy.test","summary":"Send a test request through your proxy.","description":"Makes a single request through your own proxy account, with the tier, country and session settings you give, to a fixed address-echo service, and reports whether it worked, the exit address the target saw, where that address is located and how long it took. You cannot choose the target. The request is real proxy traffic: it is charged to your balance at the tested tier (a few kilobytes), so your account needs a positive balance. It proves one connection only, not session lifetime or access to any particular site, and it can take up to about half a minute. A test that could not connect still answers 200 with `success: false` and an `error`.","x-tier":"safe","x-scope":"proxy:credentials","x-required-scopes":["proxy:credentials"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:credentials"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"default":"standard","description":"Tier key to test, for example standard or mobile. A tier that is not on sale is refused.","type":"string","maxLength":32},"country":{"default":"","description":"Two-letter country code to exit from; empty for any country","type":"string","maxLength":2},"session":{"default":"","description":"Sticky-session id (letters, digits, underscore, hyphen); empty for a rotating connection","type":"string","maxLength":128},"ttl_minutes":{"description":"How long the sticky session should keep its exit address, in minutes","type":"integer","minimum":1,"maximum":1440},"state":{"description":"State or region to exit from; needs country and the http protocol","type":"string","maxLength":80},"city":{"description":"City to exit from; needs country and the http protocol","type":"string","maxLength":80},"zip":{"description":"Postal code to exit from; needs country and the http protocol","type":"string","maxLength":12},"asn":{"description":"Network (AS number) to exit from; needs country and the http protocol","type":"string","maxLength":12},"protocol":{"description":"Which proxy protocol to test; http when omitted","type":"string","enum":["http","socks5"]}},"additionalProperties":false},"example":{"tier":"standard","country":"US","session":"job-42","ttl_minutes":30}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the request went through your proxy and an exit address came back"},"ip":{"description":"The exit address the target saw","anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"string","format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"}]},"error":{"description":"Plain reason when success is false","type":"string"},"country":{"description":"Country name the exit address is located in; empty when unknown","type":"string"},"country_code":{"description":"Two-letter country code of the exit address; empty when unknown","type":"string"},"city":{"description":"City the exit address is located in; empty when unknown","type":"string"},"clean":{"description":"Whether the exit address passed a reputation lookup at test time; null when the lookup was unavailable. Not a guarantee of access to any site.","anyOf":[{"type":"boolean"},{"type":"null"}]},"latency_ms":{"type":"number","minimum":0,"description":"Milliseconds until the exit address came back or the attempt failed"},"tested_tier":{"type":"string","description":"Tier key the test ran on"},"tested_country":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Country code that was requested; null for any country"},"diagnostics":{"type":"object","properties":{"protocol":{"type":"string","enum":["HTTP CONNECT","SOCKS5"]},"requested":{"type":"object","properties":{"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"zip":{"anyOf":[{"type":"string"},{"type":"null"}]},"asn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["country","state","city","zip","asn"],"additionalProperties":false,"description":"The targeting that was asked for; null where nothing was asked"},"observed":{"anyOf":[{"type":"object","properties":{"country":{"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"zip":{"type":"string"}},"required":["country","state","city","zip"],"additionalProperties":false},{"type":"null"}],"description":"Where the exit address was located; null when the location lookup was unavailable"},"geo_status":{"type":"string","enum":["unavailable","country_mismatch","observed"],"description":"unavailable: no location lookup. country_mismatch: located in a different country than requested. observed: located, and no mismatch with the requested country."},"session_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Short reference derived from the session id you sent, for quoting to support; null without a session"},"requested_ttl_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Sticky-session lifetime that was requested, in minutes"},"total_ms":{"type":"number","minimum":0,"description":"Milliseconds for the whole test, including the location lookup"},"note":{"type":"string","description":"What this single test does and does not prove"}},"required":["protocol","requested","observed","geo_status","session_ref","requested_ttl_minutes","total_ms","note"],"additionalProperties":false}},"required":["success","latency_ms","tested_tier","tested_country","diagnostics"],"additionalProperties":false},"example":{"success":true,"ip":"203.0.113.77","country":"United States","country_code":"US","city":"Dallas","clean":true,"latency_ms":1840,"tested_tier":"standard","tested_country":"US","diagnostics":{"protocol":"HTTP CONNECT","requested":{"country":"US","state":null,"city":null,"zip":null,"asn":null},"observed":{"country":"US","state":"Texas","city":"Dallas","zip":"75201"},"geo_status":"observed","session_ref":"9f2c41d07ab3","requested_ttl_minutes":30,"total_ms":2105,"note":"One connection only; this does not verify session duration."}}}}},"400":{"description":"VALIDATION_FAILED (reason: tier_not_available): The tier is not on sale.\nVALIDATION_FAILED (reason: unsupported_settings): The tier does not support the settings: rotating-only tiers take no session, lifetime or state/city/ZIP/ASN and are limited in country; state, city, ZIP and ASN need a country and the http protocol; the session id may hold only letters, digits, underscores and hyphens.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED (reason: no_proxy_balance): Your proxy balance is zero. Add proxy credit first.\nACCOUNT_RESTRICTED (reason: proxy_access_inactive): Proxy access is switched off for your account.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The test could not be run to a result. It may still have used a little balance; do not assume it did not.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/trial":{"post":{"operationId":"proxy.trial.claim","summary":"Claim the one-time free proxy credit for a new account.","description":"Adds a small one-time free credit to your proxy balance and opens proxy access, without a payment. It is for accounts with a verified email address that have never had proxy access, and it can be claimed once. Returns the balance after the credit; next read the credential with proxy.credentials.get and the connection details with proxy.get. It spends nothing.","x-tier":"safe","x-scope":"proxy:credentials","x-required-scopes":["proxy:credentials"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:credentials"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"balance_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Proxy balance after the free credit, in whole cents rounded down"},"currency":{"type":"string","const":"USD","description":"Proxy balance, prices and spend are always in US dollars"}},"required":["balance_minor","currency"],"additionalProperties":false},"example":{"balance_minor":50,"currency":"USD"}}}},"400":{"description":"VALIDATION_FAILED: The request did not carry a usable client address.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED (reason: email_not_verified): Verify the account email address first, then claim again.\nACCOUNT_RESTRICTED: Without a reason: the account is not eligible for the free trial.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: trial_not_offered): The free trial is not on offer at the moment.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"ALREADY_EXISTS (reason: trial_already_claimed): This account has already used its free trial.\nALREADY_EXISTS (reason: proxy_access_exists): This account already has proxy access, so the trial does not apply. Add proxy credit instead.\nLIMIT_REACHED: No free trial is available to this request right now. Add proxy credit to start instead.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/tickets":{"get":{"operationId":"tickets.list","summary":"List your support tickets.","description":"Lists your support tickets, newest first, without their messages. status is open (waiting for PrivateByte staff), replied (staff have answered and it is waiting for you) or closed. Use limit (1 to 100, default 20) and pass next_cursor back as cursor for the next page; next_cursor is null on the last page. Read a conversation with tickets.get.","x-tier":"read","x-scope":"tickets:read","x-required-scopes":["tickets:read"],"x-auth-mode":"bearer","security":[{"bearer":["tickets:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1–100, default 20"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from the previous page; tickets are listed newest first"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Ticket id, a whole number. The same id is returned by create and list and accepted by get, reply and close"},"subject":{"type":"string"},"status":{"type":"string","enum":["open","replied","closed"],"description":"open: waiting for support staff (new ticket, or your reply was the last message). replied: staff have answered and the ticket is waiting for you. closed: finished; a new reply from you reopens it"},"priority":{"type":"string","enum":["low","normal","high"]},"department_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Department the ticket is filed under; names come from the departments list"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the ticket was opened, ISO 8601 UTC"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the ticket last changed (latest message or status change), ISO 8601 UTC"}},"required":["id","subject","status","priority","department_id","created_at","updated_at"],"additionalProperties":false},"description":"Newest ticket first"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor to get the next page; null on the last page"}},"required":["data","next_cursor"],"additionalProperties":false},"example":{"data":[{"id":1042,"subject":"Server 4821 unreachable after reboot","status":"replied","priority":"high","department_id":2,"created_at":"2026-11-14T09:12:44.000Z","updated_at":"2026-11-14T09:41:03.000Z"},{"id":1017,"subject":"Question about my invoice","status":"closed","priority":"normal","department_id":3,"created_at":"2026-10-30T15:02:10.000Z","updated_at":"2026-10-31T08:20:55.000Z"}],"next_cursor":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"tickets.create","summary":"Open a support ticket.","description":"Opens a support ticket; this is how to ask PrivateByte staff for help. A ticket is read and answered by people, usually within a day, not instantly. Never put passwords, API keys, private keys or other secrets in a ticket. Required: department_id (from tickets.departments), subject (up to 255 characters) and message (plain text, up to 16,000 characters). Optional: priority (low, normal or high; default normal) and service_id, the id of the service the problem is about, which must be yours. Attachments are not supported. Returns the new ticket id, and the customer gets a confirmation email. Send an Idempotency-Key header so a retry does not open a second ticket. Then poll tickets.get until status is replied.","x-tier":"safe","x-scope":"tickets:write","x-required-scopes":["tickets:write"],"x-auth-mode":"bearer","security":[{"bearer":["tickets:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":16000,"description":"Plain text, 1 to 16,000 characters. Read by PrivateByte support staff. Never include passwords, API keys or private keys. Attachments are not supported"},"department_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"A department id from the departments list"},"subject":{"type":"string","minLength":1,"maxLength":255,"description":"One-line summary, 1 to 255 characters"},"priority":{"default":"normal","description":"How urgent the request is. Defaults to normal","type":"string","enum":["low","normal","high"]},"service_id":{"description":"Id of the service (server, proxy plan or other product) the ticket is about. Must be one of yours. Leave out for account-wide questions","type":"integer","exclusiveMinimum":0,"maximum":2147483647}},"required":["message","department_id","subject"],"additionalProperties":false},"example":{"department_id":2,"subject":"Server 4821 unreachable after reboot","message":"Server 4821 has not answered ping or SSH since I rebooted it at 09:05 UTC. The console shows it stuck at the boot loader.","priority":"high","service_id":4821}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Id of the new ticket"}},"required":["id"],"additionalProperties":false},"example":{"id":1042}}}},"400":{"description":"VALIDATION_FAILED (reason: department_not_found): department_id is not a department from tickets.departments. `details.department_id` repeats the value sent. List the departments and retry with a valid id.\nVALIDATION_FAILED: subject or message is empty or too long, priority is not low, normal or high, or the body has an unknown field (attachments are not supported). `field` names it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: service_not_found): service_id is not a service on your account. `details.service_id` repeats the value sent. Leave service_id out or use an id from your services.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"IDEMPOTENCY_CONFLICT: This Idempotency-Key was already used for a different ticket request. Ticket keys are remembered for good, across create, reply and close: use a new key for every new message.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"RATE_LIMITED: Opening, replying to and closing tickets each have an hourly allowance per account. Wait for Retry-After; do not retry sooner.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/tickets/{id}":{"get":{"operationId":"tickets.get","summary":"Read your support ticket and client-visible replies.","description":"Returns one ticket with its whole conversation, oldest message first. Each message says whether it was written by you (client) or by PrivateByte staff (support). The id is the one returned by tickets.create and tickets.list; older letter-and-number ticket references from emails are not accepted. When status is replied, staff are waiting for you: answer with tickets.reply or finish with tickets.close. There is no push notification: poll this operation, or account.alerts.list, to see a staff answer.","x-tier":"read","x-scope":"tickets:read","x-required-scopes":["tickets:read"],"x-auth-mode":"bearer","security":[{"bearer":["tickets:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Ticket id from tickets.list or tickets.create"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Ticket id, a whole number. The same id is returned by create and list and accepted by get, reply and close"},"subject":{"type":"string"},"status":{"type":"string","enum":["open","replied","closed"],"description":"open: waiting for support staff (new ticket, or your reply was the last message). replied: staff have answered and the ticket is waiting for you. closed: finished; a new reply from you reopens it"},"priority":{"type":"string","enum":["low","normal","high"]},"department_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Department the ticket is filed under; names come from the departments list"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the ticket was opened, ISO 8601 UTC"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the ticket last changed (latest message or status change), ISO 8601 UTC"},"service_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},{"type":"null"}],"description":"Service the ticket is about, null when it is not tied to one"},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Message id"},"author":{"type":"string","enum":["client","support"],"description":"client: written by you or through your API key. support: written by PrivateByte staff"},"message":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the message was posted, ISO 8601 UTC"}},"required":["id","author","message","created_at"],"additionalProperties":false},"description":"The whole conversation, oldest message first. Internal staff notes are never included"}},"required":["id","subject","status","priority","department_id","created_at","updated_at","service_id","messages"],"additionalProperties":false},"example":{"id":1042,"subject":"Server 4821 unreachable after reboot","status":"replied","priority":"high","department_id":2,"created_at":"2026-11-14T09:12:44.000Z","updated_at":"2026-11-14T09:41:03.000Z","service_id":4821,"messages":[{"id":5120,"author":"client","message":"Server 4821 has not answered ping or SSH since I rebooted it at 09:05 UTC. The console shows it stuck at the boot loader.","created_at":"2026-11-14T09:12:44.000Z"},{"id":5123,"author":"support","message":"Thanks for the details. The boot order was reset by the reboot; we have corrected it and the server is starting now. Please confirm it is reachable.","created_at":"2026-11-14T09:41:03.000Z"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/tickets/departments":{"get":{"operationId":"tickets.departments","summary":"List support departments.","description":"Lists the support departments a ticket can be filed under. Call this before tickets.create and pass the id of the department whose name fits the request (for example technical problems, billing questions or abuse reports) as department_id. The list changes rarely, but always take the id from this response and do not guess it.","x-tier":"read","x-scope":"tickets:read","x-required-scopes":["tickets:read"],"x-auth-mode":"bearer","security":[{"bearer":["tickets:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Use as department_id when opening a ticket"},"name":{"type":"string","description":"Department name, which says what it handles"}},"required":["id","name"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":1,"name":"General Enquiries"},{"id":2,"name":"Technical Support"},{"id":3,"name":"Payments/Billing"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/tickets/{id}/replies":{"post":{"operationId":"tickets.reply","summary":"Reply to your support ticket.","description":"Adds a message from you to one of your tickets. It is read by PrivateByte staff, so never include passwords, API keys or private keys. The message is plain text, up to 16,000 characters; attachments are not supported. A reply sets the ticket to open (waiting for staff), and replying to a closed ticket reopens it. Returns the ticket id and the id of the new message. Send an Idempotency-Key header so a retry does not post the message twice. Then poll tickets.get until status is replied.","x-tier":"safe","x-scope":"tickets:write","x-required-scopes":["tickets:write"],"x-auth-mode":"bearer","security":[{"bearer":["tickets:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Ticket id from tickets.list or tickets.create"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":16000,"description":"Plain text, 1 to 16,000 characters. Read by PrivateByte support staff. Never include passwords, API keys or private keys. Attachments are not supported"}},"required":["message"],"additionalProperties":false},"example":{"message":"Confirmed, the server is reachable again. Thank you."}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Ticket id"},"message_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Id of the message that was added"}},"required":["id","message_id"],"additionalProperties":false},"example":{"id":1042,"message_id":5127}}}},"400":{"description":"VALIDATION_FAILED: message is empty or longer than 16,000 characters, or the body has an unknown field. `field` names it. Shorten the message or split it into several replies.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"IDEMPOTENCY_CONFLICT: This Idempotency-Key was already used for a different ticket request. Ticket keys are remembered for good, across create, reply and close: use a new key for every new message.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"RATE_LIMITED: Opening, replying to and closing tickets each have an hourly allowance per account. Wait for Retry-After; do not retry sooner.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/tickets/{id}/close":{"post":{"operationId":"tickets.close","summary":"Close your support ticket.","description":"Marks one of your tickets as closed, telling staff no further answer is needed. No message is added and nothing is deleted: the conversation stays readable with tickets.get, and a later tickets.reply reopens it. Closing a ticket that is already closed succeeds and changes nothing. Takes no body; send an Idempotency-Key header.","x-tier":"safe","x-scope":"tickets:write","x-required-scopes":["tickets:write"],"x-auth-mode":"bearer","security":[{"bearer":["tickets:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Ticket id from tickets.list or tickets.create"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},"example":{"ok":true}}}},"409":{"description":"IDEMPOTENCY_CONFLICT: This Idempotency-Key was already used for a different ticket request. Ticket keys are remembered for good, across create, reply and close: use a new key for every new message.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"RATE_LIMITED: Opening, replying to and closing tickets each have an hourly allowance per account. Wait for Retry-After; do not retry sooner.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy":{"get":{"operationId":"proxy.get","summary":"Read your proxy balance, default tier and where to connect.","description":"Returns your prepaid proxy balance, how much traffic was metered today, your default tier and the host and ports to connect to. It never returns the credential: read that with proxy.credentials.get. The balance is one pool shared by every tier; each connection is charged at the price per gigabyte of the tier it uses.","x-tier":"read","x-scope":"proxy:read","x-required-scopes":["proxy:read"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"balance_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Prepaid proxy balance in whole cents, rounded down so it never overstates what can be spent"},"currency":{"type":"string","const":"USD","description":"Proxy balance, prices and spend are always in US dollars"},"used_today_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Proxy traffic metered so far today, in bytes"},"tier":{"type":"string","enum":["isp","ipv6","essential","standard","cleanproxy","cleanproxy_geo","sticky_clean","mobile"],"description":"The account default tier, used when a connection does not name one"},"active":{"type":"boolean","description":"False when proxy access is switched off for this account"},"host":{"type":"string","const":"proxy.privatebyte.com","description":"Hostname to connect to"},"ports":{"type":"object","properties":{"http":{"type":"number","const":3128},"socks5":{"type":"number","const":1080}},"required":["http","socks5"],"additionalProperties":false,"description":"TCP ports for HTTP(S) proxying and for SOCKS5"}},"required":["balance_minor","currency","used_today_bytes","tier","active","host","ports"],"additionalProperties":false},"example":{"balance_minor":1275,"currency":"USD","used_today_bytes":48213990,"tier":"standard","active":true,"host":"proxy.privatebyte.com","ports":{"http":3128,"socks5":1080}}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/usage":{"get":{"operationId":"proxy.usage","summary":"Read your proxy balance and the traffic metered today.","description":"Returns the same balance and usage figures as proxy.get, without the connection details. Use it to check the remaining balance before a large job; when the balance reaches zero, connections are refused until you add proxy credit. For what the traffic was charged call proxy.spend.","x-tier":"read","x-scope":"proxy:read","x-required-scopes":["proxy:read"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"balance_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Prepaid proxy balance in whole cents, rounded down so it never overstates what can be spent"},"currency":{"type":"string","const":"USD","description":"Proxy balance, prices and spend are always in US dollars"},"used_today_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Proxy traffic metered so far today, in bytes"},"tier":{"type":"string","enum":["isp","ipv6","essential","standard","cleanproxy","cleanproxy_geo","sticky_clean","mobile"],"description":"The account default tier, used when a connection does not name one"},"active":{"type":"boolean","description":"False when proxy access is switched off for this account"}},"required":["balance_minor","currency","used_today_bytes","tier","active"],"additionalProperties":false},"example":{"balance_minor":1275,"currency":"USD","used_today_bytes":48213990,"tier":"standard","active":true}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/credentials":{"get":{"operationId":"proxy.credentials.get","summary":"Read your proxy credential.","description":"Returns the secret key that authenticates you to the proxy. Connect to the host and ports from proxy.get with the key as the username and a tier key as the password; add `_country-XX` to the password to exit from a country, and `_session-<id>` to keep the same exit address. The key spends your balance, so treat it like a password and never put it in logs or shared text. If it leaks, replace it with proxy.credentials.rotate.","x-tier":"read","x-scope":"proxy:credentials","x-required-scopes":["proxy:credentials"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:credentials"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"type":"string","minLength":1,"description":"Opaque proxy credential. A secret: do not parse, log or share it."}},"required":["api_key"],"additionalProperties":false},"example":{"api_key":"EXAMPLE-PROXY-KEY-DO-NOT-USE"}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/rotate":{"post":{"operationId":"proxy.credentials.rotate","summary":"Replace your proxy credential with a new one.","description":"Issues a new proxy key and returns it once. The old key stops working immediately, so every client still using it fails until it is updated; your balance, whitelist and settings are kept. It can be used only once in a while: an earlier repeat answers 429 with Retry-After. Repeating the same request with the same Idempotency-Key does not rotate again and does not repeat the secret (`api_key` is null): read the current key with proxy.credentials.get.","x-tier":"safe","x-scope":"proxy:credentials","x-required-scopes":["proxy:credentials"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:credentials"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"api_key":{"anyOf":[{"type":"string","minLength":1,"description":"Opaque proxy credential. A secret: do not parse, log or share it."},{"type":"null"}],"description":"The new opaque proxy credential. Null only on an idempotent replay, which never repeats the secret."},"note":{"description":"Present on a replay: says where to read the current credential","type":"string"}},"required":["api_key"],"additionalProperties":false},"example":{"api_key":"EXAMPLE-NEW-PROXY-KEY-DO-NOT-USE"}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The outcome is unknown: the key may or may not have changed. Read proxy.credentials.get to see which key is current before retrying.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/proxy/whitelist":{"get":{"operationId":"proxy.whitelist.list","summary":"List the addresses allowed without a password.","description":"Returns the IPv4 addresses on your proxy whitelist, how many there are and the most the list can hold. Anyone connecting from a listed address uses your proxy balance with no credential at all. Review the list regularly and remove addresses you no longer control with proxy.whitelist.remove.","x-tier":"read","x-scope":"proxy:whitelist","x-required-scopes":["proxy:whitelist"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:whitelist"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ips":{"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"string","format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"}]},"description":"Addresses that may use your proxy balance without a password"},"count":{"description":"How many addresses are on the list","type":"integer","minimum":0,"maximum":9007199254740991},"max":{"description":"The most addresses the list can hold","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["ips"],"additionalProperties":false},"example":{"ips":["203.0.113.10","203.0.113.11"],"count":2,"max":10}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"proxy.whitelist.add","summary":"Allow an address to use your proxy without a password.","description":"Adds one address to your proxy whitelist. This is the same as handing out your credential to that address: any connection from it is accepted with no username or password and is charged to your balance. Add only a fixed public address that you alone control, never a shared, office-wide, VPN or dynamic address. Private, loopback, link-local and reserved addresses are refused, IPv6 is not supported, and an address can be on one account's list only. Check the result with proxy.whitelist.list; to accept whitelisted addresses only, also call proxy.acl.set.","x-tier":"safe","x-scope":"proxy:whitelist","x-required-scopes":["proxy:whitelist"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:whitelist"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ip":{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$","description":"One public IPv4 address. Private, loopback, link-local, shared, multicast and reserved addresses are refused."}},"required":["ip"],"additionalProperties":false},"example":{"ip":"203.0.113.10"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false},"example":{"success":true}}}},"400":{"description":"VALIDATION_FAILED: Field `ip`: not an IPv4 address, or not a public one.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"LIMIT_REACHED (reason: whitelist_full): The list already holds its maximum (`details.max`). Remove an address first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The address could not be added, for example because it is already on another account's list, or the outcome is unknown. Read proxy.whitelist.list to see whether it is there before retrying.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"delete":{"operationId":"proxy.whitelist.remove","summary":"Remove one address from your proxy whitelist.","description":"Removes one IPv4 address, given in the `ip` query parameter, from your whitelist. From then on connections from that address need your credential, and if whitelist enforcement is on (proxy.acl.get) they are refused altogether. Removing an address that is not on the list succeeds and changes nothing.","x-tier":"safe","x-scope":"proxy:whitelist","x-required-scopes":["proxy:whitelist"],"x-auth-mode":"bearer","security":[{"bearer":["proxy:whitelist"]}],"parameters":[{"name":"ip","in":"query","required":true,"schema":{"type":"string"},"description":"One allow-listed IPv4 address to remove"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false},"example":{"success":true}}}},"404":{"description":"NOT_FOUND (reason: no_proxy_access): Your account has no proxy access yet. It starts when you buy proxy credit or claim the free trial (proxy.trial.claim).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The outcome is unknown. Read proxy.whitelist.list to see the current list before retrying.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/billing/balance":{"get":{"operationId":"billing.balance","summary":"Read your wallet balance.","description":"Returns the wallet credit you can spend, in whole minor units (cents), and the currency your account is billed in. Nothing needs to be true first. Check it before paying invoices from the wallet: credit only pays invoices in the same currency. To add credit use billing.deposits.create.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"balance_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet credit available to spend, in whole minor units (cents) of `currency`"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"The currency your account is billed in. balance_minor is the wallet credit held in this currency"}},"required":["balance_minor","currency"],"additionalProperties":false},"example":{"balance_minor":2500,"currency":"USD"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/invoices":{"get":{"operationId":"invoices.list","summary":"Your invoices, newest first.","description":"Returns your invoices, newest first: id, total, currency, status (paid, unpaid or cancelled), issue date and due date. Page with `limit` (1 to 100, default 20) and `cursor`; a null `next_cursor` means that was the last page. For the amount still owed and the line items, read one invoice with invoices.get. It changes nothing.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1–100, default 20"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from previous page; invoices have descending ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Invoice id"},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Invoice total after credit already applied and tax, in whole minor units (cents) of `currency`"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of this invoice. It can only be paid from wallet credit in the same currency"},"status":{"type":"string","enum":["paid","unpaid","cancelled"],"description":"paid: settled in full. unpaid: open, see balance_minor on the invoice for what is left. cancelled: void, cannot be paid"},"issued_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"UTC calendar date the invoice was issued, YYYY-MM-DD"},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date, YYYY-MM-DD"},{"type":"null"}],"description":"Calendar date payment is due, YYYY-MM-DD. null when the invoice has no due date"}},"required":["id","total_minor","currency","status","issued_date","due_date"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as `cursor` to get the next page. null on the last page"}},"required":["data","next_cursor"],"additionalProperties":false},"example":{"data":[{"id":9101,"total_minor":599,"currency":"USD","status":"unpaid","issued_date":"2026-11-07","due_date":"2026-11-21"},{"id":9090,"total_minor":799,"currency":"USD","status":"paid","issued_date":"2026-10-07","due_date":"2026-10-21"}],"next_cursor":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/invoices/{invoice_id}":{"get":{"operationId":"invoices.get","summary":"Read one invoice.","description":"Returns one of your invoices with `balance_minor` (what is still owed, 0 when paid) and its line items. Read it before paying so the ceiling you send covers `balance_minor`, and afterwards to see whether it is paid. An invoice that is not yours is answered as not found.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your invoice id"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Invoice id"},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Invoice total after credit already applied and tax, in whole minor units (cents) of `currency`"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of this invoice. It can only be paid from wallet credit in the same currency"},"status":{"type":"string","enum":["paid","unpaid","cancelled"],"description":"paid: settled in full. unpaid: open, see balance_minor on the invoice for what is left. cancelled: void, cannot be paid"},"issued_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"UTC calendar date the invoice was issued, YYYY-MM-DD"},"due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date, YYYY-MM-DD"},{"type":"null"}],"description":"Calendar date payment is due, YYYY-MM-DD. null when the invoice has no due date"},"balance_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount still to pay, in whole minor units (cents) of `currency`. 0 when paid"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Line item text as shown on the invoice"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Line amount (unit price times quantity), in whole minor units (cents) of the invoice currency"}},"required":["description","amount_minor"],"additionalProperties":false}}},"required":["id","total_minor","currency","status","issued_date","due_date","balance_minor","items"],"additionalProperties":false},"example":{"id":9101,"total_minor":599,"currency":"USD","status":"unpaid","issued_date":"2026-11-07","due_date":"2026-11-21","balance_minor":599,"items":[{"description":"Cloud server, monthly (07/11/2026 - 06/12/2026)","amount_minor":599}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/billing/credit-batches":{"post":{"operationId":"billing.credit_batches.create","summary":"Pay up to 25 invoices from your wallet at once.","description":"Spends wallet credit on 1 to 25 unpaid invoices in one step. Use it when the wallet already covers them; for one invoice, or to make a part payment, use invoices.credit.create. Every invoice is paid in full or nothing is paid: the batch is refused if the wallet cannot cover the whole selection or any invoice needs more than its `max_amount_minor`. Those per-invoice ceilings are your consent to the amounts (read `balance_minor` from invoices.get first); `confirm` must be true. The receipt lists one payment per invoice and the wallet balance afterwards. A receipt proves the invoice was paid; any service on it is activated or renewed shortly afterwards, not within this call. If the reply is lost, or the answer is 502 UPSTREAM_UNAVAILABLE, the outcome is unknown: do not send it again with a new Idempotency-Key. Call billing.credit_batches.find, and billing.credit_batches.cancel if the original must never complete.","x-tier":"money","x-scope":"invoices:pay","x-required-scopes":["invoices:pay","billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["invoices:pay","billing:read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of the wallet and of every listed invoice"},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"confirm":{"type":"boolean","const":true,"description":"Must be true. The request names several invoices, so there is no single id to repeat; the per-invoice ceilings are your consent to the amounts"}},"required":["currency","invoices","confirm"],"additionalProperties":false},"example":{"currency":"USD","invoices":[{"invoice_id":9101,"max_amount_minor":599},{"invoice_id":9102,"max_amount_minor":799}],"confirm":true}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","pattern":"^crb_[a-f0-9]{32}$"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"payments":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"payment_id":{"type":"string","pattern":"^crp_[a-f0-9]{32}$","description":"Id of this wallet payment; read it back with the payment read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The invoice that was paid"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"applied_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount taken from the wallet and applied to the invoice, in whole minor units (cents). Never more than the ceiling"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this payment, in whole minor units (cents)"},"invoice_remaining_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What was still owed on the invoice straight after this payment. 0 when it was paid in full"},"invoice_paid":{"type":"boolean","description":"true when this payment settled the invoice in full; false when it was a part payment and a balance remains"}},"required":["payment_id","invoice_id","currency","applied_minor","wallet_balance_after_minor","invoice_remaining_after_minor","invoice_paid"],"additionalProperties":false},"description":"One payment per invoice, in the same order as `invoices`. Every invoice in a batch is paid in full"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance after the whole batch, in whole minor units (cents)"}},"required":["batch_id","currency","invoices","payments","wallet_balance_after_minor"],"additionalProperties":false},"example":{"batch_id":"crb_0123456789abcdef0123456789abcdef","currency":"USD","invoices":[{"invoice_id":9101,"max_amount_minor":599},{"invoice_id":9102,"max_amount_minor":799}],"payments":[{"payment_id":"crp_11111111111111111111111111111111","invoice_id":9101,"currency":"USD","applied_minor":599,"wallet_balance_after_minor":1901,"invoice_remaining_after_minor":0,"invoice_paid":true},{"payment_id":"crp_22222222222222222222222222222222","invoice_id":9102,"currency":"USD","applied_minor":799,"wallet_balance_after_minor":1102,"invoice_remaining_after_minor":0,"invoice_paid":true}],"wallet_balance_after_minor":1102}}}},"400":{"description":"VALIDATION_FAILED (reason: ceiling_exceeded): An invoice needs more than the max_amount_minor you set for it. Nothing was paid; read the invoices again and resend with a new Idempotency-Key.\nVALIDATION_FAILED (reason: currency_mismatch): An invoice is not in the currency you sent. Nothing was paid.\nVALIDATION_FAILED (reason: invoice_not_payable): An invoice in the selection is already paid, cancelled or has nothing left to pay. Nothing was paid.\nVALIDATION_FAILED (reason: request_cancelled): This Idempotency-Key was cancelled with billing.credit_batches.cancel and can never pay.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The account email is not verified yet, or the account is restricted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"PRECONDITION (reason: gateway_payment_refused): An invoice in the batch holds a Gateway that cannot be paid for now: it is on hold, or its location is no longer on sale to your account. Nothing in the batch was paid. `details` carries invoice_id and service_ids; contact support.\nLIMIT_REACHED (reason: insufficient_wallet_balance): The wallet does not cover the whole selection. Nothing was paid; check billing.balance, then add funds or pay fewer invoices.\nIDEMPOTENCY_CONFLICT: This Idempotency-Key was already used with a different currency, amount or selection. Nothing was done.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: Billing did not answer. The outcome may be unknown: call billing.credit_batches.find with the original Idempotency-Key before doing anything else.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"get":{"operationId":"billing.credit_batches.find","summary":"Find a batch payment by its Idempotency-Key.","description":"Use this when the reply to billing.credit_batches.create was lost or the outcome was unknown. Send the original Idempotency-Key as `request_key` with the same currency and the same `invoices` list (same order and ceilings, as JSON text). `batch` is the original receipt, or null when that request has not paid anything. null does not prove it never will if the request may still be running: use billing.credit_batches.cancel to settle that. It changes nothing.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"request_key","in":"query","required":true,"schema":{"type":"string"},"description":"Exact original Idempotency-Key used for this batch"},{"name":"currency","in":"query","required":true,"schema":{"type":"string","enum":["USD","EUR","GBP"]},"description":"Original confirmed currency"},{"name":"invoices","in":"query","required":true,"schema":{"type":"string"},"description":"JSON array of the exact original ordered invoice_id and max_amount_minor objects; 1 to 25 unique invoices, at most 4096 JSON characters"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"batch":{"anyOf":[{"type":"object","properties":{"batch_id":{"type":"string","pattern":"^crb_[a-f0-9]{32}$"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"payments":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"payment_id":{"type":"string","pattern":"^crp_[a-f0-9]{32}$","description":"Id of this wallet payment; read it back with the payment read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The invoice that was paid"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"applied_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount taken from the wallet and applied to the invoice, in whole minor units (cents). Never more than the ceiling"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this payment, in whole minor units (cents)"},"invoice_remaining_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What was still owed on the invoice straight after this payment. 0 when it was paid in full"},"invoice_paid":{"type":"boolean","description":"true when this payment settled the invoice in full; false when it was a part payment and a balance remains"}},"required":["payment_id","invoice_id","currency","applied_minor","wallet_balance_after_minor","invoice_remaining_after_minor","invoice_paid"],"additionalProperties":false},"description":"One payment per invoice, in the same order as `invoices`. Every invoice in a batch is paid in full"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance after the whole batch, in whole minor units (cents)"}},"required":["batch_id","currency","invoices","payments","wallet_balance_after_minor"],"additionalProperties":false},{"type":"null"}],"description":"The receipt of the original request, or null when that request did not pay anything"}},"required":["batch"],"additionalProperties":false},"example":{"batch":{"batch_id":"crb_0123456789abcdef0123456789abcdef","currency":"USD","invoices":[{"invoice_id":9101,"max_amount_minor":599},{"invoice_id":9102,"max_amount_minor":799}],"payments":[{"payment_id":"crp_11111111111111111111111111111111","invoice_id":9101,"currency":"USD","applied_minor":599,"wallet_balance_after_minor":1901,"invoice_remaining_after_minor":0,"invoice_paid":true},{"payment_id":"crp_22222222222222222222222222222222","invoice_id":9102,"currency":"USD","applied_minor":799,"wallet_balance_after_minor":1102,"invoice_remaining_after_minor":0,"invoice_paid":true}],"wallet_balance_after_minor":1102}}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/billing/credit-batches/cancellation":{"post":{"operationId":"billing.credit_batches.cancel","summary":"Stop a batch payment request, or get its receipt.","description":"Closes the outcome of an earlier billing.credit_batches.create whose result you do not know. Name it by its original Idempotency-Key in `request_key`, with the same currency and `invoices`, and `confirm` true; this call needs an Idempotency-Key of its own. If the original had not paid, it is cancelled permanently and can never pay (`state` cancelled); if it had already paid, nothing is reversed and you get its receipt (`state` completed). It never refunds or spends. After a cancellation, pay with a new request and a new Idempotency-Key.","x-tier":"safe","x-scope":"invoices:pay","x-required-scopes":["invoices:pay","billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["invoices:pay","billing:read"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency of the wallet and of every listed invoice"},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"confirm":{"type":"boolean","const":true,"description":"Must be true. The request names several invoices, so there is no single id to repeat; the per-invoice ceilings are your consent to the amounts"},"request_key":{"type":"string","pattern":"^[\\x21-\\x7e]{8,128}$","description":"The Idempotency-Key of the original batch payment request you want stopped"}},"required":["currency","invoices","confirm","request_key"],"additionalProperties":false},"example":{"request_key":"batch-2026-11-14-a","currency":"USD","invoices":[{"invoice_id":9101,"max_amount_minor":599},{"invoice_id":9102,"max_amount_minor":799}],"confirm":true}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"cancelled"},"cancellation":{"type":"object","properties":{"cancellation_id":{"type":"string","pattern":"^crb_[a-f0-9]{32}$","description":"Id of the cancellation record"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"cancelled":{"type":"boolean","const":true,"description":"Always true: the original request can never take a payment now"}},"required":["cancellation_id","currency","invoices","cancelled"],"additionalProperties":false}},"required":["state","cancellation"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"completed"},"batch":{"type":"object","properties":{"batch_id":{"type":"string","pattern":"^crb_[a-f0-9]{32}$"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"payments":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"payment_id":{"type":"string","pattern":"^crp_[a-f0-9]{32}$","description":"Id of this wallet payment; read it back with the payment read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The invoice that was paid"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"applied_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount taken from the wallet and applied to the invoice, in whole minor units (cents). Never more than the ceiling"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this payment, in whole minor units (cents)"},"invoice_remaining_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What was still owed on the invoice straight after this payment. 0 when it was paid in full"},"invoice_paid":{"type":"boolean","description":"true when this payment settled the invoice in full; false when it was a part payment and a balance remains"}},"required":["payment_id","invoice_id","currency","applied_minor","wallet_balance_after_minor","invoice_remaining_after_minor","invoice_paid"],"additionalProperties":false},"description":"One payment per invoice, in the same order as `invoices`. Every invoice in a batch is paid in full"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance after the whole batch, in whole minor units (cents)"}},"required":["batch_id","currency","invoices","payments","wallet_balance_after_minor"],"additionalProperties":false}},"required":["state","batch"],"additionalProperties":false}],"description":"How the original request ended. cancelled: nothing was paid and nothing will be. completed: it had already paid, and `batch` is its receipt"},"example":{"state":"cancelled","cancellation":{"cancellation_id":"crb_fedcba9876543210fedcba9876543210","currency":"USD","invoices":[{"invoice_id":9101,"max_amount_minor":599},{"invoice_id":9102,"max_amount_minor":799}],"cancelled":true}}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: Billing did not answer. The outcome may be unknown: call billing.credit_batches.resolution.get with the original Idempotency-Key before doing anything else.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"get":{"operationId":"billing.credit_batches.resolution.get","summary":"Read how a batch payment request ended.","description":"Tells you whether an earlier billing.credit_batches.create, named by its original Idempotency-Key in `request_key` with the same currency and `invoices`, ended as completed (with its receipt) or cancelled. `resolution` is null when it has neither paid nor been cancelled, so its outcome is still open. It is the read-only counterpart of billing.credit_batches.cancel: use it to check before deciding to cancel.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"request_key","in":"query","required":true,"schema":{"type":"string"},"description":"Exact original payment Idempotency-Key"},{"name":"currency","in":"query","required":true,"schema":{"type":"string","enum":["USD","EUR","GBP"]},"description":"Exact original confirmed currency"},{"name":"invoices","in":"query","required":true,"schema":{"type":"string"},"description":"JSON array of the original ordered invoice_id and max_amount_minor objects, 1 to 25 unique invoices"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"resolution":{"anyOf":[{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"cancelled"},"cancellation":{"type":"object","properties":{"cancellation_id":{"type":"string","pattern":"^crb_[a-f0-9]{32}$","description":"Id of the cancellation record"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"cancelled":{"type":"boolean","const":true,"description":"Always true: the original request can never take a payment now"}},"required":["cancellation_id","currency","invoices","cancelled"],"additionalProperties":false}},"required":["state","cancellation"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"completed"},"batch":{"type":"object","properties":{"batch_id":{"type":"string","pattern":"^crb_[a-f0-9]{32}$"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"payments":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"payment_id":{"type":"string","pattern":"^crp_[a-f0-9]{32}$","description":"Id of this wallet payment; read it back with the payment read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The invoice that was paid"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"applied_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount taken from the wallet and applied to the invoice, in whole minor units (cents). Never more than the ceiling"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this payment, in whole minor units (cents)"},"invoice_remaining_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What was still owed on the invoice straight after this payment. 0 when it was paid in full"},"invoice_paid":{"type":"boolean","description":"true when this payment settled the invoice in full; false when it was a part payment and a balance remains"}},"required":["payment_id","invoice_id","currency","applied_minor","wallet_balance_after_minor","invoice_remaining_after_minor","invoice_paid"],"additionalProperties":false},"description":"One payment per invoice, in the same order as `invoices`. Every invoice in a batch is paid in full"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance after the whole batch, in whole minor units (cents)"}},"required":["batch_id","currency","invoices","payments","wallet_balance_after_minor"],"additionalProperties":false}},"required":["state","batch"],"additionalProperties":false}],"description":"How the original request ended. cancelled: nothing was paid and nothing will be. completed: it had already paid, and `batch` is its receipt"},{"type":"null"}],"description":"null when the original request neither paid nor was cancelled: its outcome is still open"}},"required":["resolution"],"additionalProperties":false},"example":{"resolution":{"state":"completed","batch":{"batch_id":"crb_0123456789abcdef0123456789abcdef","currency":"USD","invoices":[{"invoice_id":9101,"max_amount_minor":599},{"invoice_id":9102,"max_amount_minor":799}],"payments":[{"payment_id":"crp_11111111111111111111111111111111","invoice_id":9101,"currency":"USD","applied_minor":599,"wallet_balance_after_minor":1901,"invoice_remaining_after_minor":0,"invoice_paid":true},{"payment_id":"crp_22222222222222222222222222222222","invoice_id":9102,"currency":"USD","applied_minor":799,"wallet_balance_after_minor":1102,"invoice_remaining_after_minor":0,"invoice_paid":true}],"wallet_balance_after_minor":1102}}}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/billing/credit-batches/{batch_id}":{"get":{"operationId":"billing.credit_batches.get","summary":"Read the receipt of a batch wallet payment.","description":"Returns the receipt made by billing.credit_batches.create: the invoices paid, one payment per invoice and the wallet balance after the batch. A receipt never changes; read invoices.get or billing.balance for the current state.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"Id of a batch wallet payment, from billing.credit_batches.create","schema":{"type":"string","pattern":"^crb_[a-f0-9]{32}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","pattern":"^crb_[a-f0-9]{32}$"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"invoices":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"One of your invoices"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling for this invoice in whole minor units (cents). The batch is refused if the invoice needs more than this"}},"required":["invoice_id","max_amount_minor"],"additionalProperties":false},"description":"1 to 25 different invoices, in the order they are to be paid"},"payments":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"payment_id":{"type":"string","pattern":"^crp_[a-f0-9]{32}$","description":"Id of this wallet payment; read it back with the payment read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The invoice that was paid"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"applied_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount taken from the wallet and applied to the invoice, in whole minor units (cents). Never more than the ceiling"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this payment, in whole minor units (cents)"},"invoice_remaining_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What was still owed on the invoice straight after this payment. 0 when it was paid in full"},"invoice_paid":{"type":"boolean","description":"true when this payment settled the invoice in full; false when it was a part payment and a balance remains"}},"required":["payment_id","invoice_id","currency","applied_minor","wallet_balance_after_minor","invoice_remaining_after_minor","invoice_paid"],"additionalProperties":false},"description":"One payment per invoice, in the same order as `invoices`. Every invoice in a batch is paid in full"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance after the whole batch, in whole minor units (cents)"}},"required":["batch_id","currency","invoices","payments","wallet_balance_after_minor"],"additionalProperties":false},"example":{"batch_id":"crb_0123456789abcdef0123456789abcdef","currency":"USD","invoices":[{"invoice_id":9101,"max_amount_minor":599},{"invoice_id":9102,"max_amount_minor":799}],"payments":[{"payment_id":"crp_11111111111111111111111111111111","invoice_id":9101,"currency":"USD","applied_minor":599,"wallet_balance_after_minor":1901,"invoice_remaining_after_minor":0,"invoice_paid":true},{"payment_id":"crp_22222222222222222222222222222222","invoice_id":9102,"currency":"USD","applied_minor":799,"wallet_balance_after_minor":1102,"invoice_remaining_after_minor":0,"invoice_paid":true}],"wallet_balance_after_minor":1102}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/invoices/{invoice_id}/payments/credit":{"post":{"operationId":"invoices.credit.create","summary":"Pay one invoice from your wallet, up to a ceiling you state.","description":"Spends wallet credit on one unpaid invoice. Use it for a single invoice; for several at once use billing.credit_batches.create. It takes the smallest of: what the invoice still owes, your wallet balance, and `max_amount_minor`, so it can be a part payment: `invoice_paid` in the receipt says whether the invoice was settled and `invoice_remaining_after_minor` what is left. `max_amount_minor` is the ceiling and your consent to the amount; `confirm` must repeat the invoice id in the URL. The receipt holds the amount applied and the wallet balance afterwards. A receipt proves the invoice was paid; any service on it is activated or renewed shortly afterwards, not within this call. If the reply is lost, or the answer is 502 UPSTREAM_UNAVAILABLE, the outcome is unknown: do not send it again with a new Idempotency-Key. Call invoices.credit.find instead.","x-tier":"money","x-scope":"invoices:pay","x-required-scopes":["invoices:pay","billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["invoices:pay","billing:read"]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your invoice id"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"Currency you expect the invoice and the wallet to be in. Refused when the invoice is in another currency"},"max_amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Spending ceiling in whole minor units (cents): at most this much leaves the wallet. This is your consent to the amount"},"confirm":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"Must equal the invoice id in the URL"}},"required":["currency","max_amount_minor","confirm"],"additionalProperties":false},"example":{"currency":"USD","max_amount_minor":599,"confirm":9101}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"payment_id":{"type":"string","pattern":"^crp_[a-f0-9]{32}$","description":"Id of this wallet payment; read it back with the payment read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The invoice that was paid"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"applied_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount taken from the wallet and applied to the invoice, in whole minor units (cents). Never more than the ceiling"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this payment, in whole minor units (cents)"},"invoice_remaining_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What was still owed on the invoice straight after this payment. 0 when it was paid in full"},"invoice_paid":{"type":"boolean","description":"true when this payment settled the invoice in full; false when it was a part payment and a balance remains"}},"required":["payment_id","invoice_id","currency","applied_minor","wallet_balance_after_minor","invoice_remaining_after_minor","invoice_paid"],"additionalProperties":false},"example":{"payment_id":"crp_11111111111111111111111111111111","invoice_id":9101,"currency":"USD","applied_minor":599,"wallet_balance_after_minor":1901,"invoice_remaining_after_minor":0,"invoice_paid":true}}}},"400":{"description":"VALIDATION_FAILED (reason: currency_mismatch): The invoice is not in the currency you sent. `details` carries invoice_id and, when known, the invoice currency.\nVALIDATION_FAILED (reason: invoice_already_paid): The invoice is paid or has nothing left to pay. `details` carries invoice_id.\nVALIDATION_FAILED (reason: invoice_cancelled): The invoice was cancelled. `details` carries invoice_id.\nVALIDATION_FAILED (reason: invoice_not_payable): The invoice stopped being payable while the request ran. `details` carries invoice_id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The account email is not verified yet, or the account is restricted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"PRECONDITION (reason: gateway_payment_refused): The invoice holds a Gateway that cannot be paid for now: it is on hold, or its location is no longer on sale to your account. Nothing was paid. `details` carries invoice_id and service_ids; contact support.\nLIMIT_REACHED (reason: no_wallet_balance): The wallet holds no credit in this currency. Nothing was paid; add funds with billing.deposits.create. `details` carries invoice_id.\nIDEMPOTENCY_CONFLICT: This Idempotency-Key was already used with a different currency, amount or selection. Nothing was done.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: Billing did not answer. The outcome may be unknown: call invoices.credit.find with the original Idempotency-Key before doing anything else.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"get":{"operationId":"invoices.credit.find","summary":"Find a wallet payment by its Idempotency-Key.","description":"Use this when the reply to invoices.credit.create was lost or the outcome was unknown. Send the original Idempotency-Key as `request_key` with the same currency and max_amount_minor. `payment` is the original receipt, or null when that request did not take a payment. It changes nothing and never pays again.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your invoice id"},{"name":"request_key","in":"query","required":true,"schema":{"type":"string"},"description":"The exact Idempotency-Key used for the original payment request"},{"name":"currency","in":"query","required":true,"schema":{"type":"string","enum":["USD","EUR","GBP"]},"description":"Original payment currency"},{"name":"max_amount_minor","in":"query","required":true,"schema":{"type":"integer"},"description":"The exact positive spend cap from the original request, in minor currency units"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"payment":{"anyOf":[{"type":"object","properties":{"payment_id":{"type":"string","pattern":"^crp_[a-f0-9]{32}$","description":"Id of this wallet payment; read it back with the payment read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The invoice that was paid"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"applied_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount taken from the wallet and applied to the invoice, in whole minor units (cents). Never more than the ceiling"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this payment, in whole minor units (cents)"},"invoice_remaining_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What was still owed on the invoice straight after this payment. 0 when it was paid in full"},"invoice_paid":{"type":"boolean","description":"true when this payment settled the invoice in full; false when it was a part payment and a balance remains"}},"required":["payment_id","invoice_id","currency","applied_minor","wallet_balance_after_minor","invoice_remaining_after_minor","invoice_paid"],"additionalProperties":false},{"type":"null"}],"description":"The receipt of the original request, or null when that request did not take a payment"}},"required":["payment"],"additionalProperties":false},"example":{"payment":{"payment_id":"crp_11111111111111111111111111111111","invoice_id":9101,"currency":"USD","applied_minor":599,"wallet_balance_after_minor":1901,"invoice_remaining_after_minor":0,"invoice_paid":true}}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/invoices/{invoice_id}/payments/credit/{payment_id}":{"get":{"operationId":"invoices.credit.get","summary":"Read the receipt of one wallet payment on an invoice.","description":"Returns the receipt made by invoices.credit.create: the amount applied, the wallet balance and what the invoice still owed straight afterwards. A receipt never changes, so later payments are not reflected in it; read invoices.get for the current state.","x-tier":"read","x-scope":"billing:read","x-required-scopes":["billing:read"],"x-auth-mode":"bearer","security":[{"bearer":["billing:read"]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Your invoice id"},{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","pattern":"^crp_[a-f0-9]{32}$"},"description":"Id of a wallet payment, from invoices.credit.create"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"payment_id":{"type":"string","pattern":"^crp_[a-f0-9]{32}$","description":"Id of this wallet payment; read it back with the payment read operation"},"invoice_id":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647,"description":"The invoice that was paid"},"currency":{"type":"string","enum":["USD","EUR","GBP"]},"applied_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Amount taken from the wallet and applied to the invoice, in whole minor units (cents). Never more than the ceiling"},"wallet_balance_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet balance straight after this payment, in whole minor units (cents)"},"invoice_remaining_after_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"What was still owed on the invoice straight after this payment. 0 when it was paid in full"},"invoice_paid":{"type":"boolean","description":"true when this payment settled the invoice in full; false when it was a part payment and a balance remains"}},"required":["payment_id","invoice_id","currency","applied_minor","wallet_balance_after_minor","invoice_remaining_after_minor","invoice_paid"],"additionalProperties":false},"example":{"payment_id":"crp_11111111111111111111111111111111","invoice_id":9101,"currency":"USD","applied_minor":599,"wallet_balance_after_minor":1901,"invoice_remaining_after_minor":0,"invoice_paid":true}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms":{"get":{"operationId":"vm.list","summary":"List your servers.","description":"Lists the servers on your account that are active or suspended, in ascending id order. Cancelled and terminated servers are not listed. Each entry carries the server id that every other server operation takes as {id}. Page with `limit` and `cursor` until `next_cursor` is null. For live power state and resource figures, call vm.get for one server.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"1–100, default 20"},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"next_cursor from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id. Use it as {id} in every /v1/vms/{id} path and as `confirm` where an operation asks for the server id"},"name":{"type":"string","description":"Hostname or display name of the server"},"plan":{"type":"string","description":"Name of the plan the server is on"},"status":{"type":"string","enum":["active","suspended"],"description":"Billing state. A suspended server is switched off by us and refuses every change except taking a backup, until its overdue invoice is paid"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary IP address, null when none is recorded yet"},"next_due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date, YYYY-MM-DD"},{"type":"null"}],"description":"Date the next renewal is due (YYYY-MM-DD), null when unknown"}},"required":["id","name","plan","status","ip","next_due_date"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as `cursor` to get the next page; null on the last page"}},"required":["data","next_cursor"],"additionalProperties":false},"example":{"data":[{"id":4821,"name":"web-1.example.com","plan":"Orbit","status":"active","ip":"203.0.113.10","next_due_date":"2026-12-01"}],"next_cursor":null}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}":{"get":{"operationId":"vm.get","summary":"One server, with live power state.","description":"Returns one server with its billing state, live power state, size, addresses and current resource use. The live figures are read at the time of the call; when they cannot be read, `power_state` is `unknown` and the live fields are null, and the call still answers 200. Use it to check the result of a power operation, or to find out whether the server is suspended before changing it.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id. Use it as {id} in every /v1/vms/{id} path and as `confirm` where an operation asks for the server id"},"name":{"type":"string","description":"Hostname or display name of the server"},"plan":{"type":"string","description":"Name of the plan the server is on"},"status":{"type":"string","enum":["active","suspended"],"description":"Billing state. A suspended server is switched off by us and refuses every change except taking a backup, until its overdue invoice is paid"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Primary IP address, null when none is recorded yet"},"next_due_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date, YYYY-MM-DD"},{"type":"null"}],"description":"Date the next renewal is due (YYYY-MM-DD), null when unknown"},"power_state":{"type":"string","enum":["running","stopped","restarting","installing","rescue","suspended","migrating","unknown"],"description":"Live power state. restarting, installing and migrating mean work is in progress; rescue means the server is booted into rescue mode; unknown means the live state could not be read just now, and every live figure below is then null"},"vcpu":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Virtual CPU cores, null when the live state is unknown"},"memory_mb":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Memory in MB, null when the live state is unknown"},"disk_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Primary disk size in GB, null when the live state is unknown"},"os":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Installed operating system, null when unknown"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Data centre location, null when unknown"},"ips":{"type":"array","items":{"type":"string"},"description":"Every IPv4 and IPv6 address on the server"},"ipv6_allocations":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"},"subnet":{"type":"string","format":"cidrv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$"},"gateway":{"type":"string","format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"}},"required":["address"],"additionalProperties":false},"description":"IPv6 addresses with the subnet and gateway needed to configure them inside the server; empty when the server has none"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Login name of the administrator account inside the server (for example root), null when unknown"},"cpu_usage_percent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"memory_usage_percent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"memory_used_mb":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"disk_usage_percent":{"anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]},"disk_used_gb":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"bandwidth":{"anyOf":[{"type":"object","properties":{"used_gb":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"total_gb":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"inbound_gb":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"outbound_gb":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["used_gb","total_gb","inbound_gb","outbound_gb"],"additionalProperties":false},{"type":"null"}],"description":"Network transfer counters in GB, null when the live state is unknown"},"extra_disks":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"device":{"type":"string"},"total_gb":{"type":"number","exclusiveMinimum":0},"used_gb":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["device","total_gb","used_gb"],"additionalProperties":false}},{"type":"null"}],"description":"Additional disks seen from inside a running server; null when the server is not running or the figures cannot be read"},"uptime_seconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Seconds since the server last booted, null when not running or unknown"}},"required":["id","name","plan","status","ip","next_due_date","power_state","vcpu","memory_mb","disk_gb","os","location","ips","ipv6_allocations","username","cpu_usage_percent","memory_usage_percent","memory_used_mb","disk_usage_percent","disk_used_gb","bandwidth","extra_disks","uptime_seconds"],"additionalProperties":false},"example":{"id":4821,"name":"web-1.example.com","plan":"Orbit","status":"active","ip":"203.0.113.10","next_due_date":"2026-12-01","power_state":"running","vcpu":2,"memory_mb":4096,"disk_gb":50,"os":"Ubuntu 24.04","location":"Europe","ips":["203.0.113.10","2001:db8:10::1"],"ipv6_allocations":[{"address":"2001:db8:10::1","subnet":"2001:db8:10::/64","gateway":"2001:db8:10::ffff"}],"username":"root","cpu_usage_percent":3.5,"memory_usage_percent":41,"memory_used_mb":1680,"disk_usage_percent":22,"disk_used_gb":11,"bandwidth":{"used_gb":18.2,"total_gb":1024,"inbound_gb":6.1,"outbound_gb":12.1},"extra_disks":[],"uptime_seconds":86400}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/force-stop":{"post":{"operationId":"vm.force_stop","summary":"Cut power to a server immediately, without a clean shutdown.","description":"Cuts power at once, like pulling the plug: the operating system gets no chance to shut down, so unsaved data can be lost and a file system may need repair. Use it only when vm.stop did not work. `confirm` must equal the server id in the path. It answers 202 as soon as the work is accepted, not when it is done. To follow it, call vm.operations.get (GET /v1/vms/{id}/operations/{op_id}) with `operation.id` every 5 seconds and read `operation.status`: `pending` and `running` mean keep polling, `succeeded` and `failed` are final. If it is still `pending` after 5 minutes, stop polling and check the result directly: vm.get shows the live `power_state`.","x-tier":"destructive","x-scope":"vm:power","x-required-scopes":["vm:power"],"x-auth-mode":"bearer","security":[{"bearer":["vm:power"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Must equal the server id in the path ({id}), as an integer"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":4821}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"force_stop","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the server id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/console":{"post":{"operationId":"vm.console","summary":"Open a console connection to a server.","description":"Returns a WebSocket address for a VNC client that shows the server's screen and accepts keyboard and mouse input. This is full interactive control of the machine, including during boot and when its network is down, so treat the response as a secret. The connection must be opened before `expires_at`, about five minutes after the call; ask again for a new one after that. Each call returns a fresh connection and nothing is stored for replay (this operation takes no Idempotency-Key). `confirm` must equal the server id.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Must equal the server id in the path ({id}), as an integer"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"Single-purpose credential for this console connection. Treat it as a secret: whoever holds it controls the server until it expires"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"The connection must be opened before this time (about five minutes after the request). Ask for a new one afterwards"},"websocket_url":{"type":"string","format":"uri","description":"WebSocket address to connect a VNC client to. It already carries the access token"}},"required":["access_token","expires_at","websocket_url"],"additionalProperties":false},"example":{"access_token":"example-console-token","expires_at":"2026-11-14T10:05:00.000Z","websocket_url":"wss://console.example.com/connect?token=example-console-token"}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the server id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/tasks":{"get":{"operationId":"vm.tasks.list","summary":"List the recent background tasks of a server.","description":"Returns up to 100 recent tasks that ran on the server, whoever started them: you through the API or the client area, a schedule, or our own systems. Use it to see what the server has been doing, or to find a task that is stuck and can be cancelled or one that failed and can be retried (`cancelable`, `retryable`). It is not the way to follow a 202 response: task ids are not linked to operation ids, so poll vm.operations.get for that.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^task_[0-9a-f]{32}$","description":"Task id. Use it as {task_ref} and as `confirm` when cancelling or retrying this task"},"action":{"type":"string","description":"Kind of work, as a short machine name such as vm-start or backup-create"},"status":{"type":"string","enum":["pending","running","succeeded","failed"],"description":"succeeded and failed are final; a cancelled task reports failed"},"progress":{"type":"number","minimum":0,"maximum":100,"description":"Percent complete, 0 to 100"},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the task was queued, null when not recorded"},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the task last changed, null when not recorded"},"cancelable":{"type":"boolean","description":"Whether POST …/cancel can stop this task now"},"retryable":{"type":"boolean","description":"Whether POST …/retry may run this task again. Always false for work that erases or overwrites a disk"}},"required":["id","action","status","progress","created_at","updated_at","cancelable","retryable"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":"task_0123456789abcdef0123456789abcdef","action":"vm-restart","status":"succeeded","progress":100,"created_at":"2026-11-14T10:00:00.000Z","updated_at":"2026-11-14T10:00:21.000Z","cancelable":false,"retryable":true}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/tasks/{task_ref}":{"get":{"operationId":"vm.tasks.get","summary":"Read one task belonging to your server.","description":"Returns one task from vm.tasks.list, re-read at the time of the call, with its status, progress and whether it can be cancelled or retried. Use it after vm.tasks.cancel or vm.tasks.retry to see the effect.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"task_ref","in":"path","required":true,"schema":{"type":"string","pattern":"^task_[0-9a-f]{32}$"},"description":"Task id from vm.tasks.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^task_[0-9a-f]{32}$","description":"Task id. Use it as {task_ref} and as `confirm` when cancelling or retrying this task"},"action":{"type":"string","description":"Kind of work, as a short machine name such as vm-start or backup-create"},"status":{"type":"string","enum":["pending","running","succeeded","failed"],"description":"succeeded and failed are final; a cancelled task reports failed"},"progress":{"type":"number","minimum":0,"maximum":100,"description":"Percent complete, 0 to 100"},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the task was queued, null when not recorded"},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the task last changed, null when not recorded"},"cancelable":{"type":"boolean","description":"Whether POST …/cancel can stop this task now"},"retryable":{"type":"boolean","description":"Whether POST …/retry may run this task again. Always false for work that erases or overwrites a disk"}},"required":["id","action","status","progress","created_at","updated_at","cancelable","retryable"],"additionalProperties":false},"example":{"id":"task_0123456789abcdef0123456789abcdef","action":"vm-restart","status":"succeeded","progress":100,"created_at":"2026-11-14T10:00:00.000Z","updated_at":"2026-11-14T10:00:21.000Z","cancelable":false,"retryable":true}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/tasks/{task_ref}/cancel":{"post":{"operationId":"vm.tasks.cancel","summary":"Cancel a running or queued task on a server.","description":"Asks for a task to be stopped. Only a task whose `cancelable` is true can be cancelled, so read it first. What the task had already done is not undone: a cancelled restore or reinstall can leave the server unusable until it is run again. `confirm` must equal the task id in the path. The answer only says the request was passed on; read vm.tasks.get to see the task become `failed`.","x-tier":"destructive","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"task_ref","in":"path","required":true,"schema":{"type":"string","pattern":"^task_[0-9a-f]{32}$"},"description":"Task id from vm.tasks.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","description":"Must equal the task id in the path ({task_ref})"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":"task_0123456789abcdef0123456789abcdef"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","const":true,"description":"The request was passed on; read the task again to see its new status"},"task_ref":{"type":"string","description":"The task id that was acted on"}},"required":["accepted","task_ref"],"additionalProperties":false},"example":{"accepted":true,"task_ref":"task_0123456789abcdef0123456789abcdef"}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the task id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The cancel was not accepted, for example because the task had already finished. Read the task again before retrying.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/tasks/{task_ref}/retry":{"post":{"operationId":"vm.tasks.retry","summary":"Run a failed task again.","description":"Runs a task again. Only tasks whose `retryable` is true qualify: starting, stopping or restarting the server, taking a backup and taking a snapshot. Work that erases or overwrites a disk (reinstall, restore) is never retried from history; start it again with its own operation. Because a retry can change the power state, the key needs the power scope as well as the write scope. `confirm` must equal the task id in the path. Read vm.tasks.get afterwards to follow it.","x-tier":"destructive","x-scope":"vm:write","x-required-scopes":["vm:write","vm:power"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write","vm:power"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"task_ref","in":"path","required":true,"schema":{"type":"string","pattern":"^task_[0-9a-f]{32}$"},"description":"Task id from vm.tasks.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","description":"Must equal the task id in the path ({task_ref})"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":"task_0123456789abcdef0123456789abcdef"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","const":true,"description":"The request was passed on; read the task again to see its new status"},"task_ref":{"type":"string","description":"The task id that was acted on"}},"required":["accepted","task_ref"],"additionalProperties":false},"example":{"accepted":true,"task_ref":"task_0123456789abcdef0123456789abcdef"}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the task id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"PRECONDITION (reason: retry_not_safe): This kind of task is never retried from history because it erases or overwrites data. Nothing was changed. Start the work again with its own operation, for example vm.reinstall or vm.backups.restore.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/start":{"post":{"operationId":"vm.start","summary":"Power a server on.","description":"Powers on a server that is switched off. It answers 202 as soon as the work is accepted, not when it is done. To follow it, call vm.operations.get (GET /v1/vms/{id}/operations/{op_id}) with `operation.id` every 5 seconds and read `operation.status`: `pending` and `running` mean keep polling, `succeeded` and `failed` are final. If it is still `pending` after 5 minutes, stop polling and check the result directly: vm.get shows the live `power_state`. The response also carries `green_credit`: when the server had been switched off for a while, a credit for that time is added to your account balance by this call, and `amount_minor`, `currency` and `off_seconds` say how much and for how long; it is null when no credit applies.","x-tier":"safe","x-scope":"vm:power","x-required-scopes":["vm:power"],"x-auth-mode":"bearer","security":[{"bearer":["vm:power"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false},"green_credit":{"anyOf":[{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credit added to your account balance, in minor units of `currency`"},"currency":{"type":"string","enum":["USD","EUR","GBP"],"description":"ISO 4217 currency of the amounts beside it"},"off_seconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the server was switched off, in seconds, for which this credit was given"}},"required":["amount_minor","currency","off_seconds"],"additionalProperties":false},{"type":"null"}],"description":"A credit for time the server was switched off, already added to your account balance by this start. null when no credit applies"}},"required":["operation","green_credit"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"start","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"},"green_credit":{"amount_minor":42,"currency":"USD","off_seconds":93600}}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/stop":{"post":{"operationId":"vm.stop","summary":"Power a server off.","description":"Asks the operating system to shut down cleanly, then powers the server off. The server is offline until you start it again; nothing on its disk is changed. It answers 202 as soon as the work is accepted, not when it is done. To follow it, call vm.operations.get (GET /v1/vms/{id}/operations/{op_id}) with `operation.id` every 5 seconds and read `operation.status`: `pending` and `running` mean keep polling, `succeeded` and `failed` are final. If it is still `pending` after 5 minutes, stop polling and check the result directly: vm.get shows the live `power_state`. If the operating system ignores the request and the server is still running, use vm.force_stop.","x-tier":"safe","x-scope":"vm:power","x-required-scopes":["vm:power"],"x-auth-mode":"bearer","security":[{"bearer":["vm:power"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"stop","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/restart":{"post":{"operationId":"vm.restart","summary":"Restart a server.","description":"Restarts a server; it is unreachable for a short time while it reboots. Nothing on its disk is changed. It answers 202 as soon as the work is accepted, not when it is done. To follow it, call vm.operations.get (GET /v1/vms/{id}/operations/{op_id}) with `operation.id` every 5 seconds and read `operation.status`: `pending` and `running` mean keep polling, `succeeded` and `failed` are final. If it is still `pending` after 5 minutes, stop polling and check the result directly: vm.get shows the live `power_state`.","x-tier":"safe","x-scope":"vm:power","x-required-scopes":["vm:power"],"x-auth-mode":"bearer","security":[{"bearer":["vm:power"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"restart","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/operations/{op_id}":{"get":{"operationId":"vm.operations.get","summary":"Status of an operation started on a server.","description":"Returns the current status of one operation started by a 202 response: start, stop, restart, force stop, reinstall, backup create, restore or delete, snapshot restore or delete. This is the operation to poll: read `operation.status` every 5 seconds; `pending` and `running` mean keep waiting, `succeeded` and `failed` are final (a cancelled operation reports `failed`). `progress` is a percentage when one is known. Operation ids are kept for 24 hours and only answer on the server they were started on; after that the call is 404.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"op_id","in":"path","required":true,"schema":{"type":"string","pattern":"^op_[0-9a-f]{24}$"},"description":"Operation id from a 202 response"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"The operation id you asked about"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","enum":["pending","running","succeeded","failed"],"description":"pending: accepted, not started or not yet observable. running: in progress. succeeded and failed are final; a cancelled operation reports failed"},"progress":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Percent complete, 0 to 100; null when no progress figure is available"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the status last changed, null when not known"}},"required":["id","action","status","progress","vm_id","created_at","updated_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"restart","status":"succeeded","progress":100,"vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z","updated_at":"2026-11-14T10:00:21.000Z"}}}}},"404":{"description":"NOT_FOUND: The operation id is older than 24 hours, was started on a different server, or is not yours.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/backups":{"get":{"operationId":"vm.backups.list","summary":"A server's backups.","description":"Lists the backups of a server, both the ones you started (`manual`) and the ones taken by the backup schedule (`auto`). A backup with status `created` is finished and can be restored with vm.backups.restore. Each id is what vm.backups.restore and vm.backups.delete take as {backup_id} and as `confirm`.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Backup id. Use it as {backup_id} and as `confirm` when restoring or deleting this backup"},"status":{"type":"string","enum":["pending","creating","created","failed","restoring"],"description":"created: finished and usable. pending or creating: still being taken. restoring: being restored onto the server right now"},"type":{"type":"string","enum":["manual","auto"],"description":"manual: started by you. auto: taken by the backup schedule"},"size_bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Size in bytes; 0 until the backup has finished"},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the backup was taken, null when not recorded"}},"required":["id","status","type","size_bytes","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":3051,"status":"created","type":"manual","size_bytes":5368709120,"created_at":"2026-11-13T02:10:05.000Z"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"vm.backups.create","summary":"Start a backup.","description":"Starts a full backup of the server's disk. The server keeps running. Unlike other changes it is also allowed while the server is suspended, so data can be saved before it is lost. It answers 202 as soon as the work is accepted, not when it is done. To follow it, call vm.operations.get (GET /v1/vms/{id}/operations/{op_id}) with `operation.id` every 5 seconds and read `operation.status`: `pending` and `running` mean keep polling, `succeeded` and `failed` are final. If it is still `pending` after 5 minutes, stop polling and check the result directly: the new backup appears in vm.backups.list with status `created` when it is done.","x-tier":"safe","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"backup","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"403":{"description":"ACCOUNT_RESTRICTED: Your account is restricted. Nothing was started. A suspended server alone does not cause this refusal.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/snapshots":{"get":{"operationId":"vm.snapshots.list","summary":"A server's snapshots.","description":"Lists the snapshots of a server. A snapshot is a point-in-time copy of the disk kept beside the server, quicker to take and restore than a backup; up to 7 are kept per server. A snapshot can be restored or deleted once its status is `available`. Each id is what vm.snapshots.restore and vm.snapshots.delete take as {snapshot_id} and as `confirm`.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Snapshot id. Use it as {snapshot_id} and as `confirm` when restoring or deleting this snapshot"},"name":{"type":"string"},"status":{"type":"string","description":"`available` when the snapshot is ready to restore or delete; any other value means it is still being processed"},"size_gb":{"type":"number","description":"Size in GB; 0 when not known yet"},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the snapshot was taken, null when not recorded"}},"required":["id","name","status","size_gb","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":77,"name":"before-upgrade","status":"available","size_gb":12.4,"created_at":"2026-11-14T09:30:00.000Z"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"vm.snapshots.create","summary":"Take a snapshot (up to 7 kept).","description":"Takes a snapshot of the server's disk as it is now and answers 201 with the snapshot once it exists; there is nothing to poll, but wait for `status` `available` in vm.snapshots.list before restoring it. The server keeps running. The body is optional: `name` defaults to a name built from the current time. A server keeps at most 7 snapshots and takes one at a time.","x-tier":"safe","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"1 to 40 characters: letters, numbers, spaces and . _ : / @ ( ) + -. Defaults to a name built from the current UTC time","type":"string","minLength":1,"maxLength":40}},"additionalProperties":false},"example":{"name":"before-upgrade"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Snapshot id. Use it as {snapshot_id} and as `confirm` when restoring or deleting this snapshot"},"name":{"type":"string"},"status":{"type":"string","description":"`available` when the snapshot is ready to restore or delete; any other value means it is still being processed"},"size_gb":{"type":"number","description":"Size in GB; 0 when not known yet"},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the snapshot was taken, null when not recorded"}},"required":["id","name","status","size_gb","created_at"],"additionalProperties":false}},"required":["snapshot"],"additionalProperties":false},"example":{"snapshot":{"id":77,"name":"before-upgrade","status":"available","size_gb":12.4,"created_at":"2026-11-14T09:30:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED: `name` is longer than 40 characters or uses a character other than letters, numbers, spaces and . _ : / @ ( ) + -.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"LIMIT_REACHED (reason: snapshot_limit): The server already has the most snapshots it can keep; `details.limit` is that number. Delete one with vm.snapshots.delete, then retry.\nIN_PROGRESS (reason: snapshot_in_progress): A snapshot of this server is still being created. Wait until vm.snapshots.list shows every snapshot as `available`, then retry.\nIN_PROGRESS (reason: server_busy): The server is in the middle of another operation, or is neither running nor stopped. Wait for that to finish (vm.get `power_state`), then retry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The request may or may not have taken effect. Repeating it with the same Idempotency-Key returns this same answer; check the current state first, then send a new request with a new key if it is still needed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/os-images":{"get":{"operationId":"vm.os_images.list","summary":"OS images this server can be reinstalled with.","description":"Lists the operating system images this particular server can be reinstalled with. Pass an entry's `id` as `os_image_id` to vm.reinstall; an id that is not in this list for this server is refused. Read it shortly before reinstalling, because the choice can change.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Image id. Pass it as `os_image_id` to POST /v1/vms/{id}/reinstall"},"name":{"type":"string","description":"Family and version together, e.g. Ubuntu 24.04"},"family":{"type":"string"},"version":{"type":"string"}},"required":["id","name","family","version"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":41,"name":"Ubuntu 24.04","family":"Ubuntu","version":"24.04"},{"id":37,"name":"Debian 12","family":"Debian","version":"12"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/reinstall":{"post":{"operationId":"vm.reinstall","summary":"Reinstall the OS. Wipes the disk.","description":"Erases the whole disk and installs a fresh operating system; everything on the server is lost and it is offline until the install finishes. `os_image_id` must come from vm.os_images.list for this server and `confirm` must equal the server id. The account owner is emailed. This call returns no password, and SSH keys added earlier are erased with the disk: once the install has finished, call vm.password_reset to get a login password and vm.ssh_keys.attach to put keys back. It answers 202 as soon as the work is accepted, not when it is done. To follow it, call vm.operations.get (GET /v1/vms/{id}/operations/{op_id}) with `operation.id` every 5 seconds and read `operation.status`: `pending` and `running` mean keep polling, `succeeded` and `failed` are final. If it is still `pending` after 5 minutes, stop polling and check the result directly: vm.get shows `power_state` `installing` while it runs and `running` afterwards. Take a backup or snapshot first if anything on the disk matters.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"os_image_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"An image id from GET /v1/vms/{id}/os-images for this server"},"confirm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Must equal the server id in the path ({id}), as an integer"}},"required":["os_image_id","confirm"],"additionalProperties":false},"example":{"os_image_id":41,"confirm":4821}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"reinstall","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the server id in the path (`field` is confirm). Nothing was changed.\nVALIDATION_FAILED (reason: os_image_not_offered): `os_image_id` is not an image this server can be installed with. Nothing was changed. Read vm.os_images.list for this server and use one of its ids.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/password-reset":{"post":{"operationId":"vm.password_reset","summary":"Set a new administrator (root) password and return it once.","description":"Sets a new random password for the administrator account inside the server (root on Linux) and returns it in this response. The old password stops working. The new one is shown this once and is not kept anywhere: a replay with the same Idempotency-Key answers `password: null` with a `note`, so store the password when you receive it, and run the operation again with a new key if it was lost. `confirm` must equal the server id. The account owner is emailed.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Must equal the server id in the path ({id}), as an integer"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The new administrator (root) password. Shown in this one response and stored nowhere; null only when this is a replay of an earlier request with the same Idempotency-Key"},"note":{"description":"Present only on a replay: says the reset already happened","type":"string"}},"required":["password"],"additionalProperties":false},"example":{"password":"example-Passw0rd-shown-once"}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the server id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"PRECONDITION (reason: boot_mode_is_rescue): The server is running the rescue system, so the password of its installed system cannot be set. Set the boot mode back to disk with vm.boot_mode.set, restart, then try again.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The request may or may not have taken effect. Repeating it with the same Idempotency-Key returns this same answer; check the current state first, then send a new request with a new key if it is still needed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/snapshots/{snapshot_id}/restore":{"post":{"operationId":"vm.snapshots.restore","summary":"Restore a snapshot. Overwrites the disk.","description":"Rolls the server's disk back to a snapshot: everything written since the snapshot was taken is lost, and the server restarts. The snapshot must belong to this server and be `available`. `confirm` must equal the snapshot id in the path. The account owner is emailed. It answers 202 as soon as the work is accepted, not when it is done. To follow it, call vm.operations.get (GET /v1/vms/{id}/operations/{op_id}) with `operation.id` every 5 seconds and read `operation.status`: `pending` and `running` mean keep polling, `succeeded` and `failed` are final. If it is still `pending` after 5 minutes, stop polling and check the result directly: vm.get shows the live `power_state`.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Snapshot id from the snapshots list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Must equal the snapshot id in the path ({snapshot_id}), as an integer"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":77}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"snapshot_restore","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the snapshot id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND: The snapshot is not one of this server's snapshots. Nothing was changed. Read vm.snapshots.list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"IN_PROGRESS (reason: snapshot_in_progress): A snapshot of this server is still being created. Wait until vm.snapshots.list shows every snapshot as `available`, then retry.\nIN_PROGRESS (reason: server_busy): The server is in the middle of another operation, or is neither running nor stopped. Wait for that to finish (vm.get `power_state`), then retry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/snapshots/{snapshot_id}":{"delete":{"operationId":"vm.snapshots.delete","summary":"Delete a snapshot.","description":"Deletes one snapshot for good; it cannot be recovered. The server's current disk is not touched. `confirm` is a query parameter and must equal the snapshot id in the path. The call waits until the snapshot is gone and then answers 200 with an operation object as a receipt, so there is nothing to poll. The account owner is emailed.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Snapshot id from the snapshots list"},{"name":"confirm","in":"query","required":true,"schema":{"type":"integer"},"description":"Must equal the snapshot id in the path ({snapshot_id})."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"snapshot_delete","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the snapshot id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND: The snapshot is not one of this server's snapshots, or is already deleted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"IN_PROGRESS (reason: snapshot_in_progress): A snapshot of this server is still being created. Wait until vm.snapshots.list shows every snapshot as `available`, then retry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The deletion was sent but could not be confirmed in time. Read vm.snapshots.list: if the snapshot is gone it worked; if it is still there, retry with a new Idempotency-Key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/backups/{backup_id}/restore":{"post":{"operationId":"vm.backups.restore","summary":"Restore a backup. Overwrites the disk.","description":"Overwrites the server's disk with the contents of a backup: everything written since that backup is lost, and the server is offline while it runs. The backup must belong to this server. `confirm` must equal the backup id in the path. The account owner is emailed. It answers 202 as soon as the work is accepted, not when it is done. To follow it, call vm.operations.get (GET /v1/vms/{id}/operations/{op_id}) with `operation.id` every 5 seconds and read `operation.status`: `pending` and `running` mean keep polling, `succeeded` and `failed` are final. If it is still `pending` after 5 minutes, stop polling and check the result directly: vm.get shows the live `power_state`.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"backup_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Backup id from the backups list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Must equal the backup id in the path ({backup_id}), as an integer"}},"required":["confirm"],"additionalProperties":false},"example":{"confirm":3051}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"backup_restore","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the backup id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND: The backup is not one of this server's backups. Nothing was changed. Read vm.backups.list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/backups/{backup_id}":{"delete":{"operationId":"vm.backups.delete","summary":"Delete a backup.","description":"Deletes one backup for good; it cannot be recovered. The server itself is not touched. `confirm` is a query parameter and must equal the backup id in the path. The answer is 200 with an operation object; the backup disappears from vm.backups.list once it is gone, and vm.operations.get can be polled the same way as after a 202 if you need to wait for that. The account owner is emailed.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"backup_id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Backup id from the backups list"},{"name":"confirm","in":"query","required":true,"schema":{"type":"integer"},"description":"Must equal the backup id in the path ({backup_id})."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"operation":{"type":"object","properties":{"id":{"type":"string","description":"Operation id. Pass it as {op_id} to GET /v1/vms/{id}/operations/{op_id} to follow the work. Kept for 24 hours"},"action":{"type":"string","enum":["force_stop","start","stop","restart","backup","backup_restore","backup_delete","reinstall","snapshot_restore","snapshot_delete"],"description":"What was started"},"status":{"type":"string","const":"pending","description":"Always pending here: the work has been accepted, not finished"},"vm_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Server id the operation runs on"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"When the operation was accepted"}},"required":["id","action","status","vm_id","created_at"],"additionalProperties":false}},"required":["operation"],"additionalProperties":false},"example":{"operation":{"id":"op_3f9a1c0b7d2e4f6a8b0c1d2e","action":"backup_delete","status":"pending","vm_id":4821,"created_at":"2026-11-14T10:00:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing, has the wrong type or does not equal the backup id in the path (`field` is confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended (vm.get `status` is suspended) or your account is restricted. Nothing was changed. Pay the overdue invoice, or contact support about the restriction.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND: The backup is not one of this server's backups, or is already deleted.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"423":{"description":"MAINTENANCE: We are doing maintenance on this server. Nothing was changed. Retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/ssh-keys":{"post":{"operationId":"vm.ssh_keys.attach","summary":"Add SSH keys from your library to a running server.","description":"Adds the chosen library keys to the administrator (root) account of the server, so whoever holds the matching private keys can log in over SSH. The server must be running and reachable at the address recorded for it; keys already on the server stay, and nothing is restarted. Windows servers do not take SSH keys. The account owner is told each time keys are added. `confirm` must equal the server id. Returns how many keys were added.","x-tier":"destructive","x-scope":"vm:destroy","x-required-scopes":["vm:destroy"],"x-auth-mode":"bearer","security":[{"bearer":["vm:destroy"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{16}$"},"description":"1 to 10 key ids from your SSH key library"},"confirm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Must equal the server id in the URL"}},"required":["key_ids","confirm"],"additionalProperties":false},"example":{"key_ids":["3f9a1c0b7d2e4a65"],"confirm":4821}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attached":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many keys were added to the server"}},"required":["attached"],"additionalProperties":false},"example":{"attached":1}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the server id as an integer (field: confirm). Nothing was changed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: ssh_key_not_found): One or more of the key ids are not in your library. Read the ids with ssh_keys.list. Nothing was added.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"RESOURCE_STATE_CONFLICT (reason: server_address_not_confirmed): The address recorded for the server could not be matched to the server itself, so no key was added. This needs support: open a ticket (tickets.create).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE: The keys could not be put on the server, or only some of them were. Check with vm.get that the server is running, then send the request again with a new Idempotency-Key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/ssh-keys":{"get":{"operationId":"ssh_keys.list","summary":"List the SSH public keys in your library.","description":"Returns the public keys saved on your account, each with its id, label, algorithm and fingerprint. The library only stores keys: use vm.ssh_keys.attach to put one on a server. Private keys are never held here.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Key id, used to attach or delete the key"},"name":{"type":"string","description":"Your label for the key"},"type":{"type":"string","description":"Key algorithm, e.g. ssh-ed25519"},"fingerprint":{"type":"string","description":"SHA-256 of the public key, as 64 hex characters"},"created_at":{"description":"When the key was added to the library","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","type","fingerprint","created_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":"3f9a1c0b7d2e4a65","name":"deploy laptop","type":"ssh-ed25519","fingerprint":"98aa94fb42bc3a12a603c6c1422f51cf443997bfe0d7ad2120ffab258493363e","created_at":"2026-11-14T10:00:00.000Z"}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"post":{"operationId":"ssh_keys.add","summary":"Save an SSH public key in your library.","description":"Stores one public key on your account so it can be attached to servers later with vm.ssh_keys.attach; saving it does not put it on any server. Send the public key line only, never a private key. Accepted types are ssh-ed25519, ssh-rsa of at least 2048 bits, and ecdsa-sha2-nistp256, nistp384 and nistp521. A library holds up to 25 keys and the same key cannot be saved twice. Returns the saved key with its id.","x-tier":"safe","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Your label for the key, up to 64 characters. Defaults to \"SSH key\"","type":"string","maxLength":64},"public_key":{"type":"string","minLength":20,"maxLength":8192,"description":"One OpenSSH public key line: \"<type> <base64> [comment]\". Accepted types: ssh-ed25519, ssh-rsa of at least 2048 bits, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521. Never send a private key"}},"required":["public_key"],"additionalProperties":false},"example":{"name":"deploy laptop","public_key":"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8g deploy@example.com"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ssh_key":{"type":"object","properties":{"id":{"type":"string","description":"Key id, used to attach or delete the key"},"name":{"type":"string","description":"Your label for the key"},"type":{"type":"string","description":"Key algorithm, e.g. ssh-ed25519"},"fingerprint":{"type":"string","description":"SHA-256 of the public key, as 64 hex characters"},"created_at":{"description":"When the key was added to the library","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","type","fingerprint","created_at"],"additionalProperties":false}},"required":["ssh_key"],"additionalProperties":false},"example":{"ssh_key":{"id":"3f9a1c0b7d2e4a65","name":"deploy laptop","type":"ssh-ed25519","fingerprint":"98aa94fb42bc3a12a603c6c1422f51cf443997bfe0d7ad2120ffab258493363e","created_at":"2026-11-14T10:00:00.000Z"}}}}},"400":{"description":"VALIDATION_FAILED (reason: invalid_public_key): The text is not one well-formed public key of an accepted type, or it is an RSA key shorter than 2048 bits.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"ALREADY_EXISTS (reason: ssh_key_already_in_library): This key is already in your library. Find its id with ssh_keys.list.\nLIMIT_REACHED (reason: ssh_key_limit): The library is full. Remove a key with ssh_keys.delete first.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/ssh-keys/{key_id}":{"delete":{"operationId":"ssh_keys.delete","summary":"Remove an SSH public key from your library.","description":"Deletes the key from your library so it can no longer be attached. Servers that already have the key keep it and it still grants login there: remove it on each server yourself. The key can be saved again later with ssh_keys.add. Send the key id again as `?confirm=`.","x-tier":"destructive","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{16}$"},"description":"SSH key id from the library"},{"name":"confirm","in":"query","required":true,"schema":{"type":"string"},"description":"Must equal the key id in the path ({key_id})."},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false},"example":{"ok":true}}}},"400":{"description":"VALIDATION_FAILED: `confirm` is missing or is not the key id in the path.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/ips":{"get":{"operationId":"vm.ips.list","summary":"List a server's addresses and their reverse DNS.","description":"Returns every address assigned to the server, IPv4 and IPv6, each with the state of its reverse DNS (PTR) record: none, pending review, active, rejected, or removal pending. IPv6 addresses also carry the subnet and gateway needed to configure them on the server. Use an address from this list with vm.rdns.set or vm.rdns.clear.","x-tier":"read","x-scope":"vm:read","x-required-scopes":["vm:read"],"x-auth-mode":"bearer","security":[{"bearer":["vm:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"ip":{"type":"string","description":"The address"},"version":{"anyOf":[{"type":"number","const":4},{"type":"number","const":6}],"description":"4 for IPv4, 6 for IPv6"},"subnet":{"description":"IPv6 only: the subnet this address belongs to, needed to configure the address on the server","type":"string","format":"cidrv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$"},"gateway":{"description":"IPv6 only: the gateway for that subnet","type":"string","format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"},"rdns":{"type":"object","properties":{"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PTR host name requested or in force; null when status is none"},"status":{"type":"string","enum":["none","pending","active","rejected","removal_pending"],"description":"none: no request. pending: waiting for staff review. active: the PTR record is set. rejected: declined; send a corrected request or open a support ticket. removal_pending: an active record was cleared and staff are removing it; it reads none once removed"},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the request last changed (made, reviewed or withdrawn); null when there has never been one"},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the request was made or withdrawn by you; null when there has never been one"},"review_note":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reviewer's note to you, for example why a request was rejected; null when there is none"}},"required":["hostname","status","updated_at","created_at","review_note"],"additionalProperties":false}},"required":["ip","version","rdns"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"ip":"203.0.113.10","version":4,"rdns":{"hostname":"mail.example.com","status":"active","updated_at":"2026-11-13T16:20:00.000Z","created_at":"2026-11-13T09:00:00.000Z","review_note":"PTR record set"}},{"ip":"2001:db8:10::5","version":6,"subnet":"2001:db8:10::/64","gateway":"2001:db8:10::1","rdns":{"hostname":null,"status":"none","updated_at":null,"created_at":null,"review_note":null}}]}}}},"429":{"description":"Read allowance exceeded. Wait for Retry-After before sending more requests.","headers":{"Retry-After":{"description":"Seconds until the read allowance is available again.","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}},"/v1/vms/{id}/ips/{ip}/rdns":{"put":{"operationId":"vm.rdns.set","summary":"Request a reverse DNS (PTR) record.","description":"Files a request for the address to resolve back to the host name you give. A person reviews it, so the record is not set by this call: the answer is 202 with `rdns.status` pending. To follow it, call vm.ips.list and read `rdns.status` for the address until it is `active` (the record is set) or `rejected` (see `review_note`); review can take hours, so check every few minutes at most. Point the host name's own DNS at the address first, because a request that does not match may be rejected. A new request for the same address replaces the earlier one.","x-tier":"safe","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"ip","in":"path","required":true,"schema":{"type":"string"},"description":"One of this server's own IPv4 or IPv6 addresses, from vm.ips.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hostname":{"type":"string","minLength":4,"maxLength":253,"description":"Fully qualified host name the address should resolve back to, e.g. mail.example.com: 4 to 253 characters, letters, digits and hyphens in dot-separated labels, ending in a top-level domain. Stored in lower case"}},"required":["hostname"],"additionalProperties":false},"example":{"hostname":"mail.example.com"}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ip":{"type":"object","properties":{"ip":{"type":"string","description":"The address"},"version":{"anyOf":[{"type":"number","const":4},{"type":"number","const":6}],"description":"4 for IPv4, 6 for IPv6"},"rdns":{"type":"object","properties":{"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PTR host name requested or in force; null when status is none"},"status":{"type":"string","enum":["none","pending","active","rejected","removal_pending"],"description":"none: no request. pending: waiting for staff review. active: the PTR record is set. rejected: declined; send a corrected request or open a support ticket. removal_pending: an active record was cleared and staff are removing it; it reads none once removed"},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the request last changed (made, reviewed or withdrawn); null when there has never been one"},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the request was made or withdrawn by you; null when there has never been one"},"review_note":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reviewer's note to you, for example why a request was rejected; null when there is none"}},"required":["hostname","status","updated_at","created_at","review_note"],"additionalProperties":false}},"required":["ip","version","rdns"],"additionalProperties":false}},"required":["ip"],"additionalProperties":false},"example":{"ip":{"ip":"203.0.113.10","version":4,"rdns":{"hostname":"mail.example.com","status":"pending","updated_at":"2026-11-14T10:00:00.000Z","created_at":"2026-11-14T10:00:00.000Z","review_note":null}}}}}},"400":{"description":"VALIDATION_FAILED: The host name is not a fully qualified name such as mail.example.com (field: hostname).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: ip_not_on_server): The address is not one of this server's own addresses. Read them with vm.ips.list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}},"delete":{"operationId":"vm.rdns.clear","summary":"Withdraw a reverse DNS (PTR) request for an address.","description":"Withdraws the request on file for the address. A pending or rejected request is withdrawn at once and `rdns.status` reads none; there is nothing to poll. If the record is already active, staff remove it from DNS: `rdns.status` reads removal_pending until they have, then none, so poll vm.ips.list every few minutes at most.","x-tier":"safe","x-scope":"vm:write","x-required-scopes":["vm:write"],"x-auth-mode":"bearer","security":[{"bearer":["vm:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1},"description":"Server id from vm.list"},{"name":"ip","in":"path","required":true,"schema":{"type":"string"},"description":"One of this server's own IPv4 or IPv6 addresses, from vm.ips.list"},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Same key + same request within 24 h returns the first response instead of acting twice."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ip":{"type":"object","properties":{"ip":{"type":"string","description":"The address"},"version":{"anyOf":[{"type":"number","const":4},{"type":"number","const":6}],"description":"4 for IPv4, 6 for IPv6"},"rdns":{"type":"object","properties":{"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PTR host name requested or in force; null when status is none"},"status":{"type":"string","enum":["none","pending","active","rejected","removal_pending"],"description":"none: no request. pending: waiting for staff review. active: the PTR record is set. rejected: declined; send a corrected request or open a support ticket. removal_pending: an active record was cleared and staff are removing it; it reads none once removed"},"updated_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the request last changed (made, reviewed or withdrawn); null when there has never been one"},"created_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","description":"ISO 8601 UTC timestamp, e.g. 2026-11-14T10:00:00.000Z"},{"type":"null"}],"description":"When the request was made or withdrawn by you; null when there has never been one"},"review_note":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The reviewer's note to you, for example why a request was rejected; null when there is none"}},"required":["hostname","status","updated_at","created_at","review_note"],"additionalProperties":false}},"required":["ip","version","rdns"],"additionalProperties":false}},"required":["ip"],"additionalProperties":false},"example":{"ip":{"ip":"203.0.113.10","version":4,"rdns":{"hostname":null,"status":"none","updated_at":"2026-11-14T10:05:00.000Z","created_at":"2026-11-14T10:05:00.000Z","review_note":null}}}}}},"403":{"description":"ACCOUNT_RESTRICTED: The server is suspended, or the account is restricted from making changes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"NOT_FOUND (reason: ip_not_on_server): The address is not one of this server's own addresses. Read them with vm.ips.list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"$ref":"#/components/responses/Problem"}}}}}}