Game profiles
API identifiers, required ports, and validation ranges. Open game profiles
Castles API connects game servers to protection, reports their current state, and provides access to recorded attack events.
https://api.castles.proAll requests use HTTPS. Production integrations must validate the server certificate.
Castles API has two independent credential scopes.
| Scope | Authentication | Purpose |
|---|---|---|
| Game server management | Authorization: Bearer <token> |
Games, project networks, and protected server lifecycle |
| Attack events | X-API-Key: <api_key> |
Attack lists, event details, charts, and traffic distributions |
Credentials are issued separately. Do not send a Bearer token to attack endpoints or an attack API key to server management endpoints.
https://api.castles.pro/<project>/v2<project> is the project identifier issued during onboarding. Examples use <token>, <api_key>, and documentation-only IP addresses.
protection.status.Game profiles
API identifiers, required ports, and validation ranges. Open game profiles
Game servers
List, create, inspect, and remove protected game servers. Open server API
Attack events
Query attacks, details, charts, and traffic distributions. Open attack API
Errors and security
Response codes, secret handling, and support diagnostics. Open security guide
Request and response bodies use JSON. Send Content-Type: application/json with requests that contain a body. Ports are integers from 1 to 65535 and must also match the range allowed for the selected game.
Attack timestamps use ISO 8601 and are normally returned in UTC.