Menu
Platform
AI
Alerts and status pages
App store purchases
Credits
Generated Assets
Knowledge
KV
Localization
Notifications
Organizations
Payments
Queues
Realtime
Sandboxes
Storage
Workflows
API reference
- Overview
- Access API keys
- Agent sessions API
- Agent versions API
- Agents API
- AI models API
- Artifact references API
- Artifacts API
- Assets API
- Auth configs API
- Bank receipts API
- Bank transfer accounts API
- Buckets API
- Builds API
- Catalogs API
- Chat profiles API
- Chat reports API
- Chat sticker packs API
- Checkout policies API
- Checkout sessions API
- Config changes API
- Config flags API
- Config segments API
- Connection providers API
- Connections API
- Connectors API
- Credit grants API
- Customer organizations API
- Customer subscriptions API
- Databases API
- Documents API
- Email domains API
- End users API
- Entities API
- Entitlement grants API
- Entries API
- Environments API
- Episodes API
- Error events API
- Error groups API
- Events API
- Exchange rates API
- Generations API
- Glossaries API
- Goals API
- Identities API
- Inbound emails API
- Inbound endpoints API
- Inbound messages API
- Inbound sms API
- Invitations API
- Job runs API
- Jobs API
- Knowledge schemas API
- KV API
- KV namespaces API
- Lease events API
- Leases API
- Licence keys API
- Licence tokens API
- Mail domains API
- Mail routes API
- Mailbox connect links API
- Mailbox OAUTH apps API
- Mailboxes API
- Memberships API
- Memories API
- Memory stores API
- Merchant accounts API
- Message topics API
- Messages API
- OAUTH clients API
- Objects API
- Organization roles API
- Orgs API
- Owner pools API
- Phone numbers API
- Portal sessions API
- Preferences API
- Price catalogs API
- Processor events API
- Projects API
- Queued executions API
- Queues API
- Realtime channels API
- Realtime members API
- Realtime messages API
- Recipients API
- Relations API
- Releases API
- Revenue API
- Revenue facts API
- Revenue sources API
- Runs API
- Sandbox shapes API
- Schedules API
- Scrubbing policies API
- Search API
- Search indexes API
- Secret versions API
- Secrets API
- Service enablements API
- Service observations API
- Services API
- Serving routes API
- Session events API
- Sessions API
- Signing key versions
- Signing keys
- Sms numbers API
- Source maps API
- Spaces API
- Store connections API
- Store purchases API
- Subscriptions API
- Suppressions API
- Tax threshold statuses API
- Templates API
- Test clocks API
- Token exchanges API
- Transfers API
- Trust policies API
- Trusted issuers API
- Uptime checks API
- Uptime manifests API
- Uptime sources API
- Usage events API
- Usage invoices API
- Usage meter prices API
- Usage meters API
- Usage reservations API
- Usage settings API
- Usage tiers API
- Volumes API
- Waits API
- Webhook deliveries API
- Webhook endpoints API
- Workflows API
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Deploys
How code reaches production, and how to undo it.
A deploy is not a command. A push to the branch a Service ships from is read by the platform, built, released and rolled out — and each of those stages is something you can watch and, where it matters, stop.
#What a push starts
- Source is read at an exact commit. The project's forge connection mints a token narrowed to that one repository; a webhook is only a latency hint, never the authority for a build.
- Build turns the commit into an image, and the image is identified by its digest from then on.
- Release. A Release is the immutable desired state of the environment's workloads. Writing a newer Release supersedes the live one; it is never edited.
- Rollout. The new generation is served to the Cell that runs your Service. Waves — a canary Cell, one Cell, one region, all — are planned: one Cell answers today, so there is no canary ring to wait on yet. The generation is still checked at the moment of write, and a stale one is refused.
Today this runs on the management API
Deploys run on the management API, and every call on this page is served there. The service_rollouts, previews and source_links collections in the API reference are a different, collection-style surface and are not part of this page.
#Watching a deploy
Each environment has a status and a history. Read them with the environment's
id (env_…):
sylphx api GET /v1/deployments/projects/$ENV_ID/status
sylphx api GET /v1/deployments/projects/$ENV_ID/deployments
sylphx api GET /v1/deployments/builds/$BUILD_ID
sylphx api GET /v1/projects/$PROJECT_ID/logsstatus is running once the app is live and unhealthy when the deploy
failed. A build names its commit, its image and its timing, and the logs say
why a deploy stopped.
#Start one by hand
A push starts a deploy by itself. To start one without a push:
sylphx api POST /v1/projects/$PROJECT_ID/deploy -d '{"envType":"production"}'force rebuilds even when the commit has not changed, and serviceName
limits the deploy to one service.
#Redeploy and roll back
A redeploy mints a new Release from the environment's current commit. Pass a
commit to deploy a commit that has already been built; one that is not
fully built is refused, and so is a redeploy while another release is in
flight.
sylphx api POST /v1/projects/$PROJECT_ID/environments/$ENV_ID/deployments/redeploy -d '{"commit":"<sha>"}'To undo the last deploy, roll back. One call puts the previous deploy's artifacts back without a build, keeps your current environment variables, and records your reason:
sylphx api POST /v1/projects/$PROJECT_ID/environments/$ENV_ID/deployments/rollback -d '{"reason":"5xx after deploy"}'The commit you rolled back from is not deployed again by itself; your next push, or a redeploy, moves the environment on.
Rolling back is not a revert
The Release names older digests, so the code is what it was. The database is not: migrations that ran since are still applied. Migrations has the shapes that survive a rollback.
#Pause an environment
Pausing stops new deploys from moving the environment while you investigate:
sylphx api POST /v1/projects/$PROJECT_ID/environments/$ENV_ID/deployments/pause -d '{"paused":true,"reason":"investigating an incident"}'{"paused":false,"reason":"…"} lets deploys move again, and a GET on the
same path reads the current state.
#Previews
An environment of type preview is where pull-request deploys land. A project
is created with one, and preview databases are branched per environment with
/v1/projects/$PROJECT_ID/preview-envs/$ENV_ID/branch-db. Give a preview its
own data — a preview that writes to the production database is a production
deploy with extra steps.
#Custom domains
A domain belongs to a project and is attached to an environment. Add the domain, then attach a hostname to a service:
sylphx api POST /v1/projects/$PROJECT_ID/domains -d '{"apexDomain":"example.com","envType":"production"}'
sylphx api POST /v1/projects/$PROJECT_ID/domains/$DOMAIN_ID/hostnames -d '{"hostname":"shop.example.com","serviceId":"$SERVICE_ID","isPrimary":true}'
sylphx api POST /v1/projects/$PROJECT_ID/domains/$DOMAIN_ID/hostnames/$HOSTNAME_ID/checkcheck reads the DNS records now. Certificates are issued and renewed once
the hostname is verified. The full walk-through is the
Network quickstart.
#Self-hosted runners
Builds run on platform runners by default. To register your own machines, see Runners.