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.readfor everyGETbelow except the Floodgate key,gateway.writefor every change, and for the Floodgate key.
gateway.writedoes not includegateway.read: a plugin that reads and writes needs both. Give the key only gateway permissions (plususage.readif 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:
Authorization: Bearer dyl_<your key>Bodies are JSON, so writes also send Content-Type: application/json. A first
request:
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:
{"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:
{"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:
| Class | Budget | Used by |
|---|---|---|
| read | 120 a minute | every GET except the Floodgate key |
| write | 30 a minute | route, domain and link changes, the Floodgate key |
| mint | 10 an hour | minting 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
429withRetry-After: 60. - Checking one own domain's TXT record: once every 5 minutes per domain
(
429verify_cooldown, noRetry-Afterheader). - If rate limiting itself is unavailable, writes and mints answer
503unavailablerather than run unmetered. Reads still pass.
Endpoints
| Method and path | Permission | Class |
|---|---|---|
GET /account | gateway.read | read |
GET /regions | gateway.read | read |
GET /check-domain?domain=<fqdn> | gateway.read | read |
GET /link-kits | gateway.read | read |
POST /link-kits | gateway.write | mint |
DELETE /link-kits/{linkId} | gateway.write | write |
POST /link-kits/{linkId}/roll | gateway.write | mint |
POST /link-kits/{linkId}/retire | gateway.write | write |
GET /routes | gateway.read | read |
POST /routes | gateway.write | write |
DELETE /routes/{domain} | gateway.write | write |
PATCH /routes/{domain}/proxy-protocol | gateway.write | write |
PUT /routes/{domain}/voice | gateway.write | write |
PUT /routes/{domain}/bedrock | gateway.write | write |
GET /routes/{domain}/floodgate-key | gateway.write | write |
GET /custom-domains | gateway.read | read |
POST /custom-domains | gateway.write | write |
DELETE /custom-domains/{domain} | gateway.write | write |
POST /custom-domains/{domain}/txt-token | gateway.write | write |
POST /custom-domains/{domain}/verify-txt | gateway.write | write |
GET /players | gateway.read | read |
GET /usage?period=YYYY-MM | gateway.read | read |
GET /beam/keys | gateway.read | read |
POST /beam/keys | gateway.write | mint |
DELETE /beam/keys/{kid} | gateway.write | mint |
GET /beam/relays?region=<region> | gateway.read | read |
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:
| Value | Meaning |
|---|---|
null | no limit |
0 | none allowed |
n | at 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.
{
"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}
}
}| Field | Meaning |
|---|---|
product | managed, route_only or none |
managed | true for a Managed Gateway plan |
entitlementSource | where the plan comes from: plan, grant, plan+grant, unlimited, suspended or none |
suspended | the account is suspended or over its limits; writes are refused |
scopes | the permissions this key carries |
limits | maxLinks (links, which is hosts), maxRoutes, maxCustomDomains |
Regions
GET /regions lists where addresses can live and which domains you can take
names under.
{
"success": true,
"hosterDomains": [{"domain": "play.example.net", "validation": "alphanumeric"}],
"customDomainsEnabled": true,
"cnameTarget": "edge",
"items": [{"region": "eu", "wildcard": "*.eu.play.example.net", "online": true}]
}| Field | Meaning |
|---|---|
hosterDomains | our domains you can take a name under; validation is the naming rule: letters, alphanumeric or dns |
customDomainsEnabled | whether addresses on your own domains are possible |
cnameTarget | the label an own domain's CNAME points at under a hoster domain; empty when unset |
items[].region | the region id you pass when minting a link |
items[].wildcard | the region's wildcard name |
items[].online | at 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.
{"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.
Link kits
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
{
"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
}| Field | Meaning |
|---|---|
link_id | the id every other call uses |
name | your label |
region | the region it was minted for; empty means the default |
online | the link is connected right now. Absent when we could not ask: show that as unknown, not as offline |
caps | what the running link announced: client-addr (it can pass the real player IP), voice (it can carry voice chat). Empty while offline |
retire_at | present only on a retiring link: when it is removed |
used, retiring, limit | live links counted against maxLinks, links on their way out, and the limit |
Mint
POST /link-kits with an optional name and region:
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"}'{
"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:
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.
{"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.
{"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.
{
"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
}
]
}| Field | Meaning |
|---|---|
domain | the address |
target_ip, target_port | where the link dials, as the link sees it |
link_id | the link it runs through. Absent if the link is gone |
proxy_protocol | real player IP forwarding is on |
suspended, suspendedReason | present only when we suspended the address; it carries no players then |
voice | the voice chat state, below |
voice_allowed | whether voice chat can be switched on for this account |
bedrock | the editions: java, bedrock, and has_key (a Floodgate key exists) |
bedrock.dns_status, dns_checked_at, dns_failing_since | the last DNS check of an address on your own domain; empty and null on our domains |
bedrock_allowed | whether Bedrock can be added for this account |
bedrock_active | Bedrock 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
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}'{"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:
| Field | Meaning |
|---|---|
linkId | one of your links, required |
subdomain + hosterDomain | a name under one of our domains |
customDomain | or a name on your own domain, proven first (see Your own domains) |
domain | or the full name; it is sorted into one of the two above and follows its rules |
targetHost | the host the link dials, required |
targetPort | 1 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>, localhostor127.0.0.1(IPv6 loopback is refused: use127.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/10orfc00::/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.
{"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
{"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:
{"java": true, "bedrock": true}{"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.
{"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).
-
POST /custom-domainswith{"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>" } } -
Publish that TXT record, and a
CNAMEfrom the domain to the region's address (seeGET /regions). -
POST /custom-domains/{domain}/verify-txtchecks it now:{"success": true, "message": "Ownership verified. ..."}.409conflictmeans the record is not visible yet; DNS can take a few minutes. Each domain can be checked once every 5 minutes (429verify_cooldown). Creating the route also checks the record, so a route right after publishing works too. -
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.
| Field | Meaning |
|---|---|
domain | the domain |
state | pending, verified, blocked or permablocked (after repeated failed checks) |
attempts | failed checks so far |
txtName, txtValue | the record to publish |
deadlineAt | when a pending claim runs out, if it has a deadline |
lapsesAt | set while a verified domain's record is missing |
The other calls:
GET /custom-domainslists your domains initems.POST /custom-domains/{domain}/txt-tokenreturns the record again (it is created once and then reused); the way back frompermablocked.DELETE /custom-domains/{domain}removes your claim;409domain_in_usewhile 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.
{
"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).
{
"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/keyswith{"public_key": "<base64 Ed25519 public key>"}registers your signing key and returns{"success": true, "kid": "<32 hex>"}; put thatkidin your tickets' header. At most two live keys (409beam_key_limit); a bad key is400invalid_public_key.GET /beam/keyslists them:kid,public_key,created_at.DELETE /beam/keys/{kid}revokes one; tickets signed with it are refused at once.404beam_key_not_found,400invalid_kid.GET /beam/relayslists the relays for your beam config:region,public_host,client_port.?region=eunarrows it.
The typical flow
What a panel plugin does for one machine and one server:
GET /accountandGET /regions: check the plan, read the limits, the regions and our domains.POST /link-kitsonce per machine, with the region it is in. Store thelink_keywhere only the deployment can read it and run the link with it.GET /link-kitsuntil the link showsonline: true.capstells you whether it can pass the real player IP and carry voice.GET /check-domainwith the name the user picked, thenPOST /routesto the server'sip:portas the link sees it.- Optional:
PATCH .../proxy-protocolonce the server expects the header,PUT .../bedrockand thenGET .../floodgate-keyfor Bedrock,PUT .../voicefor voice chat. GET /routesandGET /playersto show status.- When the server goes:
DELETE /routes/{domain}. When the machine goes:DELETE /link-kits/{linkId}, orPOST .../retirefirst 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.
| Code | Status | Meaning |
|---|---|---|
rate_limited | 429 | a budget is used up; wait for Retry-After |
verify_cooldown | 429 | this domain was checked less than 5 minutes ago |
unauthorized | 401 | no owner behind the key |
forbidden | 403 | refused, for example a suspended or over-limit account |
no_entitlement | 403 | no active plan |
store_not_linked | 403 | the panel account is not joined to the store |
billing_suspended | 403 | the plan is suspended |
account_suspended | 403 | the account is suspended (beam keys) |
managed_required | 403 | beam needs a Managed Gateway plan |
link_limit | 403 | maxLinks reached |
route_limit | 403 | maxRoutes reached, or route creation is off for the account |
custom_domain_limit | 403 | maxCustomDomains reached |
domain_unverified | 403 | prove the own domain first; the message names the TXT record |
domain_blocked | 403 | the own domain is blocked after failed checks |
link_not_found | 404 or 400 | not one of your links |
not_found | 404 | not yours, or does not exist |
domain_taken | 409 | someone else holds the name |
route_suspended | 409 | we suspended the address |
kit_retiring | 409 | the link is retiring and takes no new address or feature |
kit_already_retiring, retire_not_needed, retire_limit, retire_budget | 409 | see Retire |
proxy_protocol_disabled | 409 | real player IP is off on the platform |
link_without_client_addr, link_check_failed | 409 | see Real player IP |
voice_not_allowed, link_without_voice, no_relay, voice_pool_full, voice_host_not_pointing, no_routes | 409 | see Voice chat |
bedrock_disabled, bedrock_unavailable | 409 | see Bedrock |
custom_domains_off, too_many_domains, domain_in_use | 409 | see Your own domains |
beam_key_limit | 409 | two beam keys already |
conflict | 409 | another conflict, for example a TXT record not found yet |
target_not_allowed, invalid_target, invalid_port | 400 | see Create or change |
unknown_region | 400 | no edge of that region is online |
edition_invalid, voice_host_invalid | 400 | see Bedrock and Voice chat |
invalid_public_key, invalid_kid | 400 | see Beam |
bad_request, invalid_request | 400 | the request could not be read |
dns_lookup_failed | 503 | the DNS check could not run; nothing changed, retry |
gateway_disabled | 503 | the gateway is switched off; retry later |
unavailable | 503 | rate limiting is down, writes are paused |
internal | 5xx | our fault; retry with backoff |
New codes can appear. Treat an unknown code by its status.