Deployments

Create a production deployment

The same request from the CLI, the Node and Python SDKs, or plain HTTP. Every route authenticates with a token from RIVET_TOKEN and returns the deployment while it builds.

  1. 1Rivetlane checks out main at its latest commit and reads rivetlane.toml.
  2. 2The build runs with the production scope of your environment variables.
  3. 3The deployment is returned immediately with status: building; poll it or stream logs with rivet logs --follow.
  4. 4When the build passes, traffic moves to the new deployment with zero downtime.
Deployments API reference
Terminal
# Uses RIVET_TOKEN when set, otherwise your rivet login session$ rivet deploy --prod --project storefront
Output
→ Building storefront@a41c9e2 (main)✓ Build completed in 38s✓ Deployed to production  https://storefront.rivetlane.app  dpl_7Hq2xKfR · 41s
deploy.ts
import { Rivetlane } from "@rivetlane/sdk" const rivet = new Rivetlane({ token: process.env.RIVET_TOKEN }) const deployment = await rivet.deployments.create({  project: "storefront",  branch: "main",  target: "production",}) console.log(deployment.id, deployment.status)
Output
dpl_7Hq2xKfR building
deploy.py
import osfrom rivetlane import Rivetlane rivet = Rivetlane(token=os.environ["RIVET_TOKEN"]) deployment = rivet.deployments.create(    project="storefront",    branch="main",    target="production",) print(deployment.id, deployment.status)
Output
dpl_7Hq2xKfR building
Terminal
$ curl https://api.rivetlane.dev/v1/deployments \    -H "Authorization: Bearer $RIVET_TOKEN" \    -H "Content-Type: application/json" \    -d '{"project": "storefront", "branch": "main", "target": "production"}'
Response201 Created
{  "id": "dpl_7Hq2xKfR",  "project": "storefront",  "branch": "main",  "commit": "a41c9e2",  "target": "production",  "status": "building",  "url": "https://storefront-a41c9e2.rivetlane.app",  "created_at": "2026-10-09T14:02:11Z"}