Skip to content

REST API ​

The console is built on a JSON REST API at https://zenavo.app/api. Anything you can do in the console, you can do with it.

GET https://zenavo.app/api/ needs no key: it returns the API's name, its base URL, links to these docs and the health check, and how to authenticate.

Authentication ​

Send an API key as a bearer token:

sh
curl -H "Authorization: Bearer $ZENAVO_API_KEY" https://zenavo.app/api/auth/me

A key's permission and project limit decide which endpoints it may call; others answer 403. Billing, team membership and /api/account/* are for browser sessions only.

Requests from a browser session also need the header X-Zenavo-Request: 1 on anything other than GET; requests with a bearer token do not.

Requests need only a valid session or API key with the right role; no action asks for a second confirmation. Accounts that have not verified their email get 403 with {"email_unverified": true} on changes outside their own account.

Conventions ​

  • Bodies are JSON. Times are Unix seconds.
  • IDs are prefixed: team_, srv_, proj_, job_, bak_, tok_.
  • Errors return a status code and {"detail": …}. Validation errors (422) list each field.
  • When the team's plan does not include a feature, creating or turning on what it covers returns 402 with {"detail": …, "plan_required": {"feature": "log_drains", "required_plan": "pro", "required_plan_name": "Pro", "plan": "free", "plan_name": "Free"}}. Listing, changing, turning off and deleting what the team already has do not need the plan.
  • Long operations (deploy, restart, backup) return a job: {"id": "job_…"}. Poll GET /api/jobs/{id} for status (queued, running, succeeded, failed, cancelled), log and per-service progress.

Endpoints ​

Account ​

MethodPath
GET/api/auth/meThe signed-in user, their teams and email_verified
PATCH/api/accountName and avatar
POST/api/account/avatarUpload a profile picture (image as the request body, up to 512 KB). Browser session only
GET POST/api/account/tokensList or create API keys (browser session only). Create with {name, days, scope, project_ids}: scope is read, deploy or full (the default); project_ids limits the key to those projects (omit or null for all)
DELETE/api/account/tokens/{id}Delete an API key
GET/api/account/sessionsSigned-in sessions
POST/api/auth/2faSecond sign-in step: {code} after /api/auth/login answered {two_factor: true}
POST/api/account/verifyConfirm it's you: {code} with two-factor authentication, else {password}. No action requires it at the moment
POST/api/auth/verify-emailOpen an email verification link: {token} (works once, for 24 hours)
POST/api/account/email/verifySend a new verification link; {verified: true} when the address is verified already
GET/api/account/2faTwo-factor status: enabled (app or passkey), totp, recovery codes left, passkey count
POST/api/account/2fa/setup /enable /disable /recovery-codesManage two-factor authentication (browser session only)
POST/api/auth/2fa/passkey/options then /api/auth/2fa/passkeySecond sign-in step with a passkey: WebAuthn request options ({options: null} without passkeys) and whether the account has an authenticator app (totp), then {credential}
GET/api/account/passkeysYour passkeys: name, AAGUID, synced, created, last used
POST/api/account/passkeys/options then /api/account/passkeysRegister a passkey: creation options, then {name, credential} (the account's first second factor also returns recovery_codes)
DELETE/api/account/passkeys/{id}Remove a passkey (removing the last second factor turns two-factor authentication off)
GET/api/account/audit?before=&limit=Your own security activity
POST/api/auth/device/codeStart a CLI sign-in (device flow): {client_name, scope, client} → {device_code, user_code, verification_uri, expires_in, interval}. scope defaults to full; client is cli (default) or mcp, and names the key "CLI on …" or "MCP on …"
POST/api/auth/device/tokenPoll with {device_code}: 202 while waiting, 429 if polled faster than interval, 200 {token, scope, project_ids} once approved (the approver may have narrowed the scope)

Teams ​

MethodPath
GET POST/api/teamsList or create teams
PATCH/api/teams/{tid}Rename
GET/api/teams/{tid}/membersMembers
PATCH DELETE/api/teams/{tid}/members/{uid}Change a role, remove a member
GET POST/api/teams/{tid}/invitesInvitations
DELETE/api/teams/{tid}/invites/{iid}Revoke an invitation (admins, browser sessions only)
POST/api/teams/{tid}/invites/{iid}/resendEmail a new link valid for 7 more days; the old link stops working (admins; an owner's invitation, owners only; browser sessions only)
GET/api/account/invitesInvitations to your own address, once it is verified (browser sessions only)
POST DELETE/api/account/invites/{id}, …/{id}/acceptAccept or decline one of them (browser sessions only)
GET/api/teams/{tid}/audit?before=&limit=Audit log (admins)
GET POST/api/teams/{tid}/notification-channelsNotification channels (admins). Create with {kind, name, events, url} (Slack, Discord, webhook) or {kind: "telegram", name, events, bot_token, chat_id}; a webhook's secret is returned once
PATCH DELETE/api/teams/{tid}/notification-channels/{cid}Change name, events, enabled or the destination; remove
POST/api/teams/{tid}/notification-channels/{cid}/testSend a test message now
POST/api/teams/{tid}/notification-channels/{cid}/secretA webhook's new signing secret (returned once)
GET POST/api/teams/{tid}/log-drainsLog drains (admins; creating needs the Pro plan or up). Create with {kind: "http", name, url}, {kind: "datadog", name, site, api_key} or {kind: "loki", name, url, username, password, tenant_id}, plus projects (empty for all); an HTTP drain's secret is returned once
PATCH DELETE/api/teams/{tid}/log-drains/{did}Change name, projects, enabled or the destination; remove
POST/api/teams/{tid}/log-drains/{did}/testSend a test line now
POST/api/teams/{tid}/log-drains/{did}/secretAn HTTP drain's new signing secret (returned once)
GET POST/api/teams/{tid}/alert-rulesAlert rules (admins; creating needs the Pro plan or up)
PATCH DELETE/api/teams/{tid}/alert-rules/{rid}Change a rule or enabled; remove

Usage and billing ​

MethodPath
GET/api/teams/{tid}/usage?period=YYYY-MMPlan limits, servers, members, build minutes by project, service and day
GET/api/teams/{tid}/usage/builds.csv?period=Every metered build of a month, as CSV
GET/api/teams/{tid}/transferImage transfer this period: bytes, included_bytes, overage_cents, limit_cents, blocked, percent and the period's start and end
GET/api/teams/{tid}/billingPlan, subscription state, seats and the plan catalog (admins)
GET/api/teams/{tid}/billing/invoicesRecent invoices with Stripe's page and PDF links (admins)
POST/api/teams/{tid}/billing/checkoutStart a subscription: {plan} → {url} of Stripe Checkout (owners)
POST/api/teams/{tid}/billing/changeSwitch a subscription to another plan: {plan} (owners)
POST/api/teams/{tid}/billing/cancel /resumeCancel at the end of the period, or undo it (owners)
PUT/api/teams/{tid}/billing/spend-limitSet the spending limit: {cents}, 0 to 1,000,000 (owners)
POST/api/teams/{tid}/billing/portal{url} of Stripe's Customer Portal for cards, billing details and invoices (owners)

Servers ​

MethodPath
GET/api/servers?team_id=List servers
POST/api/servers?team_id=Add a server: {name, host, port, user, password | private_key}
GET PATCH/api/servers/{sid}Read, rename
POST/api/servers/{sid}/bootstrapRun setup again: {password | private_key}, or an empty body within a day of a failed setup to reuse the credentials it kept
GET/api/servers/{sid}/usage?hours=CPU, memory and disk history
GET/api/servers/{sid}/systemPlatform components
GET/api/servers/{sid}/portsPort checks
GET/api/servers/{sid}/jobsSetup and other jobs
POST/api/servers/{sid}/deleteRemove: {confirmation: "<server name>"}
POST/api/servers/{sid}/reinstallUninstall K3s and set the server up from scratch: {confirmation: "<server name>", password | private_key} (admins; the server must host no projects). Answers with the server, whose setup is queued
GET/api/servers/{sid}/ssh-logins?hours=&failed=SSH login history (members)
POST/api/servers/{sid}/agentMove a server added before the agent to it (admins)
POST/api/servers/{sid}/agent/updateUpdate the agent (admins; returns a job)
GET/api/servers/{sid}/firewallThe ports to open in your provider's firewall for the server (members)

Projects ​

MethodPath
GET/api/projects?team_id=List projects
GET/api/projects?shared=trueProjects shared with you from teams you are not in. Each project carries your role, and shared (with team_name and server) when it comes from another team
POST/api/projectsCreate: {team_id, server_id, manifest}
GET/api/projects/{pid}Summary, services and status
GET/api/projects/{pid}/manifestThe full configuration, with variables
PUT/api/projects/{pid}Save the configuration: {manifest, server_id, revision}
PUT/api/projects/{pid}/iconSet the project logo: {icon}, a built-in icon key, an uploaded custom:<id> from POST /api/icons, or "" for automatic
PUT/api/projects/{pid}/starStar the project for yourself (any role that can open it; an access token needs the deploy scope); lists then carry starred: true on it. DELETE the same path removes the star. Both can be repeated
POST/api/projects/{pid}/deployDeploy all services (returns a job). While the project is busy the deploy is queued: the answer adds behind ({id, kind}, the job it waits for), and coalesced: true when it joined a deploy already queued
POST/api/projects/{pid}/deployments/{job}/cancelCancel a deploy that has not started (status becomes cancelled)
POST/api/projects/{pid}/rollback{target_job}
POST/api/projects/{pid}/services/{service}/rollback{target_job}: return one service to that deployment; the others stay as deployed (returns a job)
POST/api/projects/{pid}/restart /stopRestart or stop every service
GET/api/projects/{pid}/runtimeLive state of each service
POST/api/projects/{pid}/clone /transferCopy: {name, team_id, server_id}; or move a never-deployed project to another team: {team_id, server_id} (admins of both teams)
GET POST/api/projects/{pid}/collaboratorsCollaborators and, for admins, pending invitations; add one: {email, role} (admins, browser sessions only)
PATCH DELETE/api/projects/{pid}/collaborators/{uid}Change a collaborator's role ({role}) or remove them (admins; a collaborator may remove themselves; browser sessions only)
DELETE/api/projects/{pid}/invites/{iid}Revoke a pending invitation (admins, browser sessions only)
POST/api/projects/{pid}/invites/{iid}/resendEmail a new link valid for 7 more days (admins, browser sessions only)
GET/api/projects/{pid}/moveThe latest move to another server
GET/api/projects/{pid}/move/preflight?server_id=&team_id=Check a move without changing anything (admins)
POST/api/projects/{pid}/moveMove, with its data, to another server of the team, or of another team you administer to transfer it: {server_id, team_id, confirmation: "<project name>"} (admins; returns a job)
POST/api/projects/{pid}/move/finish /move/rollbackDelete the old copy, or return to the old server (admins; returns a job)
POST/api/projects/{pid}/delete{confirmation: "<project name>"}
PUT/api/projects/{pid}/checklistThe migration checklist: {source_backup, data_restored, application_verified, dns_switched, rollback_ready}, each true or false (members)

Services ​

{service} is the service ID; its current name also works. In a project's configuration each service has an id and an optional hostname; leave both out for a new service and Zenavo gives it a random svc-… id and a hostname made from the name. A service's optional icon is one of the built-in keys the console draws, such as nodejs, php or postgresql (zenavo service icon --list lists them); anything else, a URL included, is refused. Without one the console infers it from the image, and the project's services list carries the icon it shows.

MethodPath
POST/api/projects/{pid}/services/{service}/deployDeploy this service only; the others stay as deployed (returns a job)
PUT/api/projects/{pid}/services/{service}/source?create=&port=&deploy=&acknowledge_init=Upload a gzip-compressed tar of a directory (up to 500 MB) as the service's source and deploy it (returns {upload_id, service, created, job}); create=1 adds a missing service, deploy=0 only stores it
POST/api/projects/{pid}/services/{service}/restart /suspend /resume
POST/api/projects/{pid}/services/{service}/execRun a command in the container
GET/api/projects/{pid}/services/{service}/terminalWebSocket: an interactive terminal (members). Binary frames carry input and output; text frames carry JSON: {"type":"resize","cols","rows"} from the client, {"type":"exit","code"} or {"type":"error","message"} from the server. Browsers must send the console's Origin
GET/api/projects/{pid}/services/{service}/files?path=List a folder in the container (members)
GET/api/projects/{pid}/services/{service}/files/content?path=First 256 KB of a file, as text
GET/api/projects/{pid}/services/{service}/files/download?path=Download a file (up to 500 MB)
PUT/api/projects/{pid}/services/{service}/files/upload?dir=&name=Upload the raw body (up to 50 MB, Content-Length required); &overwrite=1 replaces
POST/api/projects/{pid}/services/{service}/files/mkdirCreate a folder: {"path"}
POST/api/projects/{pid}/services/{service}/files/renameRename in place: {"path", "name"}
POST/api/projects/{pid}/services/{service}/files/deleteDelete a file or folder: {"path"}
GET/api/projects/{pid}/services/{service}/usage?hours=CPU and memory history
GET/api/projects/{pid}/logs/{service}Recent runtime logs
GET/api/projects/{pid}/logs/{service}/streamLive runtime logs (Server-Sent Events)
GET/api/projects/{pid}/logs/{service}/history?from=&to=&q=&cursor=&limit=Stored runtime logs, oldest first: lines containing q (any case) between from and to (RFC 3339 or Unix seconds; default the last hour). Pass next back as cursor for more
GET/api/projects/{pid}/logs/{service}/download?from=&to=&q=Stored runtime logs of a range as a text file
GET/api/projects/{pid}/log-search?from=&to=&q=&regex=1&exclude=&services=&cursor=Search the stored logs of several services, merged in time order (Pro plan and up)
POST/api/projects/{pid}/services/{service}/domainsGenerate a domain
DELETE/api/projects/{pid}/domains/{domain}Remove a generated domain
GET/api/projects/{pid}/domains/accessIP rules
PUT/api/projects/{pid}/domains/{domain}/access{"mode": "allow" or "deny", "sources": [...]}
DELETE/api/projects/{pid}/domains/{domain}/accessIP rules
POST/api/projects/{pid}/gatewayProject gateway
DELETE/api/projects/{pid}/gatewayProject gateway

Database view ​

The database view of a database service. Members may read; writes need a team admin. Each request runs inside the database container and is recorded in the audit log without its SQL, keys, values or documents. … is /api/projects/{pid}/services/{service}.

MethodPath
GET…/database/tablesPostgreSQL, MySQL, MariaDB: tables and views, with estimated rows and columns
GET…/database/rows?schema=&table=&offset=&limit=A page of a table's rows
POST…/database/queryRun one SQL statement: {sql, allow_writes, max_rows}. Read-only unless allow_writes (admins)
GET…/database/infoRedis, Valkey: the server summary from INFO: version, memory, clients, keys per database
POST…/database/keysRedis, Valkey: list keys with SCAN: {db, match, cursor, count}
POST…/database/keyOne key's value: {db, key, cursor, count}, or key_b64 for keys that are not UTF-8
POST…/database/commandRun one command: {db, command, allow_writes}. Read commands only unless allow_writes (admins)
GET…/database/collectionsMongoDB: databases and collections, with estimated document counts
POST…/database/findFind documents: {db, collection, filter, sort, projection, skip, limit}, all JSON strings; 50 a page by default
POST…/database/documentChange one document: {op, db, collection, filter, update, document}, with op insert, update or delete (admins)

Backups ​

MethodPath
GET/api/backups?project_id=List backups
POST/api/projects/{pid}/backupsBack up a service: {service, engine}
GET/api/backups/{bid}/downloadDownload
POST/api/backups/{bid}/restoreRestore: {confirmation}, as typed in the console
POST/api/projects/{pid}/jobs/{job}/cancelCancel a queued or running backup or restore (members); a cancelled restore may have applied part of the dump

Removed services ​

MethodPath
GET/api/projects/{pid}/removed-servicesRemoved services whose data is not deleted yet: state (pending, purging, leftover), purge_after, volumes, generated domains, backups
POST/api/projects/{pid}/removed-services/{service}/purgeDelete a removed service's data now (admin, full token): {confirmation}, the service name. Returns the purge job

Git and GitHub ​

MethodPath
POST/api/git/refsBranches and tags of a public repository: {url}
POST/api/git/planBuild plan preview: {team_id, url, ref, context}
GET/api/github/repos?team_id=Repositories the team's GitHub installations can read
GET/api/github/branches?team_id=&repo=Branches of one of them

Images and domains ​

MethodPath
GET/api/images/ports?team_id=&image=The ports a public image EXPOSEs, read from its registry without pulling it
GET/api/images/mirror?image=Whether Zenavo's mirror for mainland China holds an image, and its address there
GET/api/images/mirror/search?q=Images the mirror holds whose name contains q
GET/api/domains/available?name=Whether a generated domain name is free: {available, reason}

Templates ​

MethodPath
GET/api/templatesThe template gallery (public, no key needed)
GET/api/templates/{code}One template and its manifest (public)
POST/api/imports/previewCheck a Zeabur template or Zenavo export: {text, team_id, variables}, or a gallery template: {template, team_id, variables}
POST/api/imports/{did}/commitCreate the project: {server_id}

Example: deploy and wait ​

sh
JOB=$(curl -s -X POST -H "Authorization: Bearer $ZENAVO_API_KEY" \
  -H "Content-Type: application/json" -d '{}' \
  https://zenavo.app/api/projects/$PROJECT/deploy | jq -r .id)

until curl -s -H "Authorization: Bearer $ZENAVO_API_KEY" https://zenavo.app/api/jobs/$JOB \
  | jq -e '.status == "succeeded" or .status == "failed"' >/dev/null; do sleep 5; done