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
- 93 operations across 7 groups
Endpoints
Orders
- POST
/order/sharedOrder 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.
Supply
billableIdto add the server to a subscription the caller already has instead of opening a new one, so both renew on a single invoice. The term, term discount and currency then come from that subscription andperiodis ignored. A subscription billed in advance is charged only for the part of the current period still ahead, as a prorated invoice due immediately; one billed in arrears is charged nothing at order time — the server is provisioned straight away and appears on that subscription's next invoice, prorated from the moment it actually went live.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: truealongside apricingbreakdown instead of the created resource IDs. - POST
/order/dedicatedOrder 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: truealongside apricingbreakdown instead of the created resource IDs.
Game Servers
- GET
/game/{idOrSlug}/configurationNo auth requiredGet a game's shared-server configuration options
Everything
POST /order/sharedwill accept for one game: the compute, memory and storage tiers with this game's prices, the orderable game versions, the locations, the term discounts and the dedicated-IP price. The shared-server counterpart to/dedicated/typesand/dedicated/locations.It is built from the same data as the public order page and priced the same way, so a configuration assembled from this response costs what the order page would charge for it.
idOrSlugtakes either the numeric game id or the slug from the game's public URL (/games/<slug>), so no id lookup is needed to call it.All prices are in USD cents per month. Within
compute,memoryandstorageit isamount— notid— that the order endpoint expects for that category.defaultsrestates the tier amounts and version id the order page opens on, so it can be submitted as-is.Cached for 10 minutes, and cleared immediately when the game is edited.
- GET
/sharedList 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, the associated billing service (with its parent billable nested, if any), and the server's Pterodactyl UUID.
- POST
/shared/{id}/configurationChange 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: truealongside the computedproration,delta, andtaxAmount.
Server Control
- GET
/server/{id}Get a game server's panel detail
Returns the panel's view of one game server — limits, feature limits, SFTP details, current lifecycle flags and the egg features that drive the console prompts.
Every
/server/{id}/*route is a proxy onto the Pterodactyl client API using a shared, admin-equivalent panel key, so access is gated first: the caller must have a linked panel account and be the panel-side owner of this server. Ownership is checked against the panel, not against our billing records, so managed-dedicated servers and anything else hosted for the customer work the same way. Anything that fails the check returns 404 rather than 403.Responses are field-filtered on the way out. The shared key sees more than a customer should, so each route carries an explicit allowlist and drops everything else.
- DELETE
/server/{id}Delete a game server
Deletes the server from the panel and releases the allocations it held.
Deliberately narrow: this is allowed only for servers running on a node that backs a managed dedicated machine the caller owns — their own hardware, their own capacity. Shared hosting and anything else we bill for is refused with 403, because tearing those down belongs to cancellation rather than a button, and a server still attached to an uncancelled service is refused with 409.
- GET
/server/{id}/resourcesGet current resource utilisation
A single utilisation sample and the server's current power state. The same figures stream continuously over the console websocket, so this is for the first paint before that socket connects.
- GET
/server/{id}/websocketMint a console websocket token
Returns a short-lived Wings token and the socket URL to open with it. The token carries the caller's permissions for this server and expires on its own, so a client is expected to call this again when Wings sends a
token expiringevent or the socket closes with an auth error.Only the token and socket URL are returned; the rest of the panel's response is dropped.
- POST
/server/{id}/commandSend a console command
Writes one line to the running server's console. The server must be running — Wings rejects the command otherwise. Output is not returned here; it arrives on the console websocket.
- POST
/server/{id}/powerSend a power signal
Starts, stops, restarts or kills the server.
killterminates the container immediately and can corrupt a save in progress, so treat it as a last resort afterstophas been given time to finish.The signal is accepted asynchronously — the resulting state change arrives on the console websocket, not in this response.
- GET
/server/{id}/activityList server activity
The server's audit trail as the panel records it — power signals, file writes, subuser changes and so on, newest first. The originating IP address the panel stores against each entry is not forwarded.
- GET
/server/{id}/files/listList a directory
Lists one directory in the server's data volume. Paths are relative to the server root —
/is the root itself. Directories are returned withis_file: false; there is no recursion. - GET
/server/{id}/files/contentsRead a file
Returns the file's raw bytes as
text/plain, not JSON — this is the editor's read path. Large files and binaries are better fetched through the signed download URL instead. - POST
/server/{id}/files/writeWrite a file
Overwrites the file at
filewith the raw request body, creating it if it does not exist. The body is sent astext/plain, not JSON, and the target path is a query parameter rather than part of the body. - GET
/server/{id}/files/downloadGet a signed download URL for a file
Mints a short-lived URL pointing straight at the node, which the client then fetches directly. The file itself never passes through this API.
- GET
/server/{id}/files/uploadGet a signed upload URL
Mints a short-lived URL the client POSTs a multipart form to, uploading straight to the node. Append
?directory=<path>to the returned URL to choose the destination directory. Uploads do not pass through this API. - PUT
/server/{id}/files/renameRename or move files
Renames each
fromto itsto, both relative toroot. Moving a file elsewhere is the same operation with atothat walks out ofroot. - POST
/server/{id}/files/copyDuplicate a file
Copies the file at
locationalongside itself, with the panel choosing the copy's name. There is no destination parameter — rename afterwards to place it elsewhere. - POST
/server/{id}/files/create-folderCreate a folder
Creates
nameinsideroot. Intermediate directories are created as needed. - POST
/server/{id}/files/deleteDelete files
Deletes each entry in
filesfromroot. Directories are removed recursively, and deletion is not recoverable — there is no trash. - POST
/server/{id}/files/compressCompress files into an archive
Packs the named entries in
rootinto a.tar.gzwritten to the same directory, and returns the created archive's file object so a client can point the user at it. Large archives take a while; the panel returns once the archive exists. - POST
/server/{id}/files/decompressExtract an archive
Extracts
filein place insideroot, overwriting anything already there with the same name. - POST
/server/{id}/files/chmodChange file permissions
Sets the mode of each entry in
files, relative toroot. Modes are octal strings such as644or0755. - POST
/server/{id}/files/pullDownload a remote file onto the server
Has the node fetch
urlintodirectoryitself, so the file never passes through the browser. By default the transfer runs in the background and this returns as soon as the node has accepted it; setforegroundto make the node hold the request until the download finishes. - GET
/server/{id}/databasesList the server's databases
Lists the MySQL databases attached to the server. Passwords are never included here — they are returned only by the create and rotate endpoints, at the moment they are minted.
- POST
/server/{id}/databasesCreate a database
Creates a database and a user for it, and returns the generated password — the only time it is shown in full. The panel prefixes the supplied name, so the created database's
namewill not matchdatabaseverbatim.Refused by the panel once the server is at its
feature_limits.databasescap, which is0on plans without databases. - DELETE
/server/{id}/databases/{databaseId}Delete a database
Drops the database and its user. The data is not recoverable.
- POST
/server/{id}/databases/{databaseId}/rotate-passwordRotate a database password
Generates a new password for the database user and returns it. The old password stops working immediately, so anything connecting with it — the game server's own config included — has to be updated.
- GET
/server/{id}/network/allocationsList the server's allocations
The IP/port pairs assigned to the server. Exactly one is the primary (
is_default), which is the address players connect to. - POST
/server/{id}/network/allocationsAssign an additional allocation
Takes the next free port on the node and assigns it to the server. There is no way to request a specific port. Refused by the panel once the server is at its
feature_limits.allocationscap. - GET
/server/{id}/network/allocations/rulesList 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_portmatches 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
[]. - POST
/server/{id}/network/allocations/{allocationId}Set an allocation's note
Replaces the free-text note shown against the allocation. Send an empty string to clear it.
- DELETE
/server/{id}/network/allocations/{allocationId}Release an allocation
Returns the port to the node's free pool. The primary allocation cannot be released — make another one primary first.
- POST
/server/{id}/network/allocations/{allocationId}/primaryMake an allocation primary
Promotes the allocation to the server's primary address. The change takes effect on the next start, since the running process is already bound to the old one.
- GET
/server/{id}/backupsList backups
Backups are returned newest first. One with a null
completed_atis still being taken; the console websocket announces the completion. - POST
/server/{id}/backupsCreate a backup
Starts a backup and returns it immediately, before it has finished —
completed_atis null until the node reports it done.Two limits apply and both come from the panel. The server's
feature_limits.backupscaps how many may exist at once (0disables backups entirely), and the panel throttles how often they may be taken. A throttled request comes back as a 429 carrying the panel's own reason, which is safe to show the user verbatim. - GET
/server/{id}/backups/{uuid}Get one backup
Returns a single backup, chiefly to poll whether it has finished.
- DELETE
/server/{id}/backups/{uuid}Delete a backup
Permanently removes the backup. A locked backup must be unlocked first.
- GET
/server/{id}/backups/{uuid}/downloadGet a signed backup download URL
Mints a short-lived URL pointing at the node holding the archive. The archive is not proxied through this API.
- POST
/server/{id}/backups/{uuid}/lockToggle a backup's lock
Flips
is_locked— this is a toggle, not a set, so the response is the authority on which way it went. A locked backup is exempt from rotation and cannot be deleted. - POST
/server/{id}/backups/{uuid}/restoreRestore a backup
Restores the archive over the server's files. The server is stopped for the duration and the console websocket refuses connections until the node reports the restore finished, so a client should expect the socket to drop and reconnect afterwards.
truncatedecides what happens to files that exist now: true wipes the volume first, so the result is exactly the backup; false unpacks over the top, leaving anything the backup does not contain in place.Like backup creation, this is throttled by the panel and a throttled request comes back as a 429 carrying the panel's reason.
- GET
/server/{id}/schedulesList schedules
The server's cron schedules. Tasks are not included here — fetch a single schedule for those.
- POST
/server/{id}/schedulesCreate a schedule
Creates an empty schedule — a schedule with no tasks does nothing, so follow this with at least one task. The five cron fields are supplied separately and take standard cron syntax including
*, ranges and steps; they come back joined undercron. - GET
/server/{id}/schedules/{scheduleId}Get a schedule and its tasks
Returns the schedule together with its tasks in
sequence_idorder. This is the only route that returns tasks. - POST
/server/{id}/schedules/{scheduleId}Update a schedule
Updates the schedule. POST, not PATCH, because that is what the panel exposes. Fields may be sent individually, but note that the panel rebuilds the cron expression from whatever it is given — send all five cron fields together when changing the timing.
- DELETE
/server/{id}/schedules/{scheduleId}Delete a schedule
Deletes the schedule and every task on it.
- POST
/server/{id}/schedules/{scheduleId}/executeRun a schedule now
Queues the schedule's tasks immediately, without waiting for its cron time and without altering the next scheduled run. Works even when the schedule is inactive.
- POST
/server/{id}/schedules/{scheduleId}/tasksAdd a task to a schedule
Appends a step to the schedule.
payloadis interpreted byaction: the console command forcommand, the power signal (start,stop,restart,kill) forpower, and the ignored-files list forbackup.time_offsetis how long to wait after the preceding task before this one runs, which is why the first task in a schedule normally uses0. - POST
/server/{id}/schedules/{scheduleId}/tasks/{taskId}Update a schedule task
Updates any subset of the task's fields. POST, not PATCH, matching the panel.
- DELETE
/server/{id}/schedules/{scheduleId}/tasks/{taskId}Delete a schedule task
Removes one step from the schedule. The remaining tasks keep their order.
- GET
/server/{id}/startupList startup variables
The egg's configurable variables with their current values, plus the rendered and raw startup commands and the Docker images the egg offers.
meta.docker_imageis the image the server is actually running, which the panel's startup endpoint does not report — it is read from the server detail and merged in here so a client can mark the current choice inmeta.docker_images. - PUT
/server/{id}/startup/variableSet a startup variable
Sets one variable's value.
keyis the variable'senv_variable, not its display name. The new value takes effect on the next start, and the panel refuses variables the egg marksis_editable: false. - POST
/server/{id}/settings/renameRename the server
Changes the server's display name in the panel. Nothing about the running server changes.
- POST
/server/{id}/settings/reinstallReinstall the server
Re-runs the egg's install script against the existing volume. The server is stopped for the duration and
is_installingstays true until it finishes; the console websocket reports progress.The install script may overwrite files it owns, so this is destructive for some eggs. Take a backup first.
- PUT
/server/{id}/settings/docker-imageSet the server's Docker image
Switches the server to one of the images its egg offers — the keys of
meta.docker_imagesfrom the startup endpoint. Commonly this is how a Java version is changed. The new image is used from the next start.
Dedicated
- GET
/dedicated/template-groupsNo auth requiredList 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/typesNo auth requiredList available dedicated server types
Always returns each type's configurable options alongside the type metadata. Response is cached for 1h.
- GET
/dedicated/locationsNo auth requiredList available locations
- GET
/dedicated/benchmarksNo auth requiredList 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
availableare included. - GET
/dedicated/inventoryNo auth requiredList dedicated server inventory
- GET
/dedicatedList 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}/powerGet 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/onPower on a dedicated server
Requests a power-on for a dedicated server owned by the authenticated user via TenantOS.
- POST
/dedicated/{id}/power/offPower off a dedicated server
Requests a power-off for a dedicated server owned by the authenticated user via TenantOS.
- POST
/dedicated/{id}/reinstallReinstall 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/profilesList 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/attacksGet 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
addressesis omitted, results span every IP the user owns — those bound to their machines plus any attached directly to their account. Whenaddressesis supplied, results are restricted to those IPs; if any requested address is not assigned to the user, the request is rejected with 400.History on a machine-bound IP starts when that machine was assigned to the account: attacks absorbed by the address under a previous tenant are not returned. IPs attached directly to the user account carry no such cutoff and return their full history.
- GET
/firewall/metricsGet firewall traffic metrics for several IPs at once
Returns the same time-bucketed filter metrics as
/firewall/{ip}/metrics, for many addresses in a single request, keyed by address.Intended for a live fleet view. Polling the per-address route for every address costs one request and one rate-limit token each per refresh, for data that is a single windowed scan of the same table; this route is one of each however many addresses are involved.
Every requested address must belong to the authenticated user. A single address that does not is rejected with 400 rather than being omitted, so a typo surfaces as an error instead of as an address that looks quiet.
An address the caller owns but which saw no traffic in the window is present in the response with an empty array, so "quiet" is distinguishable from "not reported".
Rate limited on the same buckets as the per-address route.
- GET
/firewall/{ip}/metricsGet 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 10/s) and globally; when exhausted it responds with 429 and a
Retry-Afterheader (seconds).To follow several addresses at once, prefer
GET /firewall/metrics, which returns them all in one request and one token. - 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}/portsDelete specific cache ports
- DELETE
/firewall/cache/{cacheType}/{ip}/allDelete all cache ports for a cache type and IP
- DELETE
/firewall/cache/{ip}Delete all cache data for an IP
Billing
- GET
/billing/invoicesList 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/payPay one or more invoices
Pays one or more invoices in a single request. Pass a single ID in
invoiceIdsto 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, orOVERDUE).Account credits are applied first; any invoice fully covered by credits is settled without a charge. If a balance remains,
gatewayandmethodIdare 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}/cancelCancel a subscription
Cancels a billable subscription. If
immediateis 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-cancelUndo 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. - POST
/billing/billables/{id}/services/{serviceId}/cancelCancel a single service on a subscription
Cancels one service on a multi-service subscription, leaving the subscription and its remaining services active. If
immediateis true the service is dropped from billing at once, its resource is torn down and the subscription's recurring price is recomputed; no refund is issued for the removed service. Otherwise the service is flagged to end at the subscription's currentperiodEndand keeps running until then.Only available on self-billed subscriptions (gateway
INTERNAL,STRIPEorPAYPAL) that have more than one active service.IPV4services are released by support rather than through this endpoint. - POST
/billing/billables/{id}/services/{serviceId}/undo-cancelUndo a scheduled service cancellation
Clears a service's pending end-of-period cancellation, keeping it on the subscription. Only works while the service has a
cancelRequestedAtset, has not already been cancelled, and the subscription's current billing period has not yet ended. A service cancelled immediately cannot be restored this way. - 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/methodsList 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
cachedflag 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/methodsList 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.
Support
- POST
/tickets/uploadUpload a ticket attachment
Uploads one file to attach to a ticket or reply. Send one file per request as
multipart/form-dataunder thefilefield; each file may be at most 95 MB. The returnedattachmentobject is what you pass in theattachmentsarray ofPOST /ticketsorPOST /tickets/{ticketId}/reply. Keep the combined size of all attachments on a single ticket or reply under 250 MB. - POST
/ticketsOpen a support ticket
Opens a new support ticket with
messageas its first reply. To include files, upload each one withPOST /tickets/uploadfirst and pass the returned objects inattachments. Limited to a burst of 10 tickets, refilling at one ticket every 30 seconds. - POST
/tickets/{ticketId}/replyReply to a support ticket
Adds a reply to one of your tickets. Replying sets the ticket's status back to
OPEN, including a ticket that was resolved or closed. Files are attached the same way as when opening a ticket. Limited to a burst of 30 replies across all your tickets (refilling at one every 10 seconds) and 15 replies on any single ticket (refilling at one every 20 seconds). - GET
/tickets/attachments/{attachmentId}Get a download link for a ticket attachment
Returns a signed URL for downloading an attachment on one of your tickets. The URL expires after one hour.
Interactive explorer
Full request and response schemas, with a console for firing authenticated calls. Requires JavaScript.