- Docs
- API reference
- API overview
API overview
Authentication, base URLs, request and response formats, errors and versioning for the PikoStack hosting API.
The PikoStack hosting API is a JSON REST API served by pikod. Everything a billing system needs, from listing plans to deleting a server, is available here.
Base URL#
| Setup | Base URL |
|---|---|
| On the node (default) | http://127.0.0.1:8090 |
| Remote clients | https://<your-panel-host>:<port> once TLS is configured in pikod.yaml |
pikod refuses to listen on a non-loopback address without TLS.
Authentication#
Send a bearer token on every /api/v1 request:
curl -sS -H "Authorization: Bearer $TOKEN" https://panel.example.com/api/v1/version
Tokens are admin (read and write) or readonly. See API tokens. The health endpoints /healthz and /readyz need no token.
Requests and responses#
- Request bodies are JSON. Unknown fields are rejected.
- Responses are JSON with UTF-8 encoding.
- Times are RFC 3339 in UTC.
- Long-running operations, such as creating a server, return
202 Acceptedwith the resource; poll it until its status settles.
Errors#
Every error has the same shape:
{
"error": {
"code": "invalid",
"message": "plan_id: unknown plan piko.huge",
"request_id": "01JD2K6R1VZ7Y3"
}
}
| HTTP | code |
Meaning |
|---|---|---|
| 400 | bad_request |
Malformed JSON or parameters |
| 401 | unauthorized |
Missing or unknown token |
| 403 | forbidden |
The token's role does not allow this |
| 404 | not_found |
No such resource |
| 409 | conflict |
The resource is in a state that does not allow this |
| 402 | limit_reached |
Quota or license limit reached |
| 422 | invalid |
Validation failed; the message names the field |
| 501 | not_supported |
Not available on this installation |
| 503 | unavailable |
The cloud backend is temporarily unavailable; retry later |
| 500 | internal |
Unexpected error; quote the request_id to support |
Error messages are written for API clients and never expose internal component names.
Versioning#
The API is versioned in the path. Within v1, fields are only added, never removed or renamed. Clients must ignore fields they do not know.
Endpoints#
| Area | Reference |
|---|---|
| Servers | Servers |
| Plans, templates, version, license, health | Plans, templates and system |
| Migration service | Migration API |
| PikoStack customer portal | Customer portal API |
Something unclear or wrong on this page? Tell us. © 2026 PikoStack.