1. Authentication
Create a personal access token in the panel under Account → API tokens. Tokens are shown once, can be read-only or read-and-write, can expire and can be revoked at any time. They act with your permissions on each machine and service.
curl https://panel.zeroterm.dev/api/v1/services \
-H "Authorization: Bearer $ZEROTERM_TOKEN"2. Endpoints
Base URL: https://panel.zeroterm.dev/api/v1
GET
/meYour account.GET
/machinesMachines you own or can access, with status and latest metrics.GET
/servicesServices you can access, with status, usage and your role.GET
/services/{id}One service.POST
/services/{id}/powerStart, stop or restart. Body: {"action":"restart"}.POST
/services/{id}/commandsSend a console command. Body: {"command":"say hello"}.POST
/services/{id}/backupsCreate a backup. Copied off-site automatically if a destination is set.POST
/services/{id}/deploySync from Git and restart. Optional body: {"commit":"<40-character SHA>"} to deploy a specific commit.POST
/services/{id}/redeployRecreate the container with the current settings, keeping its files.GET
/services/{id}/limitsResource limits and current usage.PUT
/services/{id}/limitsChange limits (owner only). Same fields as returned by GET.GET
/services/{id}/deploymentsGit deployment history.GET
/jobs/{id}Status and result of a queued operation.3. Operations and jobs
Operations on a machine are queued for its agent and return 202 Accepted with a job ID. Poll /jobs/{id} until the status is succeeded or failed.
curl -X POST https://panel.zeroterm.dev/api/v1/services/$SERVICE/deploy \
-H "Authorization: Bearer $ZEROTERM_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"
# {"id":"9b1c…","status":"queued"}Send an Idempotency-Key header with a UUID to make retries safe: repeating a request with the same key returns the original job instead of running it twice.
4. Deploy from GitHub Actions
- name: Deploy to ZeroTerm
run: |
curl --fail -X POST https://panel.zeroterm.dev/api/v1/services/${{ vars.ZEROTERM_SERVICE }}/deploy \
-H "Authorization: Bearer ${{ secrets.ZEROTERM_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{"commit":"${{ github.sha }}"}'5. Errors and limits
400invalid fields,401missing or expired token,403not permitted (including write requests with a read-only token),404unknown resource,429too many requests.- Each account can make 600 requests per minute. A
429response includesRetry-Afterin seconds. - Errors have the shape
{"message":"…"}.