API guides
API overview
Make your first request in five minutes, and find everything the REST API offers.
๐ What the API is
Everything the Orchestrator panel does in your browser goes through a JSON REST API โ and you can use the same API from scripts, CI pipelines, chat bots and your own tools: deploy a site when tests pass, roll back from an alert, export invoices, watch your fleet.
- Base URL: your own panel, for example
https://panel.example.com/api. Every panel serves its own API; there is no central endpoint. - Format: JSON over HTTPS.
- Authentication: a personal access token in the
Authorizationheader. - Size: 351 endpoints in 43 groups, all documented in the API reference, with examples in cURL, JavaScript, PHP and Python.
๐ Quick start
1. Create a token
In your panel, open Settings โ Security โ Personal Access Tokens, name the token and click Create token. Copy it โ it is shown once โ and keep it in an environment variable:
export ORCH_TOKEN="orch_โฆ"
2. Make your first request
List the sites you can access:
curl https://panel.example.com/api/sites \
-H "Authorization: Bearer $ORCH_TOKEN"
const res = await fetch('https://panel.example.com/api/sites', {
headers: { Authorization: `Bearer ${process.env.ORCH_TOKEN}` },
});
const sites = await res.json();
console.log(sites.map((s) => `${s.id} ${s.domain} ${s.status}`));
use Illuminate\Support\Facades\Http;
$sites = Http::withToken(env('ORCH_TOKEN'))
->get('https://panel.example.com/api/sites')
->throw()
->json();
foreach ($sites as $site) {
echo "{$site['id']} {$site['domain']} {$site['status']}\n";
}
import os
import requests
res = requests.get(
"https://panel.example.com/api/sites",
headers={"Authorization": f"Bearer {os.environ['ORCH_TOKEN']}"},
timeout=60,
)
res.raise_for_status()
for site in res.json():
print(site["id"], site["domain"], site["status"])
[
{
"id": 12,
"name": "Shop",
"domain": "shop.example.com",
"phpVersion": "8.3",
"stackType": "laravel",
"status": "active",
"branch": "main",
"sslEnabled": true,
"deployments": [
{ "id": 345, "commit": "a3f9c21", "branch": "main", "status": "success", "createdAt": "2026-11-27T10:00:00.000Z" }
]
}
]
The response is shortened here; see List sites for every field.
3. Deploy
Start a deploy of site 12 โ optionally of an exact commit or tag with ref:
curl -X POST "https://panel.example.com/api/sites/12/deploy?ref=v1.4.0" \
-H "Authorization: Bearer $ORCH_TOKEN"
const res = await fetch('https://panel.example.com/api/sites/12/deploy?ref=v1.4.0', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.ORCH_TOKEN}` },
});
const { started, deploymentId, queued } = await res.json();
$result = Http::withToken(env('ORCH_TOKEN'))
->post('https://panel.example.com/api/sites/12/deploy?ref=v1.4.0')
->throw()
->json();
res = requests.post(
"https://panel.example.com/api/sites/12/deploy",
params={"ref": "v1.4.0"},
headers={"Authorization": f"Bearer {os.environ['ORCH_TOKEN']}"},
timeout=60,
)
{ "started": true, "deploymentId": 346 }
The deploy runs in the background. Follow its log live with the deploy stream, or poll the site until the deployment's status is success or failed โ the CI recipe does exactly that.
๐งญ What you can do
๐ Before you build
| Guide | What you will learn |
|---|---|
| Authentication | Tokens, what they can and cannot do, sessions, public endpoints and token security. |
| Errors and rate limits | The error format, every status code and how to retry. |
| Conventions | Ids, dates, money, validation, pagination, permissions and long-running operations. |
| Streaming and WebSockets | Following deploys and other operations live. |
| Recipes | CI deploys, rollback, backups, chat commands and monitoring, ready to copy. |
| OpenAPI and Postman | Downloads for code generation, API explorers and Postman. |
| Versioning and changelog | How the API changes and what changed. |
Tip. Code examples switch together: pick your language once on any example and every example in the docs follows it.