Skip to content
Documentation

Gateway API

The gateway API is the Managed Gateway as a machine interface. It is for developers who build their own panel plugin or connect their own hosting system: you mint a link per machine, point addresses at the servers behind it, and read back who is playing. Everything the Protected Addresses screen in the panel does for one account, a script can do here.

It lives under /api/external/gateway on https://panel.dylaris.com. Every example on this page uses that address.

The open-source panel plugins for Pterodactyl and Pelican are built on exactly this API. Their ProviderClient is a complete reference client.

What you need

  • A Managed Gateway plan on your account, with your store account joined to your panel account (see Connecting your account). A Route-only plan reaches the same link and address endpoints; the beam endpoints need Managed Gateway.

  • An API key created under Account > API keys, carrying:

    • gateway.read for every GET below except the Floodgate key,
    • gateway.write for every change, and for the Floodgate key.

    gateway.write does not include gateway.read: a plugin that reads and writes needs both. Give the key only gateway permissions (plus usage.read if you want it); a key that mixes in server permissions follows the general rules for user keys in the API reference.

  • A rate limit on the key that fits. The key's own limit (1 to 600 requests a minute, default 60) applies on top of the gateway limits below, so a plugin that polls should get more than the default.

Authentication

Send the key on every request:

shell
Authorization: Bearer dyl_<your key>

Bodies are JSON, so writes also send Content-Type: application/json. A first request:

shell
curl https://panel.dylaris.com/api/external/gateway/account \
  -H "Authorization: Bearer dyl_<your key>"

The key acts as you, and never with operator powers: even an admin's key gets the ownership proof, the address caps and the reserved names like any customer.

Answers and errors

Every answer is JSON with success. Lists carry their entries in items.

An error looks like this:

json
{"success": false, "error": "Link limit reached (2)", "code": "link_limit"}

Branch on the HTTP status and code; error is a sentence for a human and can change. The table of codes is under Error codes.

One exception: the key check in front of every route (missing, unknown, revoked or expired key, a missing permission) answers with message and no code:

json
{"success": false, "message": "Key lacks required permission"}

Read error, and fall back to message, for the text.

A 5xx answer never carries an internal detail; its code is internal, except gateway_disabled and dns_lookup_failed (both 503, retry later). A 5xx can follow a change that was already saved. Every write below except minting a link is safe to repeat, and a DELETE that answers 404 has nothing left to delete.

Rate limits

Each key has three budgets, counted across all of our servers in fixed windows:

ClassBudgetUsed by
read120 a minuteevery GET except the Floodgate key
write30 a minuteroute, domain and link changes, the Floodgate key
mint10 an hourminting and rolling a link, registering and revoking a beam key

Over a budget the answer is 429 with code rate_limited and a Retry-After header in seconds. Wait that long. The key's own per-minute limit answers the same code with Retry-After: 60.

Also limited:

  • Failed key checks: 120 a minute per source address, then 429 with Retry-After: 60.
  • Checking one own domain's TXT record: once every 5 minutes per domain (429 verify_cooldown, no Retry-After header).
  • If rate limiting itself is unavailable, writes and mints answer 503 unavailable rather than run unmetered. Reads still pass.

Endpoints

Method and pathPermissionClass
GET /accountgateway.readread
GET /regionsgateway.readread
GET /check-domain?domain=<fqdn>gateway.readread
GET /link-kitsgateway.readread
POST /link-kitsgateway.writemint
DELETE /link-kits/{linkId}gateway.writewrite
POST /link-kits/{linkId}/rollgateway.writemint
POST /link-kits/{linkId}/retiregateway.writewrite
GET /routesgateway.readread
POST /routesgateway.writewrite
DELETE /routes/{domain}gateway.writewrite
PATCH /routes/{domain}/proxy-protocolgateway.writewrite
PUT /routes/{domain}/voicegateway.writewrite
PUT /routes/{domain}/bedrockgateway.writewrite
GET /routes/{domain}/floodgate-keygateway.writewrite
GET /custom-domainsgateway.readread
POST /custom-domainsgateway.writewrite
DELETE /custom-domains/{domain}gateway.writewrite
POST /custom-domains/{domain}/txt-tokengateway.writewrite
POST /custom-domains/{domain}/verify-txtgateway.writewrite
GET /playersgateway.readread
GET /usage?period=YYYY-MMgateway.readread
GET /beam/keysgateway.readread
POST /beam/keysgateway.writemint
DELETE /beam/keys/{kid}gateway.writemint
GET /beam/relays?region=<region>gateway.readread

All paths are relative to https://panel.dylaris.com/api/external/gateway. The domains, ids and numbers in the examples are illustrative; your answers carry your own.

Limits on numbers

maxLinks, maxRoutes and maxCustomDomains follow one rule:

ValueMeaning
nullno limit
0none allowed
nat most n

maxRoutes counts addresses on our domains only. An address on your own domain counts against maxCustomDomains instead.

Account

GET /account says who the key belongs to and what the account may hold. It stays reachable while the account is suspended, so a client can say why everything else is refused.

json
{
  "success": true,
  "account": {
    "userId": "6f1c2a4e-8d3b-4c55-9e21-0a7b3c9d1e42",
    "product": "managed",
    "managed": true,
    "entitlementSource": "plan",
    "suspended": false,
    "scopes": ["gateway.read", "gateway.write"],
    "limits": {"maxLinks": 3, "maxRoutes": 50, "maxCustomDomains": null}
  }
}
FieldMeaning
productmanaged, route_only or none
managedtrue for a Managed Gateway plan
entitlementSourcewhere the plan comes from: plan, grant, plan+grant, unlimited, suspended or none
suspendedthe account is suspended or over its limits; writes are refused
scopesthe permissions this key carries
limitsmaxLinks (links, which is hosts), maxRoutes, maxCustomDomains

Regions

GET /regions lists where addresses can live and which domains you can take names under.

json
{
  "success": true,
  "hosterDomains": [{"domain": "play.example.net", "validation": "alphanumeric"}],
  "customDomainsEnabled": true,
  "cnameTarget": "edge",
  "items": [{"region": "eu", "wildcard": "*.eu.play.example.net", "online": true}]
}
FieldMeaning
hosterDomainsour domains you can take a name under; validation is the naming rule: letters, alphanumeric or dns
customDomainsEnabledwhether addresses on your own domains are possible
cnameTargetthe label an own domain's CNAME points at under a hoster domain; empty when unset
items[].regionthe region id you pass when minting a link
items[].wildcardthe region's wildcard name
items[].onlineat least one edge of the region is up

Check a name

GET /check-domain?domain=survival.play.example.net says whether you could create an address on that name now. It changes nothing.

json
{"success": true, "domain": "survival.play.example.net", "available": true, "reason": ""}

reason, when not available: taken (someone else holds it; nothing more is said), blocked (reserved, suspended, or an own domain blocked after failed checks), invalid, not_hosted (not one of our domains and own domains are off) or unverified (an own domain you have not proven yet). A name you already hold is available.

A link is the one container that runs next to your servers, one per machine. It dials out to our edges, so the machine needs no open port. A link counts as one host toward maxLinks.

List

GET /link-kits

json
{
  "success": true,
  "items": [
    {
      "id": 9,
      "name": "node-fra-01",
      "link_id": "link-3f9a1c0e5b7d4e2a8c6b0d1e2f3a4b5c",
      "created_at": "2026-11-15T17:59:19Z",
      "region": "eu",
      "online": true,
      "caps": ["client-addr", "voice"]
    }
  ],
  "used": 1,
  "retiring": 0,
  "limit": 3
}
FieldMeaning
link_idthe id every other call uses
nameyour label
regionthe region it was minted for; empty means the default
onlinethe link is connected right now. Absent when we could not ask: show that as unknown, not as offline
capswhat the running link announced: client-addr (it can pass the real player IP), voice (it can carry voice chat). Empty while offline
retire_atpresent only on a retiring link: when it is removed
used, retiring, limitlive links counted against maxLinks, links on their way out, and the limit

Mint

POST /link-kits with an optional name and region:

shell
curl -X POST https://panel.dylaris.com/api/external/gateway/link-kits \
  -H "Authorization: Bearer dyl_<your key>" \
  -H "Content-Type: application/json" \
  -d '{"name":"node-fra-01","region":"eu"}'
json
{
  "success": true,
  "link_key": "<shown once>",
  "link_id": "link-3f9a1c0e5b7d4e2a8c6b0d1e2f3a4b5c",
  "note": "Shown once. Paste it as LINK_KEY into the route-only .env."
}

link_key is shown exactly once and is the link's credential: store it like a password and never log it. region must be a region with an edge online (400 unknown_region); leave it out for the default. At the limit the answer is 403 link_limit. Minting is not idempotent: two calls make two links.

Run the link with that key on the machine:

yaml
services:
  link:
    image: ghcr.io/dylaris-dev/gateway-link:latest
    network_mode: host
    restart: unless-stopped
    stop_grace_period: 6h10m
    environment:
      LINK_KEY: "<link_key>"
      CORE_URL: "https://panel.dylaris.com"
      LINK_DRAIN_TIMEOUT: "6h"
      LINK_ALLOWED_TARGETS: "<the host your servers listen on>"
      LINK_PORT: "127.0.0.1:25540"

The link only forwards to hosts in LINK_ALLOWED_TARGETS. The plugins' snippet and Route only cover the details.

Revoke

DELETE /link-kits/{linkId} removes the link at once, together with every address on it. Its tunnels close within 30 seconds. Answers {"success": true}; an unknown link is 404 link_not_found.

Roll the key

POST /link-kits/{linkId}/roll issues a new link_key for the same link. The old key keeps working for one hour: put the new one into LINK_KEY and redeploy the link within that hour. A leaked key wants revoke instead.

json
{"success": true, "link_key": "<shown once>", "link_id": "link-3f9a...", "note": "..."}

A retiring link cannot be rolled (409 kit_retiring).

Retire, to replace a machine

POST /link-kits/{linkId}/retire moves a machine without running into the host limit. It cannot be undone.

json
{"success": true, "link_id": "link-3f9a...", "retire_at": "2026-11-17T22:00:00Z"}

From that moment the link no longer counts toward maxLinks, so you can mint the new machine's link. The old one keeps carrying its players but takes no new address, voice or Bedrock; you may still delete its addresses or move them to another link. At retire_at, 8 hours later, it is revoked with whatever addresses are still on it.

Refusals, all 409: kit_already_retiring (with its retire_at), retire_not_needed (no host limit: just mint the new link), retire_limit (as many links retiring as the plan has hosts) and retire_budget (4 retirements per host per calendar month, UTC).

Routes

A route is one address players connect to on :25565, sent down one of your links to one server.

The route object

GET /routes lists yours, including suspended ones.

json
{
  "success": true,
  "items": [
    {
      "domain": "survival.play.example.net",
      "target_ip": "172.18.0.1",
      "target_port": 25565,
      "server_uuid": "",
      "core_owned": true,
      "owner_id": "6f1c2a4e-8d3b-4c55-9e21-0a7b3c9d1e42",
      "link_id": "link-3f9a1c0e5b7d4e2a8c6b0d1e2f3a4b5c",
      "proxy_protocol": false,
      "voice": {
        "enabled": true,
        "host": "survival.play.example.net",
        "port": 26002,
        "target_port": 24454,
        "mod_host": "survival.play.example.net",
        "public_host": "",
        "public_state": "",
        "name_target": "",
        "failing_since": null,
        "public_state_at": null
      },
      "voice_allowed": true,
      "bedrock": {
        "java": true,
        "bedrock": true,
        "has_key": true,
        "dns_status": "",
        "dns_checked_at": null,
        "dns_failing_since": null
      },
      "bedrock_allowed": true,
      "bedrock_active": true
    }
  ]
}
FieldMeaning
domainthe address
target_ip, target_portwhere the link dials, as the link sees it
link_idthe link it runs through. Absent if the link is gone
proxy_protocolreal player IP forwarding is on
suspended, suspendedReasonpresent only when we suspended the address; it carries no players then
voicethe voice chat state, below
voice_allowedwhether voice chat can be switched on for this account
bedrockthe editions: java, bedrock, and has_key (a Floodgate key exists)
bedrock.dns_status, dns_checked_at, dns_failing_sincethe last DNS check of an address on your own domain; empty and null on our domains
bedrock_allowedwhether Bedrock can be added for this account
bedrock_activeBedrock is running on the platform at all

voice when on: host is our name for the voice address (on an own domain, our regional voice.<region domain>), port the public UDP port, target_port the mod's port on your server, and mod_host the name to write into the voice mod's config. When voice is off only enabled: false and the name fields are present, so treat host, port, target_port and mod_host as optional. public_host is an optional voice name of your own, public_state its state (pending, active, fallen_back, empty without one), name_target the CNAME target for it.

Create or change

POST /routes

shell
curl -X POST https://panel.dylaris.com/api/external/gateway/routes \
  -H "Authorization: Bearer dyl_<your key>" \
  -H "Content-Type: application/json" \
  -d '{"linkId":"link-3f9a1c0e5b7d4e2a8c6b0d1e2f3a4b5c","subdomain":"survival","hosterDomain":"play.example.net","targetHost":"172.18.0.1","targetPort":25565}'
json
{"success": true, "message": "Route created", "domain": "survival.play.example.net", "ownershipNotice": ""}

The answer is 201. Note the request uses camelCase field names, unlike the answers:

FieldMeaning
linkIdone of your links, required
subdomain + hosterDomaina name under one of our domains
customDomainor a name on your own domain, proven first (see Your own domains)
domainor the full name; it is sorted into one of the two above and follows its rules
targetHostthe host the link dials, required
targetPort1 to 65535, default 25565

Posting a name you already hold again changes its target or moves it to another link; that costs no allowance. Wildcards are refused.

targetHost must be one of:

  • one of your servers by name, mc-<uuid>,
  • localhost or 127.0.0.1 (IPv6 loopback is refused: use 127.0.0.1),
  • a private address: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8, 100.64.0.0/10 or fc00::/7.

Any other name or public address is 400 target_not_allowed: a DNS name can resolve somewhere else after the check, and a leaked key must not be able to aim our edges at a third party. If you really need public targets, ask us to enable them for your account.

Errors you should handle: link_not_found, kit_retiring, route_limit, custom_domain_limit, domain_unverified, domain_blocked, domain_taken, route_suspended, invalid_target, invalid_port, target_not_allowed, plus no_entitlement, store_not_linked and billing_suspended when the plan is missing or suspended. A route on a new own domain starts its ownership check, which counts against the domains you may add (409 too_many_domains).

Delete

DELETE /routes/{domain} removes the address. Answers {"success": true, "message": "Route deleted"}; 404 not_found means it is not (or no longer) yours. A suspended address cannot be deleted by you (409 route_suspended).

Real player IP

PATCH /routes/{domain}/proxy-protocol with {"enabled": true} makes the link send each player's real address to your server over the PROXY protocol.

json
{"success": true, "proxyProtocol": true}

Set the server up to expect the header first (Velocity, BungeeCord or a Paper/Fabric proxy-protocol option), or every join fails. Turning it on needs the link to announce client-addr (409 link_without_client_addr: update the link). 409 link_check_failed means we could not ask; try again. A suspended address cannot be switched on (409 route_suspended). Turning it off is never refused.

Voice chat

PUT /routes/{domain}/voice

json
{"enabled": true, "target_port": 24454, "public_host": "voice.play.example.com"}

target_port is the voice mod's port on your server, default 24454. public_host is optional: leave it out to keep the current one, send "" to clear it. The answer is {"success": true, "voice": {...}} with the voice object above; write its mod_host and port into the mod's config and restart the server.

On your own domain, voice needs the domain to point at one of our regions first (409 no_routes says which record to create). A public_host that does not point at the voice region yet answers 409 voice_host_not_pointing, but voice is switched on anyway on our name; ask again once the record exists. Other refusals: voice_not_allowed, kit_retiring, link_without_voice (the link is offline or too old), no_relay (no voice relay in that region yet), voice_pool_full, voice_host_invalid (400), route_suspended. {"enabled": false} is never refused.

Bedrock

PUT /routes/{domain}/bedrock sets the editions:

json
{"java": true, "bedrock": true}
json
{"success": true, "bedrock": {"java": true, "bedrock": true, "has_key": true, "dns_status": "", "dns_checked_at": null, "dns_failing_since": null}}

Both fields are required and at least one must be true (400 edition_invalid). One address per server should carry Bedrock; install Floodgate (not Geyser) on the server, Geyser runs on our side. On your own domain, the DNS must point at one of our regions by a CNAME or A records; an SRV record alone cannot carry Bedrock (409 bedrock_unavailable, with the record to create). Other refusals: bedrock_disabled, kit_retiring. Taking Bedrock away or changing Java is never refused.

Floodgate key

GET /routes/{domain}/floodgate-key needs gateway.write, because the answer is a credential: whoever holds it can join that address as any Bedrock player.

json
{"success": true, "domain": "survival.play.example.net", "key": "q83vEjRWeJq83vEjRWeJqw=="}

key is the standard base64 of the 16 bytes Floodgate reads as key.pem: decode it and write the raw bytes to Floodgate's folder. The answer is sent with Cache-Control: no-store; do not cache or log it either. The key stays the same while the address exists. 404 not_found means the address is not yours or has never had Bedrock.

Your own domains

An address on a domain of your own (play.example.com) needs proof that you control it, once, before any route on it. Own domains have to be enabled (customDomainsEnabled in GET /regions, else 409 custom_domains_off).

  1. POST /custom-domains with {"domain": "play.example.com"}. The answer carries the TXT record to publish:

    json
    {
      "success": true,
      "domain": {
        "domain": "play.example.com",
        "state": "pending",
        "attempts": 0,
        "txtName": "_dylaris-verify.play.example.com",
        "txtValue": "<token>"
      }
    }
  2. Publish that TXT record, and a CNAME from the domain to the region's address (see GET /regions).

  3. POST /custom-domains/{domain}/verify-txt checks it now: {"success": true, "message": "Ownership verified. ..."}. 409 conflict means the record is not visible yet; DNS can take a few minutes. Each domain can be checked once every 5 minutes (429 verify_cooldown). Creating the route also checks the record, so a route right after publishing works too.

  4. Create the route with "customDomain": "play.example.com".

Keep the TXT record. It is checked again from time to time; a verified domain whose record has been missing for 7 days loses its addresses, and lapsesAt says when.

FieldMeaning
domainthe domain
statepending, verified, blocked or permablocked (after repeated failed checks)
attemptsfailed checks so far
txtName, txtValuethe record to publish
deadlineAtwhen a pending claim runs out, if it has a deadline
lapsesAtset while a verified domain's record is missing

The other calls:

  • GET /custom-domains lists your domains in items.
  • POST /custom-domains/{domain}/txt-token returns the record again (it is created once and then reused); the way back from permablocked.
  • DELETE /custom-domains/{domain} removes your claim; 409 domain_in_use while an address of yours still uses it.

An account can add up to 50 domains (409 too_many_domains), or as many as its plan's own-domain limit if that is higher.

Players

GET /players is who is on your addresses right now, by edition, plus peaks.

json
{
  "success": true,
  "asOf": "2026-11-17T14:02:11Z",
  "total": {"java": 14, "bedrock": 3},
  "items": [{"domain": "survival.play.example.net", "java": 14, "bedrock": 3}],
  "peak": {
    "today": {"java": 21, "bedrock": 4, "total": 24},
    "last30Days": {"java": 38, "bedrock": 9, "total": 43}
  }
}

items lists only addresses with at least one player; a suspended address is left out. A count can be about 12 seconds old. Peaks are the highest number at once per UTC day, sampled once a minute, so each is at least that many and a short spike can be missed; total is the highest sum seen at once, not the sum of the two maximums.

Usage

GET /usage is the month's traffic; ?period=2026-10 asks for an earlier month (400 bad_request for anything but YYYY-MM).

json
{
  "success": true,
  "usage": {"period": "2026-11-01T00:00:00Z", "edgeBytes": 412000000000, "relayBytes": 9000000000},
  "regions": [{"region": "eu", "kind": "edge", "bytes": 412000000000}],
  "final": false,
  "asOf": "2026-11-17T14:00:00Z",
  "pool": {"includedGb": 5000, "maxPurchaseGb": null, "usedBytes": 421000000000, "percent": 8}
}

usage is the same object as GET /api/external/usage (shortened here). final is false while the month runs, and every figure is then an estimate as of asOf. pool is your plan's included traffic, present for the running month of a Managed Gateway plan.

Beam

For a Managed Gateway customer whose own Core issues beam tickets. Both list calls and the key registration answer 403 managed_required without a Managed Gateway plan.

  • POST /beam/keys with {"public_key": "<base64 Ed25519 public key>"} registers your signing key and returns {"success": true, "kid": "<32 hex>"}; put that kid in your tickets' header. At most two live keys (409 beam_key_limit); a bad key is 400 invalid_public_key.
  • GET /beam/keys lists them: kid, public_key, created_at.
  • DELETE /beam/keys/{kid} revokes one; tickets signed with it are refused at once. 404 beam_key_not_found, 400 invalid_kid.
  • GET /beam/relays lists the relays for your beam config: region, public_host, client_port. ?region=eu narrows it.

The typical flow

What a panel plugin does for one machine and one server:

  1. GET /account and GET /regions: check the plan, read the limits, the regions and our domains.
  2. POST /link-kits once per machine, with the region it is in. Store the link_key where only the deployment can read it and run the link with it.
  3. GET /link-kits until the link shows online: true. caps tells you whether it can pass the real player IP and carry voice.
  4. GET /check-domain with the name the user picked, then POST /routes to the server's ip:port as the link sees it.
  5. Optional: PATCH .../proxy-protocol once the server expects the header, PUT .../bedrock and then GET .../floodgate-key for Bedrock, PUT .../voice for voice chat.
  6. GET /routes and GET /players to show status.
  7. When the server goes: DELETE /routes/{domain}. When the machine goes: DELETE /link-kits/{linkId}, or POST .../retire first if it is being replaced and the plan has a host limit.

Reconcile rather than trust your own copy: list routes and links regularly and fix the difference. A route you delete answers 404 the second time; treat that as done.

Error codes

Codes a client should branch on. The status is what we send today.

CodeStatusMeaning
rate_limited429a budget is used up; wait for Retry-After
verify_cooldown429this domain was checked less than 5 minutes ago
unauthorized401no owner behind the key
forbidden403refused, for example a suspended or over-limit account
no_entitlement403no active plan
store_not_linked403the panel account is not joined to the store
billing_suspended403the plan is suspended
account_suspended403the account is suspended (beam keys)
managed_required403beam needs a Managed Gateway plan
link_limit403maxLinks reached
route_limit403maxRoutes reached, or route creation is off for the account
custom_domain_limit403maxCustomDomains reached
domain_unverified403prove the own domain first; the message names the TXT record
domain_blocked403the own domain is blocked after failed checks
link_not_found404 or 400not one of your links
not_found404not yours, or does not exist
domain_taken409someone else holds the name
route_suspended409we suspended the address
kit_retiring409the link is retiring and takes no new address or feature
kit_already_retiring, retire_not_needed, retire_limit, retire_budget409see Retire
proxy_protocol_disabled409real player IP is off on the platform
link_without_client_addr, link_check_failed409see Real player IP
voice_not_allowed, link_without_voice, no_relay, voice_pool_full, voice_host_not_pointing, no_routes409see Voice chat
bedrock_disabled, bedrock_unavailable409see Bedrock
custom_domains_off, too_many_domains, domain_in_use409see Your own domains
beam_key_limit409two beam keys already
conflict409another conflict, for example a TXT record not found yet
target_not_allowed, invalid_target, invalid_port400see Create or change
unknown_region400no edge of that region is online
edition_invalid, voice_host_invalid400see Bedrock and Voice chat
invalid_public_key, invalid_kid400see Beam
bad_request, invalid_request400the request could not be read
dns_lookup_failed503the DNS check could not run; nothing changed, retry
gateway_disabled503the gateway is switched off; retry later
unavailable503rate limiting is down, writes are paused
internal5xxour fault; retry with backoff

New codes can appear. Treat an unknown code by its status.

NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.