Skip to main content

Servers

Manage your own servers from code. These routes need a key scoped to all, servers, or byos. Changes need read_write. Servers are on Plus, Pro, and Enterprise; other plans get 402. Pass teamId to work with a team’s servers. A team-scoped key only sees its team’s servers. POST /cli/servers
string
required
Name shown in Pxxl.
string
Team that owns the server.
Response 201
Run installCommand on the server as root within 30 minutes. The agent links itself, and state moves from pending to linked to online. See install for details. Reaching your plan’s server limit returns 409 with reason byos_server_limit.

Server endpoints

Deleting a server with projects on it returns 409 with reason byos_server_in_use. Move or delete those projects first.

Actions and operations

Actions and operations run on the server through the agent. The server must be online, or you get 409. action is restart, stop, start, or logs for an app (pass its container name in app), or prune or update for the whole server. Poll the action until status is done or failed. GET /cli/servers/ops lists every operation, such as system.summary, disk.usage, logs.errors, and cleanup.unused_images. Read operations only inspect. Change operations, such as the cleanup.* ones, modify the server and must go to /ops/change. Both routes need read_write. By default the call waits up to 45 seconds and returns the result. Send "wait": false to return at once and poll the action.
The browser terminal is dashboard-only. See terminal.

Tools

Tunnels, webhooks, and checks need a key scoped to all, tools, tunnels, or webhooks. Changes need read_write. Webhooks have a free tier. Tunnels need Plus, Pro, or Enterprise. Plan limits return 402.

Tunnels

Response 201
The tunnel token is shown once. commands holds ready-to-run client commands. A bare port in target becomes http://localhost:PORT; the default is port 3000. The connect route lets the CLI and SDK open a tunnel with your API key instead of the tunnel token. It takes the tunnel ID or slug.

Webhooks

Response 201
Send requests to url. Pxxl stores each one and forwards it to forwardUrl when set. Replay sends the stored request to url, or to the endpoint’s forwardUrl when you leave url out.

Checks