Deploy
How an app gets onto zdeploy: an account, the app and its git repo, secrets, a database, the deploy itself, status and logs. Written for the AI agent doing it.
What it is
The control plane: the endpoints an AI agent (or a script) calls to set things up on zdeploy. Create an account, create an app, get its git remote, store secrets, add a database, deploy, read status and logs, and switch services on or off.
This page is for the agent doing the setting up. The service pages (Auth, Email, AI models and the rest) are for the app's own code, at runtime.
Our MCP server offers the same actions as tools, and its tools call these endpoints.
Before you start
Base URL: https://zdeploy.tech/api/v1. Run the curls on this page from your own shell. Every response is JSON: { "data": ... } on success, { "error": "..." } on failure, with what to change.
Three credentials for you, the builder. Each endpoint below names the kind it takes in its Auth line.
| Credential | Looks like | Where you get it | Header |
|---|---|---|---|
| Account credential | zdacc_... | POST /api/v1/get-started/verify | Authorization: Bearer zdacc_... only |
| Deploy credential | zda_... | deployToken from POST /api/v1/apps/create | Authorization: Bearer zda_... only |
| Git push credential | inside git.pushRemote | POST /api/v1/apps/create (first app) or POST /api/v1/git/credentials | the remote's URL |
- The account credential acts on the account: list apps, create apps, get git credentials, and get a new deploy credential for one of its apps. It is not accepted anywhere else.
- The deploy credential acts on one app: status, deploy, logs, secrets, databases. It names its app, so it cannot reach another one.
- The deploy credential also switches the app's services on and off.
deployTokenandgit.pushRemoteare shown once, in the answer toapps/create. Keep them.mcp.installin that answer is a command with the deploy credential written into it. Treat it as the credential: run it, and never print it, paste it into a chat or commit it.- The app API key is not yours. zdeploy gives it to the running app as
ZDEPLOY_API_KEY, for the service pages' endpoints; it is never in a response to you, and no endpoint on this page takes it. No endpoint on this page takes a console session either.
Lost the deploy credential, or a new session on an app that already exists. Call POST /api/v1/apps/:id/deploy-credential with the account credential of the app's owner. It revokes the app's old deploy credentials and returns a new deployToken, shown once. Without an account credential, sign in again with get-started and get-started/verify. Then get a push remote from git/credentials, clone or pull, and read the repo (AGENTS.md, git log) and deploy/status before you change anything. Any app in the account can be taken over this way.
After a pause. All three stop working while the account has had no calls from its AI for a while; the person sets how long in the console. The next call answers 401 with {"error":"idle","details":"..."}, and a code goes to the account's inbox (at most one every 5 minutes). Ask the person for it and send it to POST /api/v1/signup/revalidate. The account and deploy credentials then work again, and its answer carries a new git push remote in git.remotes (the old one stopped working during the pause): git remote set-url origin <remote>. A git push refused as unauthorised after a quiet spell is the same pause: git cannot say so, so make any API call (deploy/status with a deploy credential, GET apps with an account credential), which answers idle and sends the code.
Your first call
The whole walk, from nothing to a live app. Ask the person for two things only: their email, and the 6-digit code sent to it.
- Sign up. zdeploy emails a code that lasts 10 minutes.
curl -s -X POST "https://zdeploy.tech/api/v1/get-started" \
-H 'Content-Type: application/json' \
-d '{"email":"person@example.com"}'
- Verify with the code the person gives you. Keep
data.credential(zdacc_...).
curl -s -X POST "https://zdeploy.tech/api/v1/get-started/verify" \
-H 'Content-Type: application/json' \
-d '{"email":"person@example.com","code":"123456"}'
- Create the app within 15 minutes; the sign-up code covers this first one. Keep
deployTokenandgit.pushRemote.
curl -s -X POST "https://zdeploy.tech/api/v1/apps/create" \
-H 'Authorization: Bearer zdacc_...' \
-H 'Content-Type: application/json' \
-d '{"name":"my-app","stack":"hono-drizzle","needs":["postgres"]}'
- Check status until
setupshowsrepo: doneandcode: done, then clone withgit.pushRemote, build on the template, and push tomain.
curl -s "https://zdeploy.tech/api/v1/deploy/status" -H 'Authorization: Bearer zda_...'
git clone '<git.pushRemote>' my-app
git push origin main
- Check status until
data.build.stateisbuilt. The template's first build deploys itself if it finishes during setup. Once the app is live, each push tomainthat builds deploys itself too. Do not call deploy after every push. Call it only ifbuildsaysbuilt,phaseis notliveand no version isdeploying, or if the owner turned auto-update off:
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/deploy" -H 'Authorization: Bearer zda_...'
- Check status until
data.phaseisliveordeploy_failed. If it failed, readGET /api/v1/deploy/logs?source=deploy.
Reference
POST /api/v1/get-started
Emails a 6-digit sign-in code to an address. The same call signs up a new person and signs in an existing one. Call it first, then get-started/verify. (It was signup/start, and that path still works.)
Auth: none.
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
email | string | yes | Trimmed and cut to 254 characters. Must look like an email address. |
Response: 200. Every address gets the same answer, whether or not it has an account.
{
"data": {
"email": "person@example.com",
"expiresInSeconds": 600,
"message": "If this address can use zdeploy, a 6-digit code is on its way. It lasts 10 minutes."
}
}
Errors:
| Status | When |
|---|---|
| 400 | email is missing, or is not an email address. |
| 403 | Sign-ups are currently unavailable on zdeploy: zdeploy is not taking new accounts right now. Tell the person. |
| 429 | More than 3 requests a minute or 10 an hour from your IP address; a code was sent to this address less than a minute ago; or 5 unused codes were sent to it in the last hour. |
| 500 | The email could not be sent. |
| 503 | Sign-up is unavailable right now. Try again later. |
curl -s -X POST "https://zdeploy.tech/api/v1/get-started" \
-H 'Content-Type: application/json' \
-d '{"email":"person@example.com"}'
POST /api/v1/get-started/verify
Checks the code from get-started and returns an account credential. A new address gets a new account; an existing one signs in to its account. (It was signup/verify, and that path still works.)
Auth: none.
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
email | string | yes | The address the code was sent to. |
code | string | yes | The 6 digits from the email. Characters that are not digits are ignored. Only the newest code for the address works. Five wrong tries use the code up. |
Response: 200. credential is shown this once. created is true when this call made the account.
{
"data": {
"credential": "zdacc_...",
"userId": "cm3k2x9p40000qw3r5t7y9u1i",
"created": true
}
}
The credential also carries one free app creation: for 15 minutes, apps/create with this credential needs no code, once.
While zdeploy is on a waiting list, a correct code for an address with no account gets 403 and no account is made: tell the person to join the waiting list. Addresses that already have an account sign in as normal.
Errors:
| Status | When |
|---|---|
| 400 | email or code is missing; or the code is wrong, expired, already used, or out of tries (Invalid or expired verification code). The message says to ask the person for the newest code, or to request a new one with get-started; after 5 wrong tries you need a new one. |
| 403 | The account is blocked; zdeploy has reached its limit of accounts (Sign-ups are currently unavailable on zdeploy); or zdeploy is on a waiting list and this address has no account. |
| 429 | More than 30 code checks an hour from your IP address. This limit is shared with the code checks of apps/create. The message says how many seconds to wait. |
| 503 | Sign-up is unavailable right now. Try again later. |
curl -s -X POST "https://zdeploy.tech/api/v1/get-started/verify" \
-H 'Content-Type: application/json' \
-d '{"email":"person@example.com","code":"123456"}'
POST /api/v1/signup/revalidate
Resumes the account's paused AI access with the code the idle answer sent to the account's inbox. Every account and deploy credential the account holds works again. The git push credential was deleted while paused, so a new one comes back as push remotes in git.remotes: every repo you may change for an account credential, the app's own repo for a deploy credential. Run git remote set-url origin <remote> in each clone. git is left out when there is no repo; when git hosting did not answer, message says where to get a remote.
Auth: the paused credential: account credential (Authorization: Bearer zdacc_...) or deploy credential (Authorization: Bearer zda_...).
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
code | string | yes | The 6 digits from the email. Only the newest code works. Five wrong tries use the code up. |
Response: 200.
{
"data": {
"message": "AI access is back on for this account. Your old git push remote stopped working while it was paused; git.remotes has a new one. ...",
"git": {
"user": "u-<account id>",
"remotes": [{ "appId": "cm3k2x9p40001qw3r5t7y9u1i", "name": "my-app", "remote": "https://u-<account id>:<token>@<git host>/<account id>/cm3k2x9p40001qw3r5t7y9u1i.git" }]
}
}
}
When the code ran out or was used up, the next call with any of the account's credentials answers idle again and sends a new code, at most one every 5 minutes.
Errors:
| Status | When |
|---|---|
| 400 | code is missing. |
| 401 | No credential, or it is wrong, revoked or unused for 90 days; or its account no longer exists. |
| 403 | The code is wrong, expired, already used, or out of tries. |
| 429 | More than 10 code checks an hour on this credential, or 30 an hour from your IP address. The message says how many seconds to wait. |
| 503 | Codes cannot be checked right now. Try again later. |
curl -s -X POST "https://zdeploy.tech/api/v1/signup/revalidate" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"code":"123456"}'
GET /api/v1/apps
Lists the apps in the account, oldest first, with their addresses. Use it to find an app you made earlier, or to check a name is free before apps/create.
Auth: account credential, Authorization: Bearer zdacc_....
Request: nothing.
Response: 200. deployStatus is draft (not running: never deployed, its first deploy failed, or it was removed), live, stopped or deleting, or null when the app has no deploy. url is null when the app has no address.
{
"data": [
{
"id": "cm3k2x9p40001qw3r5t7y9u1i",
"name": "my-app",
"deployStatus": "live",
"url": "https://my-app.on.zdeploy.tech"
}
]
}
Errors:
| Status | When |
|---|---|
| 401 | No account credential, or it is wrong, revoked or expired. "error":"idle": AI access is paused; see After a pause. |
curl -s "https://zdeploy.tech/api/v1/apps" -H 'Authorization: Bearer zdacc_...'
POST /api/v1/apps/create/code
Emails a 6-digit code to the account's own address, for apps/create. Every app after the first one needs the person's OK: call this, ask the person for the code, and send it as code.
Auth: account credential, Authorization: Bearer zdacc_....
Request: no body. The code always goes to the account's address; you cannot name another.
Response: 200.
{
"data": {
"email": "person@example.com",
"expiresInSeconds": 600,
"message": "A 6-digit code is on its way to person@example.com. It lasts 10 minutes."
}
}
Errors:
| Status | When |
|---|---|
| 401 | No account credential, or it is wrong, revoked or expired; or its account no longer exists. "error":"idle": AI access is paused; see After a pause. |
| 429 | A code was sent to this address less than a minute ago, or 5 unused codes were sent to it in the last hour. |
| 500 | The email could not be sent. |
| 503 | Codes are unavailable right now. Try again later. |
curl -s -X POST "https://zdeploy.tech/api/v1/apps/create/code" -H 'Authorization: Bearer zdacc_...'
POST /api/v1/apps/create
Creates an app: its address, sign-in client, deploy credential and a private git repo started from a template. The app's API key is made too, and goes only to the running app. It returns at once; the repo, the first build and the first deploy carry on in the background (follow them with deploy/status).
With "hosting": false it makes a services-only app instead: the sign-in client, the deploy credential and the services, with nothing hosted on zdeploy. No repo, build, address or database. Use it for an app that runs somewhere else, or on the person's own machine while they build. Its API key is not in the answer: the person makes one on the app's page in the console and puts it in the app's env file.
Auth: account credential, Authorization: Bearer zdacc_.... Also needs code, except for the first app within 15 minutes of get-started/verify.
Request: JSON body. Unknown fields are ignored.
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | 1 to 100 characters. Unique in the account. The address is made from it; if that address is taken, a number is added. |
stack | string | no | The template the repo starts from: hono-drizzle (default), nextjs-drizzle or any. Ignored with image. |
needs | string[] | no | "postgres" and/or "redis". The app receives DATABASE_URL / REDIS_URL and REDIS_KEY_PREFIX; every Redis key and channel name must start with the prefix. |
image | string | no | Run this prebuilt image instead of a repo. No repo, build or template is made. An image on zdeploy's own registry must be in your account. |
port | integer | no | 1 to 65535. The port image listens on. Default 3000. Only with image. |
hosting | boolean | no | false makes a services-only app (above). Not with stack, needs, image or port. |
redirectUris | string[] | no | Only with "hosting": false. Up to 20 sign-in callbacks, matched exactly: https, or http on localhost, 127.0.0.1 or [::1]. Sign-in answers once the app has one. Add more later with deploy/sign-in. |
code | string | no | A fresh 6-digit code from apps/create/code. Leave it out for the first app after sign-up. |
hono-drizzle and nextjs-drizzle use Postgres, so send "needs":["postgres"] with them.
Response: 201. deployToken and git.pushRemote are shown this once. git.pushRemote is null when the account already had a git credential (its second app on): get one from git/credentials. It is also null, and git.user is empty, when git hosting did not answer: once setup shows repo: done, get a remote from git/credentials. repo and git are null for an image app. For a services-only app hosting is false, url, repo, git, signIn.redirectUri and signIn.authEventsUrl are null, signIn.redirectUris is what you sent, and steps is empty. Otherwise steps is what is set up so far; repo, code, build and deploy start pending.
{
"data": {
"app": { "id": "cm3k2x9p40001qw3r5t7y9u1i", "name": "my-app" },
"hosting": true,
"url": "https://my-app.on.zdeploy.tech",
"deployToken": "zda_...",
"mcp": {
"url": "https://zdeploy.tech/mcp",
"install": "claude mcp add --transport http my-app https://zdeploy.tech/mcp --header \"Authorization: Bearer zda_...\""
},
"signIn": {
"issuer": "https://zdeploy.tech",
"clientId": "cm3k2x9p40001qw3r5t7y9u1i",
"redirectUri": "https://my-app.on.zdeploy.tech/api/auth/callback/zdeploy",
"redirectUris": ["https://my-app.on.zdeploy.tech/api/auth/callback/zdeploy"],
"authEventsUrl": "https://my-app.on.zdeploy.tech/api/auth-events"
},
"repo": "https://<git host>/<account id>/cm3k2x9p40001qw3r5t7y9u1i.git",
"git": {
"template": "hono-drizzle",
"user": "u-<account id>",
"pushRemote": "https://u-<account id>:<token>@<git host>/<account id>/cm3k2x9p40001qw3r5t7y9u1i.git",
"guide": "The app must listen on the port in $PORT and answer GET /healthz with 200 once it can serve. ..."
},
"wired": [
"Sign-in through zdeploy: client cm3k2x9p40001qw3r5t7y9u1i, redirect https://my-app.on.zdeploy.tech/api/auth/callback/zdeploy. The app receives ZDEPLOY_AUTH_ISSUER and ZDEPLOY_AUTH_CLIENT_ID. Auth events go to https://my-app.on.zdeploy.tech/api/auth-events, already registered: serve POST /api/auth-events there (no template includes it).",
"ZDEPLOY_URL, ZDEPLOY_API_KEY and ZDEPLOY_APP_URL are set inside the app.",
"Postgres 17: the app receives DATABASE_URL.",
"Runs what the repo builds: each push to main is built into an image that serves on port 3000 ($PORT)."
],
"steps": [
{ "key": "app", "status": "done", "summary": "app my-app created with its sign-in client", "at": "2026-11-09T10:00:00.000Z" },
{ "key": "address", "status": "done", "summary": "https://my-app.on.zdeploy.tech", "at": "2026-11-09T10:00:00.000Z" },
{ "key": "services", "status": "done", "summary": "postgres", "at": "2026-11-09T10:00:00.000Z" },
{ "key": "repo", "status": "pending", "summary": "", "at": null },
{ "key": "code", "status": "pending", "summary": "", "at": null },
{ "key": "build", "status": "pending", "summary": "", "at": null },
{ "key": "deploy", "status": "pending", "summary": "", "at": null }
],
"trialEndsAt": "2026-11-23T10:00:00.000Z",
"next": "Keep deployToken now: it is not shown again. ..."
}
}
A new app starts with sign-in, AI models and abuse control switched on. Its auth-events URL is registered as signIn.authEventsUrl, <app URL>/api/auth-events: the app must serve that route (see the Auth page). Switch on anything else with services/enable.
The free trial. Each new app starts its 2-week free trial at once, with no card; trialEndsAt says when it ends. An account has a set number of free trial slots (llms.txt names the number in force). An app holds a slot from the start of its trial until it is paid for or deleted, which includes the 7 days after the trial ends before an unpaid app is removed. With every slot in use, apps/create answers 402 and makes nothing.
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; code is not a string; a field is invalid (the message says what is wrong); stack is not a known template (the message lists them); image is on zdeploy's registry outside your account; hosting: false came with stack, needs, image or port; or redirectUris came without hosting: false, or one of them is not allowed. |
| 401 | No account credential, or it is wrong, revoked or expired; or its account no longer exists. "error":"idle": AI access is paused; see After a pause. |
| 402 | Every free trial slot on the account is in use. The message says how many there are and what frees one: the person adds a card in the console, or deletes a trial app. Checked before the code, so this does not spend it. |
| 403 | No code and the credential's free creation is used or past its 15 minutes; or code is wrong or expired. |
| 409 | The account already has an app with this name. The name is checked before the code, so this does not spend it. (Only a clash in the instant between that check and the create does.) |
| 429 | Too many code checks: 30 an hour from your IP address (shared with get-started/verify), or 10 an hour on this credential. The message says how many seconds to wait. |
| 503 | Deploy is not available on this instance, or codes cannot be checked right now. |
| 500 | Something went wrong on our side. No app is left behind. |
curl -s -X POST "https://zdeploy.tech/api/v1/apps/create" \
-H 'Authorization: Bearer zdacc_...' \
-H 'Content-Type: application/json' \
-d '{"name":"my-other-app","stack":"nextjs-drizzle","needs":["postgres"],"code":"123456"}'
A services-only app, for one the person runs on their own machine:
curl -s -X POST "https://zdeploy.tech/api/v1/apps/create" \
-H 'Authorization: Bearer zdacc_...' \
-H 'Content-Type: application/json' \
-d '{"name":"my-local-app","hosting":false,"redirectUris":["http://localhost:3000/api/auth/callback/zdeploy"],"code":"123456"}'
POST /api/v1/apps/:id/deploy-credential
Issues a new deploy credential (zda_...) for an app that already exists, and revokes the app's old ones. Use it when you lost deployToken, or start a new session on an app you made earlier. Only the account that owns the app can do this.
Auth: account credential, Authorization: Bearer zdacc_.... :id is the app's id from apps or apps/create.
Request: no body.
Response: 200. deployToken is shown only in this answer. Every deploy credential the app had stops working at once, including one an AI session is using now, so give the new one to whoever needs it. revoked is how many it replaced.
{
"data": {
"appId": "cm3k2x9p40001qw3r5t7y9u1i",
"deployToken": "zda_...",
"revoked": 1
}
}
Errors:
| Status | When |
|---|---|
| 401 | No account credential, or it is wrong, revoked or expired. "error":"idle": AI access is paused; see After a pause. |
| 404 | No app with this id in your account. An app that belongs to someone else gets the same answer. |
| 409 | The app is not active (suspended), so a deploy credential would not work. Ask the person to reactivate it in the console. |
curl -s -X POST "https://zdeploy.tech/api/v1/apps/cm3k2x9p40001qw3r5t7y9u1i/deploy-credential" -H 'Authorization: Bearer zdacc_...'
POST /api/v1/git/credentials
Issues a new git push credential for the account and returns a push remote, with the credential in it, for each app whose repo exists. Call it when apps/create gave pushRemote: null, when you lost the remote, or when you push from a new place.
Auth: account credential, Authorization: Bearer zdacc_....
Request: no body.
Response: 200. The remotes are shown only in this answer. Point any existing clone at the new one with git remote set-url origin <remote>. The account keeps its 5 newest push credentials, so an agent working on another of its apps is not cut off; issuing a sixth revokes the oldest. After a pause, all of them are revoked. An app whose repo is not made yet is not listed.
{
"data": {
"user": "u-<account id>",
"remotes": [
{
"appId": "cm3k2x9p40001qw3r5t7y9u1i",
"name": "my-app",
"remote": "https://u-<account id>:<token>@<git host>/<account id>/cm3k2x9p40001qw3r5t7y9u1i.git"
}
]
}
}
Errors:
| Status | When |
|---|---|
| 401 | No account credential, or it is wrong, revoked or expired. "error":"idle": AI access is paused; see After a pause. |
| 502 | Git hosting did not answer. Try again shortly. |
| 503 | Git hosting is not set up on this instance. |
curl -s -X POST "https://zdeploy.tech/api/v1/git/credentials" -H 'Authorization: Bearer zdacc_...'
GET /api/v1/deploy/status
Where the app is: its phase, address, latest version, components, secret names, the setup steps from apps/create, and, for a repo app, the build of the commit at the head of main. Changes nothing. Poll it every few seconds while you wait.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on (it is, for apps made with apps/create).
Request: nothing.
Response: 200.
{
"data": {
"app": "my-app",
"phase": "live",
"autoUpdate": true,
"url": "https://my-app.on.zdeploy.tech",
"latestVersion": { "n": 2, "status": "live" },
"problem": null,
"components": [
{ "name": "db", "kind": "postgres" },
{ "name": "web", "kind": "git" }
],
"secrets": ["STRIPE_KEY"],
"domain": null,
"setup": [
"- app: done (app my-app created with its sign-in client)",
"- repo: done (<account id>/cm3k2x9p40001qw3r5t7y9u1i, from the hono-drizzle template)",
"- code: done (the hono-drizzle template is the first commit)",
"- build: done (the first build of 3f9a2c1 is built; each push to main is built and scanned the same way)",
"- deploy: done (version 1 is deploying)"
],
"build": { "state": "built", "sha": "3f9a2c1e...", "failedStep": null, "log": null }
}
}
| Field | Meaning |
|---|---|
phase | Before anything is deployed: opened (credential not used yet) or connected. Then, from the latest version: deploying, live, deploy_failed or stopped. revoked when no deploy credential for the app is live; then deploys do not show here. |
latestVersion.status | pending, deploying, live, failed, superseded or stopped. |
problem | Why the latest version failed, when phase is deploy_failed. Whitespace is collapsed and the text is cut to 300 characters. |
secrets | Names only. Values are never returned. |
setup | One line per setup step: app, address, services, repo, code, build, deploy, each pending, done, skipped, not available or failed, with a reason. null for an app not made with apps/create. |
domain | The app's own domain: { "domain", "status", "problem" }, status being pending or verified. null when it has none. See deploy/domains. |
build | null for an app with no repo. |
build.state | queued or building: check again. built: the build passed. If the app is live with auto-update on, zdeploy deploys it by itself: watch latestVersion. Otherwise call deploy/deploy. (The Build ... built. Call deploy to run it. line in the status text applies only to that second case.) failed: failedStep names the step and log holds up to the last 40 lines of its log, each cut to 300 characters; fix and push again. cancelled: push again. no_code: nothing on main yet. unknown: zdeploy cannot see the build right now; deploy still works and runs the latest image of main. |
Errors:
| Status | When |
|---|---|
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists. |
| 503 | Deploy is not set up on this instance. |
curl -s "https://zdeploy.tech/api/v1/deploy/status" -H 'Authorization: Bearer zda_...'
POST /api/v1/deploy/deploy
Deploys the app as it is configured now. For a repo app, it runs the image of the build of the head of main, pinned to that commit. The deploy runs in the background; follow it with deploy/status.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on.
Request: no body needed. Optionally a JSON body:
| Field | Type | Required | Notes |
|---|---|---|---|
images | object | no | Component name → image reference, to deploy a specific image. Every name must be an image or git component of the app. For a git component the image must be one of this app's own repo. |
Response: 202. n is the version number.
{ "data": { "versionId": "cm3k2xb1z0004qw3r8d2k1m7p", "n": 2 } }
Errors:
| Status | When |
|---|---|
| 400 | The body is not valid JSON; images is not an object or holds a non-string; an image names an unknown component, or is not this app's own for a git component; an image (in images or on an image component) is on zdeploy's registry outside your account; or the app has no component to run. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists. |
| 409 | The build of the head of main is queued, building, failed, cancelled or no_code (the message says which and what to do); the app is stopped or being removed; or a deploy is still running. |
| 429 | The app's deploy quota is used up, or its subscription is not active. When the quota is used up, the body also carries quota and used, as strings. Retrying soon does not help. |
| 503 | Deploy is not set up on this instance. |
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/deploy" -H 'Authorization: Bearer zda_...'
GET /api/v1/deploy/logs
The running app's own output (source=app, the default), or the recent deploy events with the reason the latest version failed (source=deploy). Changes nothing.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on.
Request: query string.
| Field | Type | Required | Notes |
|---|---|---|---|
source | string | no | app (default) or deploy. |
tail | integer | no | 1 to 500, default 80. Lines of app output; for deploy, events, at most 50. |
Response: 200. With source=app, the app's lines as it wrote them. component is null and lines empty when the app has no public process yet.
{ "data": { "source": "app", "component": "web", "lines": ["Listening on :3000"] } }
With source=deploy, events oldest first. failed is the latest version's failure, or null. Host names and IP addresses in event text are replaced with [host] and [address]. Whitespace is collapsed; failed.error is cut to 300 characters and each detail to 200.
{
"data": {
"source": "deploy",
"failed": { "n": 2, "error": "the web container exited before it answered GET /healthz" },
"events": [
{ "at": "2026-11-09T10:04:12.000Z", "type": "version.created", "detail": "v2" }
]
}
}
Errors:
| Status | When |
|---|---|
| 400 | source is not app or deploy; or tail is not a whole number from 1 to 500. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists; or source=app and nothing is running to read logs from (deploy first, or read source=deploy). |
| 503 | The service that runs apps is not answering (try again in a minute), or deploy is not set up on this instance. |
curl -s "https://zdeploy.tech/api/v1/deploy/logs?source=deploy" -H 'Authorization: Bearer zda_...'
POST /api/v1/deploy/env
Stores an environment variable for the app as a sealed secret, or replaces one a deploy credential set earlier (so a typo is fixed by sending it again). Applies on the next deploy. A secret the owner set in the console cannot be replaced here, only by the owner.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on.
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | Upper snake case: a capital letter, then capitals, digits or _; up to 64 characters. Not starting with ZD_. Not PORT, DATABASE_URL, REDIS_URL, REDIS_KEY_PREFIX, ZDEPLOY_URL, ZDEPLOY_APP_URL, ZDEPLOY_API_KEY, ZDEPLOY_AUTH_ISSUER or ZDEPLOY_AUTH_CLIENT_ID (zdeploy sets those). |
value | string | yes | 1 to 16,384 characters. Never returned. |
Response: 201 when the secret is new, 200 when it replaced one a deploy credential set.
{ "data": { "name": "STRIPE_KEY" } }
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; name or value is missing or too long; name is not upper snake case, starts with ZD_, or is one zdeploy sets. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists. |
| 409 | name is a secret the owner set (only the owner can replace it); name is already set as a plain variable on a component; or the app already has 50 secrets. |
| 503 | Deploy is not set up on this instance. |
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/env" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"name":"STRIPE_KEY","value":"sk_test_..."}'
DELETE /api/v1/deploy/env
Removes a secret that a deploy credential set. Applies on the next deploy. A secret the owner set in the console cannot be removed here, only by the owner.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on.
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | The secret's name, 1 to 64 characters. |
Response: 200.
{ "data": { "name": "STRIPE_KEY" } }
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; or name is missing or too long. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists; or name is not set as a secret. |
| 409 | name is a secret the owner set (only the owner can remove it). |
| 503 | Deploy is not set up on this instance. |
curl -s -X DELETE "https://zdeploy.tech/api/v1/deploy/env" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"name":"STRIPE_KEY"}'
POST /api/v1/deploy/brand
Sets how the app looks to the people who use it: the brand on zdeploy's hosted sign-in page and on every email zdeploy sends for the app (name, logo, favicon, accent colour, terms and privacy links, email legal footer), the sign-in page's layout, and whether people can sign in with Google and LinkedIn. Unset, the sign-in page looks like zdeploy's and offers email codes only. Live at once; no deploy. Each field you send is set, null or "" clears it, and a field you leave out stays as it is. Send {} to read what is set without changing anything.
Auth: deploy credential, Authorization: Bearer zda_....
Request: JSON body, any of brand, signInPage and signInMethods. Every brand and signInPage field is a string except brand.languages; every signInMethods field is true or false. Links and images are absolute https URLs, up to 2,048 characters: serve them from the app ($ZDEPLOY_APP_URL/logo.png).
| Field | Notes |
|---|---|
brand.appName | Display name, up to 80 characters. Unset, the app's name. |
brand.logoUrl | Logo on the sign-in page and in email. |
brand.faviconUrl | Tab icon. Unset, the logo. A square image reads best at 16 pixels. |
brand.color | Accent for buttons and focus rings, as hex: #4f46e5 or #46e. Use the app's primary colour. |
brand.headline | Headline on the sign-in page, up to 120 characters. |
brand.subheadline | The line under it, up to 240 characters. Unset, it follows the sign-up policy. |
brand.termsUrl | The app's terms page. Linked under the sign-in form and in email. |
brand.privacyUrl | The app's privacy page. Linked under the sign-in form and in email. |
brand.emailLegalFooter | Footer on every email the app sends: who runs the app, registered address, company number, any disclaimer. Basic HTML; links are kept, other markup is removed. Up to 4,000 characters. |
brand.languages | The languages the app's people get zdeploy's sign-in pages and emails in: { "default": "es", "supported": ["es", "en"] }. BCP 47 tags such as es or pt-BR, up to 20; default is added to supported if missing. A person whose language the app doesn't offer gets default. Unset, English only. zdeploy has text in English only so far: other languages are accepted and shown in English until they have text, and the response's languages.inEnglish names them. Replaced whole, not merged. |
signInPage.layout | card (the form on a plain background, the default), split (a message or image beside the form), immersive (an image behind the form) or prompt (one question at a time, in large type). |
signInPage.panelSide | split only: left or right. |
signInPage.panelHeadline | split and immersive, up to 80 characters. Unset, the headline, then the app name. |
signInPage.panelBody | split only, up to 240 characters. Hidden on phones. |
signInPage.imageUrl | split and immersive: the image. |
signInMethods.google | true adds "Continue with Google" to the sign-in page; false removes it. |
signInMethods.linkedin | true adds "Continue with LinkedIn"; false removes it. |
Google and LinkedIn sign-in use zdeploy's own Google and LinkedIn apps. There is nothing to register with Google or LinkedIn, no client ID or secret to set, and no change to the app's code: the person comes back to the same callback with the same ID token, and email is the address their Google or LinkedIn account holds. Email codes stay on whatever you send; only the person can turn them off, in the console (App > Auth). A person who signs in with Google one day and an email code the next is the same user when the email matches.
Response: 200, with what is now set and the fields this call changed. signInMethods lists every method the sign-in page offers, email included. languages is the app's languages as they apply (English only when unset), with withText, the ones zdeploy has text for, and inEnglish, the ones shown in English for now.
{
"data": {
"brand": { "appName": "Acme", "logoUrl": "https://acme.on.zdeploy.tech/logo.svg", "color": "#4f46e5", "termsUrl": "https://acme.on.zdeploy.tech/terms", "privacyUrl": "https://acme.on.zdeploy.tech/privacy" },
"signInPage": { "layout": "split", "panelSide": "left", "panelHeadline": "Welcome back" },
"signInMethods": { "email": true, "google": true, "linkedin": true },
"languages": { "default": "en", "supported": ["en"], "withText": ["en"], "inEnglish": [] },
"changed": ["brand.logoUrl", "brand.color", "signInPage.layout", "signInMethods.google", "signInMethods.linkedin"]
}
}
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; a field is not one of those above; a value is not a string, is too long, is not an https URL, or is not a hex colour; brand.languages is not an object with a default language tag and a list of tags in supported; signInPage.layout or panelSide is not one of its values; a signInMethods value is not true or false; signInMethods.email was sent; zdeploy cannot offer Google or LinkedIn sign-in right now; or the change would leave no way to sign in (the person turned email codes off). The error names the field. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 404 | The app no longer exists. |
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/brand" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"brand":{"logoUrl":"https://acme.on.zdeploy.tech/logo.svg","color":"#4f46e5","termsUrl":"https://acme.on.zdeploy.tech/terms","privacyUrl":"https://acme.on.zdeploy.tech/privacy"},"signInPage":{"layout":"split","panelHeadline":"Welcome back"},"signInMethods":{"google":true,"linkedin":true}}'
POST /api/v1/deploy/sign-in
Sets where zdeploy's sign-in may send people back to (the app's redirect URIs) and where it posts the app's auth events. Live at once; no deploy. Works for every app, hosted or services-only. Send {} to read what is set without changing anything.
Redirect URIs are matched exactly (a trailing / aside), with no wildcards: register each callback the app uses, one per port or host. The callback for the app's own zdeploy address, and for its verified domain, is kept by zdeploy: it is listed in managed and cannot be removed here. Sign-in turns on with the app's first redirect URI.
Auth: deploy credential, Authorization: Bearer zda_....
Request: JSON body, any of the fields below.
| Field | Type | Required | Notes |
|---|---|---|---|
add | string or string[] | no | Redirect URIs to allow. https, or http on localhost, 127.0.0.1 or [::1] only. No #fragment, user name or password. Up to 2,048 characters each. Adding one already there changes nothing. |
remove | string or string[] | no | Redirect URIs to stop allowing. One not there is ignored. While sign-in is on the app keeps at least one: to swap, add the new one in the same call. |
authEventsUrl | string or null | no | Where zdeploy posts the app's auth events: its POST /api/auth-events. https, or http on localhost, 127.0.0.1 or [::1]. null clears it. On the origin of one of the app's redirect URIs (after this call's changes). Every app with sign-in must serve it (see the Auth page). |
An app holds up to 20 redirect URIs.
Response: 200, with what is now set and what this call changed.
{
"data": {
"enabled": true,
"redirectUris": ["https://my-app.on.zdeploy.tech/api/auth/callback/zdeploy", "http://localhost:3000/api/auth/callback/zdeploy"],
"managed": ["https://my-app.on.zdeploy.tech/api/auth/callback/zdeploy"],
"authEventsUrl": "https://my-app.on.zdeploy.tech/api/auth-events",
"signupPolicy": "open",
"changed": ["added http://localhost:3000/api/auth/callback/zdeploy"]
}
}
signupPolicy is who may sign up: open, invite-only or closed. It is read-only here: the person sets it on the app's Auth page and can change it at any time. On invite-only and closed, an address zdeploy does not know gets no code, so an app that invites people creates each one with POST /api/v1/auth/users (see the Auth page).
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; a field is not one of those above; a URI is not allowed (the message says why); remove names a URI zdeploy keeps, or would leave no redirect URI while sign-in is on; the app would hold more than 20; or authEventsUrl is not allowed, or is on an origin none of the redirect URIs uses. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 404 | The app no longer exists. |
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/sign-in" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"add":["http://localhost:3000/api/auth/callback/zdeploy"],"authEventsUrl":"http://localhost:3000/api/auth-events"}'
POST /api/v1/deploy/env-pull
Gets the app's local env file onto the person's machine without the app's API key passing through you. You ask; the person approves on a page in the console; then one curl writes the file straight to disk. The file holds a new local-development key made at that moment: it works like the app's API key, but it is separate, one per machine, and the person revokes it on the app's page without touching the live app. Nobody is shown it.
Works for every app, hosted or services-only. On zdeploy itself the app gets its own values and does not use this file.
Auth: deploy credential, Authorization: Bearer zda_....
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
label | string | no | Which machine it is for, shown to the person and on the key, e.g. "Rinova on Sam's laptop". One line, up to 60 characters. Default "Local development". |
appUrl | string | no | Where the app runs locally, written as ZDEPLOY_APP_URL. An origin: https, or http on localhost, 127.0.0.1 or [::1]. Default http://localhost:3000. |
id | string | no | Instead of the above, alone: read where an earlier request is. |
An app has at most 3 requests waiting at once. A request expires 10 minutes after it is made; approving it leaves at least 5 minutes to run the command.
Response: 201.
{
"data": {
"id": "cm3k2x9p40001qw3r5t7y9u1i",
"code": "K7QM-3XRP",
"state": "pending",
"label": "Rinova on Sam's laptop",
"appUrl": "http://localhost:3000",
"approveUrl": "https://zdeploy.tech/apps/cm3k.../env-pull/cm3k...",
"expiresAt": "2026-11-26T14:10:00.000Z",
"file": ".env.development.local",
"command": "curl -sf --no-clobber -X POST https://zdeploy.tech/api/v1/deploy/env-pull/redeem -H \"Authorization: Bearer zdp_...\" -o .env.development.local",
"next": "..."
}
}
Give the person approveUrl and code; the page shows the same code, so they can tell it is your request. Once they approve, run command once, from the app's folder. Then:
- Do not print,
cator read the file. Check.env.development.localis gitignored. - Exit code 22: not approved yet (run it again once they have), or expired, denied or used (ask again).
- If the file already exists,
--no-clobberwrites.env.development.local.1beside it instead. Append it without reading it:cat .env.development.local.1 >> .env.development.local && rm .env.development.local.1.
With {"id": "..."} the response is 200, {"data": {"id", "code", "label", "state", "expiresAt"}}, with state one of pending, approved, denied, used or expired.
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; a field is not one of those above; label is empty; appUrl is not allowed; or id came with other fields. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 404 | id is not a request on this app. |
| 429 | The app already has 3 requests waiting. |
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/env-pull" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"label":"Rinova on Sam\u0027s laptop","appUrl":"http://localhost:3000"}'
POST /api/v1/deploy/env-pull/redeem
The local env file, once the person has approved the request. Run the command that deploy/env-pull returned rather than building this call yourself. It works once: it makes the local-development key and returns the file in the same step.
Auth: the request's pull secret, Authorization: Bearer zdp_....
Request: no body.
Response: 200, text/plain: the file.
# my-app: zdeploy services for local development, written 2026-11-26.
# Do not commit this file or paste it anywhere. ...
ZDEPLOY_URL=https://zdeploy.tech
ZDEPLOY_API_KEY=zdev_...
ZDEPLOY_AUTH_ISSUER=https://zdeploy.tech
ZDEPLOY_AUTH_CLIENT_ID=<the app id>
ZDEPLOY_APP_URL=http://localhost:3000
Errors (JSON, so curl -f writes nothing):
| Status | When |
|---|---|
| 401 | No pull secret, or one zdeploy does not know. |
| 403 | The app is not active. |
| 409 | Not approved yet (the message has the page and code); or the app already has 10 working local keys (the person revokes one on the app's page). |
| 410 | The request was used, denied or has expired. Ask for a new one. |
POST /api/v1/deploy/services
Adds Postgres or Redis beside the app. Takes effect on the next deploy. Adding one the app already has is harmless.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on.
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
service | string | yes | postgres (Postgres 17, component db) or redis (component cache). |
Response: 201 when added, 200 with "added": false when the app already had one. envVar is the variable the app receives. With redis it also receives REDIS_KEY_PREFIX, and every key and channel name must start with it: Redis refuses anything else.
{ "data": { "service": "redis", "name": "cache", "envVar": "REDIS_URL", "added": true } }
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; service is not postgres or redis; or the app cannot take another component (the message says why). |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists. |
| 409 | The app is being removed. |
| 503 | Deploy is not set up on this instance. |
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/services" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"service":"redis"}'
POST /api/v1/deploy/domains
Puts the app on a domain its owner has, like example.com, beside its on.zdeploy.tech address. Sets the domain (replacing the one the app had), then checks it. The answer lists the two DNS records to add; call again with the same domain to check again. An app has one domain of its own, and a domain is on one app.
The check is the TXT record only: it proves whoever added it can change the domain's DNS. The CNAME is what sends visitors and is not checked. Once the TXT is found the domain is verified for good (the TXT may then go, though it also proves the domain for sending email, so keep it), the app's sign-in accepts the domain, ZDEPLOY_APP_URL becomes https://<domain>, and a live app redeploys with it. HTTPS on the domain can take 15 minutes or more after that deploy; checking a verified domain says whether it is up yet.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on.
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
domain | string | yes | A hostname: example.com or app.example.com. A scheme, path or port is dropped and it is lowercased. Not an IP address, a wildcard, or a name under on.zdeploy.tech or zdeploy.tech. |
Response: 201 when the domain is new on the app, 200 when it is a re-check.
{
"data": {
"domain": "example.com",
"status": "pending",
"url": "https://example.com",
"records": [
{ "type": "TXT", "name": "_zdeploy.example.com", "value": "zdeploy-verify=<app id>", "note": "Proves the domain is yours. The same record lets the app send email from it." },
{ "type": "CNAME", "name": "example.com", "value": "my-app.on.zdeploy.tech", "note": "At the root of a domain, use your DNS host's CNAME flattening, ALIAS or ANAME record." }
],
"verifiedAt": null,
"problem": "No TXT record at _zdeploy.example.com yet. DNS changes can take a few minutes to show.",
"nextSteps": ["Get both records added at the DNS host for example.com ...", "..."],
"added": true,
"newlyVerified": false,
"https": null,
"redeploy": null
}
}
| Field | Meaning |
|---|---|
status | pending until the TXT is found, then verified. |
records | The two records to add at the domain's DNS host. zdeploy never gives an IP address: point the domain at the app's own address with the CNAME. |
problem | What the last check found wrong. null once verified. |
newlyVerified | true on the call that verified it. |
https | Only when checking a domain verified earlier: { "ok": true, "detail": "HTTPS works." }, or ok: false with what is not ready. |
redeploy | On the call that verified it: whether the app is redeploying with the domain, in words. |
nextSteps | What to do next and who does it, in order, written for an AI. Covers adding the records (by the AI if it can change the DNS and the person agrees, otherwise by the person), a root domain's flattened CNAME, when to check again, the redeploy, the certificate wait, and what to do if HTTPS never comes. Follow it rather than guessing. |
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; domain is missing, or is not a domain zdeploy can serve (the message says why). |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists. |
| 409 | The domain is on another app on zdeploy. |
| 503 | Deploy is not set up on this instance. |
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/domains" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"domain":"example.com"}'
DELETE /api/v1/deploy/domains
Takes the app's own domain off it. Its sign-in stops accepting the domain, and a live app redeploys without it. The on.zdeploy.tech address is unaffected. Remove the DNS records afterwards.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on.
Request: nothing.
Response: 200. redeploy says, in words, whether the app is redeploying; null when the domain was never verified.
{ "data": { "domain": "example.com", "redeploy": "Redeploying as version 4. HTTPS on the domain can take 15 minutes or more after that." } }
Errors:
| Status | When |
|---|---|
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists; or it has no domain of its own. |
| 503 | Deploy is not set up on this instance. |
curl -s -X DELETE "https://zdeploy.tech/api/v1/deploy/domains" -H 'Authorization: Bearer zda_...'
POST /api/v1/deploy/selftest
Checks, as your app, every service that is switched on for it, and says what worked. You never hold the app key, so you cannot test the services from your own shell; this is how you do it. It sends no mail, calls no model and uses no quota. Storage and Memory write one tiny object and remove it again.
Auth: deploy credential, Authorization: Bearer zda_.... The app's deploy service must be on.
Request: no body.
Response: 200. ok is true when no check failed. A check that failed is a result with "ok": false and a detail saying why, not an HTTP error. A result with "skipped": true was not checked (ok is true and does not count against the total): the app is not ready for that check yet. detail never holds a key or secret.
{
"data": {
"ok": false,
"results": [
{ "service": "storage", "ok": true, "detail": "Wrote, read back and deleted a tiny object. It was not recorded as an upload and used no quota." },
{ "service": "auth", "ok": false, "detail": "Sign-in is not ready: no auth-events URL is set (the app must serve one and zdeploy must know it)." },
{ "service": "jobs", "ok": true, "skipped": true, "detail": "The app is not live yet (status draft), so there is no public URL to call. Deploy it, then run this again." }
]
}
}
What each check does:
| Service | Check |
|---|---|
storage | Writes, reads back and deletes a tiny object. Not recorded as an upload; no quota. |
memory | Stores a marker in a temporary collection, finds it by search, drops the collection. |
auth | Hosted sign-in is on, a redirect URI is registered, and the auth-events URL is set and https. To try the sign-in page itself, use POST /api/v1/auth/test-user. |
email | A usable sender exists and its mail server accepts a connection. No mail is sent. |
jobs | The app's public URL answers (any answer below 500). Skipped until the app is live. |
maas | Which providers have a key (names only), or that the app runs on the free trial allowance. No model is called. |
verify | The syntax and typo checks answer correctly. No address is verified. |
abuse | Always on. The URL guard refuses a loopback address. |
deploy | The credential check. It passes when your zda_... credential was accepted, which it must have been for you to get an answer at all, and says whether the app is live or still a draft. It tests no other service. |
Results list the services you switch (auth, email, maas, memory, storage, jobs, verify) that are on, plus abuse (always on) and deploy (your credential). Every one has a check; only jobs is skipped, until the app is live.
Errors:
| Status | When |
|---|---|
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked, unused for 90 days, or its app is suspended. "error":"idle": AI access is paused; see After a pause. |
| 403 | The deploy service is off for this app. |
| 404 | The app no longer exists. |
| 503 | Deploy is not set up on this instance. |
curl -s -X POST "https://zdeploy.tech/api/v1/deploy/selftest" \
-H 'Authorization: Bearer zda_...'
GET /api/v1/services
zdeploy's services catalog: every service built into zdeploy, with what it does, when to use it and when not to, what it costs, how to switch it on and its docs page. Read it before you build anything the app needs (sign-in, email, AI, search, files, scheduled work, forms, rate limits): if a service covers it, use it rather than building your own or adding another provider. With the app's credential, each entry also says whether the service is on for the app, its tier and its usage, and billing says what the app costs a month. Changes nothing. MCP: get_services.
Auth: none needed for the catalog. With a deploy credential (Authorization: Bearer zda_...) or the app's own API key (Authorization: Bearer or x-api-key), the answer adds the app's own state. An account credential (zdacc_...) names no app, so it gets the catalog alone.
Request: nothing.
Response: 200. Each entry in services:
| Field | Notes |
|---|---|
kind | capability: a service zdeploy runs, shared across apps, that the app calls with its app key. |
key, title, summary | The service; key is what services/enable takes. |
useFor, notFor | When to reach for it, and what to use instead when not. |
facts | What is easy to get wrong. |
price, tiers | What it adds to the app's base price; tiers lists each tier's covers and price, empty for a service with one price. |
switchOn | How to switch it on, or that it is on already for every new app. |
docs | Its docs page, as markdown. |
With the app's credential, each entry also has enabled, and tier, used and limit (null for a service that is off; limit is 0 when no limit is shown). unit is bytes for storage and memory, count for the rest. data.app names the app, and billing.total is its monthly price with what is on.
{
"data": {
"app": { "id": "cm3k2x9p40001qw3r5t7y9u1i", "name": "my-app" },
"services": [
{
"kind": "capability",
"key": "email",
"title": "Email",
"summary": "Transactional email as a single POST, ...",
"useFor": ["Mail the app's server sends: welcome emails, receipts, notifications, newsletters.", "..."],
"notFor": ["Sign-in codes: Auth sends those itself.", "..."],
"facts": ["..."],
"price": "Included in the base price up to ...",
"tiers": [{ "tier": "included", "label": "Included", "covers": "...", "price": "included" }],
"switchOn": "POST /api/v1/services/enable with {\"service\":\"email\"} and the deploy credential (MCP: service_enable).",
"docs": "https://zdeploy.tech/docs/email.md",
"enabled": true,
"tier": "Included",
"used": 12,
"limit": 1000,
"unit": "count"
}
],
"billing": { "base": "€…/month", "total": "€…/month" }
}
}
Without a credential there is no app, no per-app fields and no billing.total.
Errors:
| Status | When |
|---|---|
| 401 | A wrong credential, or a deploy credential that is revoked or unused for 90 days. "error":"idle": AI access is paused; see After a pause. |
| 404 | The app no longer exists. |
curl -s "https://zdeploy.tech/api/v1/services"
curl -s "https://zdeploy.tech/api/v1/services" -H 'Authorization: Bearer zda_...'
POST /api/v1/services/enable
Switches a service on for the app. Do it before you write code for the service: until then its endpoints answer 403.
Auth: deploy credential, Authorization: Bearer zda_.... The app API key and the account credential are refused. The running app cannot switch a service on: run this once from your own shell, and if the app itself gets a 403 from a service, tell the person building it.
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
service | string | yes | One of auth, email, maas, memory, storage, jobs, verify, forms. abuse is accepted but changes nothing: abuse control is always on. Nothing else can be switched here. |
A service switched on for the first time starts on its included tier. One switched back on keeps the tier and usage it had. The call never moves the app to a paid tier. Switching a service on can add to the app's monthly price: price is what this tier adds (null when it adds nothing), and GET /api/v1/services shows the new monthly total. The person pays: before switching on a service whose tier adds to the price, read GET /api/v1/services and ask them.
Response: 200. changed is false when it was already on. quota is the tier's limit as text, or null.
{
"data": {
"service": "email",
"title": "Email",
"changed": true,
"tier": "included",
"label": "Included",
"quota": "1,000 emails/month",
"price": null
}
}
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object, or service is not a service name ("x" is not a service that can be switched. The ones you can switch are: ... Abuse control is always on.); or Invalid JSON body. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked or unused for 90 days. "error":"idle": AI access is paused; see After a pause. |
| 404 | The app no longer exists. |
curl -s -X POST "https://zdeploy.tech/api/v1/services/enable" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"service":"email"}'
POST /api/v1/services/disable
Switches a service off for the app. Its endpoints start answering 403. Stored data is not deleted and still counts toward billing.
Auth: deploy credential, Authorization: Bearer zda_.... The app API key and the account credential are refused.
Request: JSON body.
| Field | Type | Required | Notes |
|---|---|---|---|
service | string | yes | One of auth, email, maas, memory, storage, jobs, verify, forms. abuse cannot be switched off: abuse control is always on, and the call gets 400. |
Response: 200. changed is false when it was already off. hasData is true when the service has recorded usage.
{ "data": { "service": "storage", "title": "Storage", "changed": true, "hasData": true } }
Errors:
| Status | When |
|---|---|
| 400 | The body is not a JSON object; service is not a service name; service is abuse (it cannot be switched off); or Invalid JSON body. |
| 401 | No deploy credential (an app API key is refused); or it is wrong, revoked or unused for 90 days. "error":"idle": AI access is paused; see After a pause. |
| 404 | The app no longer exists. |
curl -s -X POST "https://zdeploy.tech/api/v1/services/disable" \
-H 'Authorization: Bearer zda_...' \
-H 'Content-Type: application/json' \
-d '{"service":"storage"}'
POST /api/v1/report
Tells zdeploy that something on its side blocked you: an error you cannot fix, a step that does not work as documented, wrong docs. Report it, then tell the person you did.
Auth: none needed, so a failed sign-up can be reported too. An account credential or deploy credential in Authorization: Bearer links the report to the account or app; a revoked one still does. Nothing else about the credential is used.
Request: JSON body. Never put credentials, keys or the person's secrets in it; anything that looks like one is removed before it is stored.
| Field | Type | Required | Notes |
|---|---|---|---|
doing | string | yes | What you were trying to do. Cut to 2,000 characters. |
happened | string | yes | What happened instead. Cut to 4,000 characters. |
expected | string | no | What you expected. Cut to 2,000 characters. |
error | string | no | The exact error text. Cut to 8,000 characters. |
Response: 201.
{
"data": {
"id": "cm3k2xc7q0007qw3r2h5n8v4s",
"message": "Reported as cm3k2xc7q0007qw3r2h5n8v4s. zdeploy has it; tell the person you reported it and carry on where you can."
}
}
Errors:
| Status | When |
|---|---|
| 400 | doing or happened is missing or empty. |
| 429 | More than 5 reports a minute or 30 an hour from your IP address. |
| 500 | The report could not be stored. Tell the person what went wrong instead. |
curl -s -X POST "https://zdeploy.tech/api/v1/report" \
-H 'Content-Type: application/json' \
-d '{"doing":"deploying my-app","happened":"deploy/deploy returned 500","expected":"202 with a version","error":"Something went wrong on our side."}'
Limits and errors
| Limit | Value |
|---|---|
| Sign-in code lifetime | 10 minutes. Only the newest code for an address works. |
| Tries per code | 5, then the code is used up. |
get-started per IP address | 3 a minute, 10 an hour. |
| Codes per address | 1 a minute; at most 5 unused in an hour. |
| Code checks per IP address | 30 an hour, shared by get-started/verify and apps/create. |
apps/create code checks per account credential | 10 an hour. |
| Free app creation after sign-up | 1 app, within 15 minutes of get-started/verify. |
| Live account credentials | 5 per account. A sixth sign-in revokes the oldest. |
| Live deploy credentials | 5 per app. |
| Unused credentials | An account or deploy credential unused for 90 days stops working for good. |
| Paused AI access | After the account's idle timeout (the person sets it in the console), every builder credential is paused until signup/revalidate. At most one code to the inbox every 5 minutes. |
signup/revalidate code checks | 10 an hour per credential, and the 30 an hour per IP address. |
| App name | 1 to 100 characters, unique in the account. |
| Secrets added through the API | 50 per app; value up to 16,384 characters. |
| Components per app | 10. |
deploy/logs | tail up to 500 app lines, or 50 deploy events. |
report per IP address | 5 a minute, 30 an hour. |
What to do on each error.
- 401
idle: ask the person for the code just emailed and send it tosignup/revalidate. - 401 on an account credential, not
idle: it is wrong, revoked (a sixth sign-in revokes the oldest) or 90 days unused. Sign in again withget-startedandget-started/verify. - 401 on a deploy credential, not
idle: it is wrong, revoked or its app is suspended. With the account credential, callPOST /api/v1/apps/:id/deploy-credential. Without one, ask the person for an AI setup link from the console. - 400 invalid or expired code: ask the person to check it. Only the newest code works. After 5 wrong tries, ask for a new one.
- 402 from a call made with the app key (
ZDEPLOY_API_KEY), on any service: the app's trial has ended, and every call with its key is refused until the person adds a card in the console. Tell them. Do not retry. The console and your credentials keep working. Users who already have an account still sign in to the app; new users cannot sign up until the trial is paid for. - 403
deployservice off: tell the person to switch Deploy on for the app in the console. You cannot. - 403 on
apps/create: ask the person for a fresh code fromapps/create/code. - 404 the app no longer exists: stop and ask the person. Do not create a new app without asking.
- 409 on
apps/create: the name is taken. The code is not spent, so pick a new name and send the same code. - 409 on
deploy/env: the name is a secret the owner set, or a plain variable on a component. Pick another name, or ask the owner; you can replace or delete only secrets you set yourself. - 409 on
deploy/deploy: readdeploy/status. If a version is deploying, wait; if the build has not passed, fix it first. - 429 rate limit: wait the seconds the message gives, then retry once.
- 429 on
deploy/deploy(quota or subscription): tell the person. Do not retry. - 500, 502, 503: wait a minute and retry once. If it repeats, call
report.
Almost every failure is { "error": "..." } with a message meant to be acted on. Two cases differ: a streamed chat reply that fails after it has started has no error event (the connection ends before data: [DONE]), and POST /api/v1/security/url-check answers 200 with safe: false and a reason for a URL it refuses. A 401 from apps, apps/create, apps/create/code, apps/:id/deploy-credential, git/credentials, signup/revalidate, services/enable, services/disable and the deploy/* endpoints carries WWW-Authenticate: Bearer realm="zdeploy". A rate-limit 429 from a per-IP or per-credential limit names how many seconds to wait. The two about emailed codes give no number: wait a minute before you ask for another code, or use the newest code already sent. No 429 sends a Retry-After header. The quota 429 from deploy/deploy is not a rate limit: retrying soon does not help.
zdeploy records each error the signup, apps, git and deploy endpoints return (the route, status and error text, never your request body) so it can see what blocks builders.
Gotchas
- Use the right credential.
zdacc_...works only onapps,apps/create,apps/create/code,apps/:id/deploy-credential,git/credentialsandsignup/revalidate.zda_...works on thedeploy/*andservicesendpoints andsignup/revalidate. A credential on the wrong endpoint gets401. zdacc_andzda_go inAuthorization: Beareronly."error":"idle"is not a bad credential. Do not ask for a new one: ask the person for the code just emailed and send it tosignup/revalidate. Its answer carries a new git push remote. Agit pushrefused as unauthorised after a quiet spell is the same pause: git cannot say so, so make any API call (deploy/statuswith a deploy credential,GET appswith an account credential), which answersidleand sends the code.- Do not send
codefor the first app after sign-up. The sign-up code was spent byget-started/verify; sending it again gets403. Leavecodeout and the credential's free creation is used. - A taken name does not spend the code.
apps/createchecks the name before the code, so a409leaves the code (or the free creation) for the next try. You can still readGET /api/v1/appsfirst. - Only the newest code works. If a call answers
idle, zdeploy has just sent a new code. Ask the person for that one, not for a code they gave you before. - The address follows the name. If another app already has that address, a number is added. Read
urlfrom the response; do not build it yourself. - Wait for the repo before you clone.
apps/createreturns before the repo exists. Polldeploy/statusuntilsetupshowsrepo: doneandcode: done. git/credentialsrevokes the previous git credential. Rungit remote set-url origin <remote>in every existing clone.- A built push deploys itself once the app is live, unless the owner turned auto-update off. Check
deploy/statusbefore you calldeploy/deploy: if a new version is already deploying, a deploy credential gets409, and if it is already live, deploying again makes another version of the same commit. - You can fix a secret you set; not the owner's. Send
deploy/envagain to replace a secret a deploy credential set, orDELETE deploy/envto remove it. A secret the owner set in the console answers409: ask the owner. Each applies on the next deploy, as doesdeploy/services. - You cannot set the sign-in variables. zdeploy sets
ZDEPLOY_AUTH_ISSUERandZDEPLOY_AUTH_CLIENT_IDin the app, and refuses an env or secret of either name: they decide which tokens the app trusts. - The app's own address is
ZDEPLOY_APP_URL. zdeploy sets it in the app (theurlfromdeploy/status, for examplehttps://my-app.on.zdeploy.tech). Read it for redirect URIs and canonical links instead of hard-coding the address or storing your ownAPP_URL. - Switch a service on before you write code for it. A new app has sign-in, AI models and abuse control on; every other service answers
403untilservices/enable. - Switching a service off keeps its data, and the data still counts toward billing. Delete the data through the service's own endpoints first if you mean to stop paying for it.
- Text in build logs and deploy events is scrubbed. Anything that looks like a host name or IP address becomes
[host]or[address], and that includes file names such aspackage.jsonorsrc/index.ts. Find the file from the line's other text. - While zdeploy is on a waiting list,
get-startedstill answers200for every address, butget-started/verifyrefuses an address with no account (403). Stop and tell the person to join the waiting list; a new code will not help.