Full OpenAPI Reference
Explore the interactive API reference with schemas, parameters, and try-it-out functionality for every endpoint.
Authentication
All API endpoints (except/api/health) require an API key passed via the api-key HTTP header.
API Key Types
PlayFlow projects have two API keys, each with a different access level:| Key Type | Prefix | Access Level | Use Case |
|---|---|---|---|
| Server API Key | pf_* | Full read/write | Backend services, CI/CD, admin tools |
| Client API Key | pfclient_* | Limited client-safe operations | Game clients, browser apps |
You can find and regenerate your API keys in the PlayFlow Dashboard under Project Settings.
Base URL
All API requests are made to:| Version | Path Prefix | Notes |
|---|---|---|
| V3 (canonical) | /api/v3/* | Zod-validated, OpenAPI spec, clean response shapes |
| V2 (legacy) | /api/v2/* | Compatibility layer for older SDKs |
Endpoints Overview
Servers
Manage the full lifecycle of your game servers — create, inspect, update, restart, and stop.| Method | Endpoint | Description |
|---|---|---|
GET | /v3/servers | List servers for your project |
POST | /v3/servers/start | Launch a new game server |
GET | /v3/servers/:instance_id | Get details for a specific server |
POST | /v3/servers/:instance_id/update | Update a server’s custom_data |
DELETE | /v3/servers/:instance_id | Stop a running server |
POST | /v3/servers/:instance_id/restart | Restart a server |
GET | /v3/servers/:instance_id/logs | Retrieve server logs |
GET | /v3/servers/:instance_id/metrics | Retrieve server resource metrics |
Builds
Upload game server binaries and manage the build pipeline.| Method | Endpoint | Description |
|---|---|---|
GET | /v3/builds | List builds for your project |
POST | /v3/builds/upload-url | Get a presigned URL for ZIP upload |
POST | /v3/builds/docker-image | Create a build from a Docker image |
POST | /v3/builds/:build_id/process | Trigger build processing |
GET | /v3/builds/:build_id | Get build details |
DELETE | /v3/builds/:build_id | Soft-delete a build |
GET | /v3/builds/:build_id/logs | Get build processing logs |
Projects
Read and update project-level configuration, and query logs across all servers.| Method | Endpoint | Description |
|---|---|---|
GET | /v3/projects/settings | Get project configuration |
POST | /v3/projects/settings | Update project configuration |
GET | /v3/projects/logs | Query logs across all servers |
Common Operations
List Servers
Retrieve all running servers for your project. By default, only servers with statusrunning are returned.
Include servers that are still in the
launching state.Include pre-warmed pool servers in the results.
Maximum number of servers to return (1-100).
Number of servers to skip for pagination.
Start a Server
Launch a new game server instance. The server is provisioned immediately and moves throughlaunching to running status.
A display name for the server instance.
The deployment region. See Server Regions for the full list.
Server instance size. One of:
micro, small, medium, large, xlarge, dedicated-small, dedicated-medium, dedicated-large, dedicated-xlarge, persistent-small, persistent-medium, persistent-large, persistent-xlarge. See Pricing & Plan Types for specs.The build name to deploy. Defaults to the latest build if not specified.
A specific build version number. If omitted, the latest version for the given
version_tag is used.Command-line arguments passed to your game server executable on launch.
Time-to-live in seconds (60-86400). The server automatically stops after this duration.
If
true, the server restarts automatically if the game process exits.Arbitrary key-value data attached to the server. Useful for passing map names, game modes, or match metadata to your game server at runtime.
An optional match identifier to associate this server with a specific match or lobby.
Key-value string pairs set as environment variables on the server instance.
Override the project-level port configuration for this server. Each entry specifies a
name, internal_port, protocol (udp or tcp), and optional tls_enabled flag.The server starts in
launching status. Once the game process is ready, the status changes to running and started_at is populated. You can poll GET /v3/servers/:instance_id or use include_launching=true when listing servers to track this transition.Stop a Server
Shut down a running server and release its resources.An optional reason for stopping the server, recorded for logging purposes.
Upload a Build
Uploading a build is a three-step process: request a presigned upload URL, upload your ZIP file, then trigger processing.Request an upload URL
Call the upload-url endpoint to get a presigned R2 URL and a Response (201 Created):
build_id.GET /v3/builds/:build_id or by streaming build logs from GET /v3/builds/:build_id/logs.
Create a Build from Docker Image
If you already have a containerized game server, you can create a build directly from a Docker image instead of uploading a ZIP.The build name (used as the
version_tag when starting servers).The full Docker image URL including tag.
Path to the game server executable inside the container.
Credentials for private registries. Include
username and password fields.Response Shapes
Server Object
Every server endpoint returns or includes the following shape:Build Object
Server Logs and Metrics
Server Logs
Retrieve stdout/stderr logs from a running or recently stopped server.ISO 8601 timestamp to begin retrieving logs from.
Number of log entries to return (1-1000).
Server Metrics
Retrieve CPU, memory, network, and connection metrics for a running server.Time window for metrics. One of:
5m, 15m, 1h, 6h, 24h.Resolution between data points. One of:
15s, 30s, 60s, 300s.Error Handling
All error responses share a consistent JSON structure:Common Status Codes
| Status | Meaning |
|---|---|
200 | Success |
201 | Resource created (server started, upload URL generated) |
202 | Accepted (build processing triggered) |
401 | Missing or invalid api-key header |
404 | Server, build, or resource not found |
422 | Validation error (malformed request body or missing required fields) |
429 | Rate limit exceeded |
500 | Internal server error |
Validation Errors
When request validation fails, the response includes structured error details:Rate Limiting
The API uses token-bucket rate limiting per API key. Rate limit status is returned in response headers.| Endpoint Type | Limit |
|---|---|
| Read endpoints (list, get, logs, metrics) | 100 requests/second |
| Write endpoints (start server, upload build) | 10 requests/second |
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum tokens in the bucket |
X-RateLimit-Remaining | Tokens remaining before throttling |
429 response:
Regions
Deploy your servers across 12 global regions for low-latency gameplay. Pass any of these region IDs to theregion field when starting a server.
| Region | ID |
|---|---|
| US East | us-east |
| US West | us-west |
| Europe North (Sweden) | eu-north |
| Europe West (France) | eu-west |
| Asia South (India) | ap-south |
| Southeast Asia (Singapore) | sea |
| East Asia (Hong Kong) | ea |
| Asia North (Japan) | ap-north |
| Australia | ap-southeast |
| South Africa | south-africa |
| South America (Brazil) | south-america-brazil |
| South America (Chile) | south-america-chile |
SDK and Tooling
Unity SDK
Use the PlayFlow Unity SDK for C# wrappers around the REST API, including server management from your game client.
Interactive API Reference
Explore every endpoint with the full OpenAPI specification, request/response schemas, and a try-it-out console.