Skip to content

GameServerKings API Reference

API for ordering and managing game servers and dedicated servers.

Base URL
https://api.gameserverkings.com
Authentication
Bearer token — send Authorization: Bearer <api key>. API keys are issued in the client area.
Specification
OpenAPI 1.0.0 — /openapi.yaml
Endpoints
35 operations across 5 groups

Endpoints

Orders

  • POST /order/shared

    Order a shared game server

    Provisions a shared game server for the configured game, resources, and billing period, charging the selected payment method. Account credits are applied automatically and a fully credit-covered order is settled without a charge.

    Authenticating with a TEST-mode API key runs the full validation and pricing path but does not create any order records, charge payment, or provision; the response includes test: true alongside a pricing breakdown instead of the created resource IDs.

  • POST /order/dedicated

    Order a dedicated server

    Provisions a dedicated server for the configured type, disks, uplink, and billing period, charging the selected payment method. Account credits are applied automatically.

    Authenticating with a TEST-mode API key runs the full validation and pricing path but does not enqueue provisioning, charge payment, or persist anything; the response includes test: true alongside a pricing breakdown instead of the created resource IDs.

Game Servers

  • GET /shared

    List your game servers

    Returns all of the authenticated user's game servers (excluding deleted ones), each including its game and location, ordered by most recently created.

  • GET /shared/{id}

    Get a game server by ID

    Returns details for a specific game server owned by the authenticated user, including its game, location, active plan(s), variant, and the associated billing service (with its parent billable nested, if any).

  • POST /shared/{id}/configuration

    Change a shared server's plan

    Changes the compute/memory/storage tiers (and optional dedicated IP) of an existing shared game server, re-pricing the billable and charging the prorated difference for upgrades. Downgrades and same-price changes are applied without a charge. A configuration change cannot be started while another is pending, and is unavailable for subscription-style billables (FastSpring, internal, or Stripe/PayPal subscriptions).

    Authenticating with a TEST-mode API key runs the full validation and proration/pricing path but does not swap plans, create an invoice, charge, or re-provision; the response includes test: true alongside the computed proration, delta, and taxAmount.

  • GET /server/{id}/network/allocations/rules

    List Cosmic firewall rules per allocation

    Returns the Cosmic firewall rules that apply to each of the game server's allocations, keyed by the allocation id returned from /server/{id}/network/allocations.

    Rules are resolved per unique allocation IP and then filtered to those whose dst_port matches that allocation's own port, so on a shared protected IP the response only ever contains rules for the IP/port pairs this server actually holds — never another customer's.

    If rules for one IP cannot be fetched, that IP degrades to an empty rule list rather than failing the whole response, so an allocation may legitimately map to [].

Dedicated

  • GET /dedicated/template-groups No auth required

    List OS template groups and their templates

    Returns all template groups, each with its nested OS templates (id, profile id, and version). Response is cached for 1h.

  • GET /dedicated/types No auth required

    List available dedicated server types

    Always returns each type's configurable options alongside the type metadata. Response is cached for 1h.

  • GET /dedicated/locations No auth required

    List available locations

  • GET /dedicated/benchmarks No auth required

    List benchmark scores for available dedicated types

    Returns benchmark categories, the dedicated types that have at least one score recorded, and the per (type, category) scores joining them. Only types currently marked available are included.

  • GET /dedicated/inventory No auth required

    List dedicated server inventory

  • GET /dedicated

    List your dedicated servers

    Returns all active dedicated servers owned by the authenticated user, each including its type and location, ordered by most recently assigned.

  • GET /dedicated/{id}

    Get a dedicated server by ID

    Returns details for a specific dedicated server owned by the authenticated user, including type, location, options, and the associated billing service (if any).

  • GET /dedicated/{id}/power

    Get a dedicated server's power status

    Returns the current power state of a dedicated server owned by the authenticated user, sourced from TenantOS.

  • POST /dedicated/{id}/power/on

    Power on a dedicated server

    Requests a power-on for a dedicated server owned by the authenticated user via TenantOS.

  • POST /dedicated/{id}/power/off

    Power off a dedicated server

    Requests a power-off for a dedicated server owned by the authenticated user via TenantOS.

  • POST /dedicated/{id}/reinstall

    Reinstall a dedicated server

    Starts a reinstallation of a dedicated server owned by the authenticated user using the given OS template profile id. The profile id must map to a configured template; arbitrary TenantOS profiles are rejected.

Firewall

  • GET /firewall/profiles

    List firewall profiles

  • GET /firewall/{ip}

    Get firewall rules for an IP

  • POST /firewall/{ip}

    Update firewall rules for an IP

    Replaces the firewall rules for the IP with the supplied set. An empty array clears all rules for the IP. The response returns the canonical rules after the update.

  • GET /firewall/attacks

    Get DDoS attack history across the account

    Returns the paginated history of mitigated DDoS attack events recorded against the authenticated user's IPs, newest first.

    When addresses is omitted, results span every IP the user owns — those bound to their machines plus any attached directly to their account. When addresses is supplied, results are restricted to those IPs; if any requested address is not assigned to the user, the request is rejected with 400.

  • GET /firewall/{ip}/metrics

    Get firewall traffic metrics for an IP

    Returns time-bucketed firewall/filter traffic metrics for one of the authenticated user's IPs, powering the live throughput and packet-rate charts in the client area. Data is aggregated per bucket and summed across mitigation nodes, ordered oldest to newest.

    This endpoint is rate limited per user (a token bucket of 20 requests refilling at ~1 every 5s) and globally; when exhausted it responds with 429 and a Retry-After header (seconds).

  • GET /firewall/cache/{cacheType}/{ip}

    Get cache ports for a cache type and IP

  • POST /firewall/cache/{cacheType}/{ip}

    Add cache ports for a cache type and IP

  • DELETE /firewall/cache/{cacheType}/{ip}/ports

    Delete specific cache ports

  • DELETE /firewall/cache/{cacheType}/{ip}/all

    Delete all cache ports for a cache type and IP

  • DELETE /firewall/cache/{ip}

    Delete all cache data for an IP

Billing

  • GET /billing/invoices

    List invoices

    Returns the authenticated user's invoices, newest first, with pagination. Each entry includes billing status, totals, and the parent billable ID.

  • POST /billing/invoices/pay

    Pay one or more invoices

    Pays one or more invoices in a single request. Pass a single ID in invoiceIds to pay one invoice, or multiple IDs to bulk-pay. All invoices must belong to the authenticated user and be in a payable status (FINALIZED, PARTIALLY_PAID, UNPAID, or OVERDUE).

    Account credits are applied first; any invoice fully covered by credits is settled without a charge. If a balance remains, gateway and methodId are required, and the remaining invoices are charged — one payment is created per currency group across the paid invoices.

  • GET /billing/billables/{id}

    Get a billable (subscription) by ID

    Returns a single subscription owned by the authenticated user, with its services and invoices (newest first) nested. Payment-method and analytics identifiers are omitted. For lightweight order-confirmation polling, use /billing/order-status/{billableId} instead.

  • POST /billing/billables/{id}/cancel

    Cancel a subscription

    Cancels a billable subscription. If immediate is true or the billing period has already ended, the subscription is cancelled immediately and associated resources are terminated. Otherwise, the cancellation is scheduled for the end of the current billing period.

  • POST /billing/billables/{id}/undo-cancel

    Undo a scheduled cancellation

    Reverses a cancellation that was scheduled for the end of the current billing period, keeping the subscription active. Only works while the subscription is still ACTIVE, has a pending cancellation, and the current billing period has not yet ended.

  • GET /billing/order-status/{billableId}

    Get order status

    Returns the current status of a billable order, its most recent invoice, and the provisioning status of each resource it covers. Intended for polling an order confirmation page until payment settles and the resources finish provisioning. Only the authenticated user's own billables are accessible.

  • GET /stripe/methods

    List saved Stripe payment methods

    Returns the authenticated user's saved Stripe payment methods (card, US bank account/ACH, and SEPA debit) along with their default method. Results are cached per Stripe customer for 10 minutes; the cached flag indicates whether this response was served from cache. Items are raw Stripe PaymentMethod objects, so additional Stripe-provided fields may be present beyond those documented here.

  • GET /paypal/methods

    List saved PayPal payment methods

    Returns the authenticated user's vaulted PayPal payment methods along with their default method. The default is only populated when PayPal is the user's default billing gateway; otherwise it is null.

Interactive explorer

Full request and response schemas, with a console for firing authenticated calls. Requires JavaScript.