Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
REST API · on every server

Every server, scriptable.

One command adds a REST API to a Cipi server. Create apps, deploy, issue certificates, back up databases and apply cipi.yml from CI, scripts, your own dashboard or an AI assistant. Scoped tokens, an IP allowlist and nothing hosted by anyone else.

cipi api api.example.com
  • Sanctum tokens with abilities
  • OpenAPI + Swagger UI
  • MCP server included
deploy from anywhere
$ curl -X POST https://api.example.com/api/apps/shop/deploy \
    -H "Authorization: Bearer $CIPI_TOKEN"
{"job_id":"9f1c2a…","status":"pending"}

$ curl https://api.example.com/api/jobs/9f1c2a… \
    -H "Authorization: Bearer $CIPI_TOKEN"
{"status":"completed","type":"app-deploy",
 "result":{"release":134,"duration":"58s"}}

# or from PHP
$cipi->wait($cipi->deploys()->start('shop'));
  • 100+Endpoints for apps, deploys, domains, data and server
  • 40+Token abilities, or full access
  • 1API per server, on its own subdomain
  • $0Free, MIT, self-hosted

What you can automate

Reads answer immediately. Writes become jobs you poll, with the CLI's output and a structured result.

AppsGET/api/appsPOST/api/appsPUT/api/apps/{name}/envPOST/api/apps/{name}/artisan
DeploysPOST/api/apps/{name}/deployPOST…/deploy/rollbackGET…/deploy/statusGET…/deploy/audit
cipi.ymlGET/api/apps/{name}/ymlPOST…/yml/applyPOST…/yml/auto/enable
Domains & SSLPOST…/aliases/{alias}POST/api/apps/{name}/sslPOST…/redirectsPOST…/proxies
DatabasesPOST/api/dbsPOST/api/dbs/{name}/backupPOST/api/dbs/{name}/restorePOST/api/dbs/uploads
BackupsGET/api/backupsPOST/api/backups/runPOST/api/backups/verify
ServerGET/api/statusGET/api/diskPOST/api/php/installPOST/api/services/{name}/restart
JobsGET/api/jobs/{id}status, output and parsed result: credentials, release, backup path

Full endpoint reference

Use it from wherever you work

Official clients for the places people automate servers.

cipi-cli, on your laptop

A single Go binary for Linux and macOS. One profile per server, so a fleet is one command away, with no SSH.

  • cipi-cli prod deploy shop
  • Anonymized database dumps straight into your local DB
  • --json everywhere for scripts

Read: CLI client

cipi-cli on your laptop
$ cipi-cli api token add prod
$ cipi-cli status
$ cipi-cli staging deploy myapp

The PHP SDK, in your apps

composer require cipi/sdk, then call the API from Laravel, Symfony or a script. It waits on jobs, throws typed exceptions and never leaks the token.

  • Laravel facade and config, auto-discovered
  • Chunked uploads for big database dumps
  • HTTPS only, no redirects followed, reads retried, writes never

Read: PHP SDK

app/Console/Commands/Release.php
use Cipi\Sdk\Laravel\Facades\Cipi;

// a staging copy of every pull request
Cipi::wait(Cipi::apps()->create([
    'user'       => "pr{$number}",
    'domain'     => "pr{$number}.preview.acme.app",
    'repository' => 'git@github.com:acme/shop.git',
    'branch'     => $branch,
    'env'        => 'preview',
]));
Cipi::wait(Cipi::deploys()->start("pr{$number}"));

CI pipelines

A token with only deploy-manage deploys from GitHub Actions or GitLab CI over HTTPS, no SSH key on the runner.

Guide: CI/CD

WHMCS

Sell Laravel and PHP hosting: orders create apps, suspensions show a 503 page, terminations remove them.

Docs: WHMCS module

AI assistants

The same API exposes an MCP server at /mcp for Claude, Cursor and VS Code.

MCP for AI

Powerful, on a short leash

The API runs as www-data and can only call an explicit allowlist of cipi commands through sudo. Credentials stay in Cipi's vault, never in PHP.

1ClientCI, SDK, cipi-cli, panel, MCP
2Token + IP checkabilities, expiry, allowlist
3cipi/apisync reads, queued jobs
4sudo allowlistexact command shapes
5cipi CLIthe same validation as SSH
Scoped tokenscipi api token create --name=ci --abilities=deploy-manage --expires=2027-06-30
IP allowlistcipi api ip-whitelist set --ips=203.0.113.0/24; your own IP is kept when you tighten it.
Jobs are privateA job is readable only with the ability it was created under, so one token can't read another's credentials.
Off-limits by designInstalling software, dropping databases, removing PHP, Zero Trust changes, S3 secret keys.
Kept currentThe API package updates itself nightly; cipi api upgrade rebuilds with automatic rollback.

Questions

Is the API hosted by Cipi?

No. Each server runs its own API on a subdomain you choose (cipi api api.example.com). Nothing goes through a third party.

Can a token do everything?

Only if you create it with --full-access. Otherwise it gets the abilities you list, for example deploy-manage only for a CI job, and an optional expiry date.

What can't the API do?

On purpose: install software, drop databases, remove PHP versions or change Zero Trust. Those stay on the CLI, so a leaked token can't do them.

Is there an OpenAPI spec?

Yes. Swagger UI is served at /docs on the API's domain, generated from the OpenAPI document.

Do I need the API?

Only for automation: the web panel, cipi-cli, the PHP SDK, CI pipelines, WHMCS and the server MCP use it. The CLI on the server works without it.

How do I install it?

sudo cipi api api.example.com on the server, with that hostname pointing at it. It issues its own certificate and runs as www-data. See API docs.

How are tokens scoped?

Each token has abilities (for example apps-view, deploy, ssl-manage, mcp-access). Give each client only what it needs, and revoke with cipi api token revoke.

Can I restrict who reaches the API?

Yes, with an IP allowlist in /etc/cipi/api-ip-whitelist, and by putting it behind Cloudflare Zero Trust.

Is there an SDK?

Yes, a PHP SDK for Laravel apps, and cipi-cli for terminals and CI.

Are long operations synchronous?

No. Deploys, SSL and backups return a job id you poll; the panel and SDK do it for you.