Docs
BlogHomeStart building

Publishing

Move the development version to production.


Every prompt changes the development preview only. Publishing builds the current version, applies its pending database migrations to the live database, and puts it on the live address (<projectId>.totalum-project.com and the custom domain). Publishing is asynchronous: start it, then poll Get Deployment Status every 10–15 seconds.

#Deploy to Production

POST/api/v1/vcaas/projects/:projectId/deployments/deployapi-key0.5 credits

Publish the project's current version. It takes about 2 to 5 minutes. If the build or a migration fails, Totalum's agent tries to repair it once or twice before the publish ends in error; the live site keeps serving the previous version until a publish succeeds.

Migrations that delete data. A migration that drops a table or column, or deletes or overwrites existing live rows, runs only when the prompt that made it asked for it, or when you publish with confirmDestructive: true. Otherwise the publish ends in error with DESTRUCTIVE_MIGRATION_NEEDS_CONFIRMATION and nothing changes on live. Rows already in the live database that break a new rule end the publish with the list of those rows; Totalum never changes production data on its own.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Body parameters

FieldTypeRequiredDescription
confirmDestructivebooleanNotrue = run the pending migrations that drop columns or tables or delete/overwrite live rows

Response fields

FieldTypeDescription
data.projectIdstringProject id
data.statusstring"deploying"
data.deploymentIdstringThis publish
data.messagestringHow to follow it

Example request

curl -X POST -H "api-key: tlm_sk_your_key" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/deployments/deploy
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "projectId": "barber-bookings",
    "status": "deploying",
    "message": "Deployment started. It will take from 2 to 5 minutes depending on project size. Fetch GET /api/v1/vcaas/projects/barber-bookings/deployments/status every 10-15 seconds to track progress.",
    "deploymentId": "dep_01k6xf3a9b"
  }
}

Error codes

CodeHTTPMeaning
AGENT_RUNNING409A prompt is running; publish when it is done
DEPLOYMENT_RUNNING409A publish is already running
OPERATION_IN_PROGRESS409A restore, import or other long operation holds the project, or it is still being set up
INSUFFICIENT_CREDITS402Not enough credits
PROJECT_CREDIT_LIMIT_REACHED403The project's monthly development cap is reached
End of Deploy to ProductionNext endpointGETGet Deployment Status

#Get Deployment Status

GET/api/v1/vcaas/projects/:projectId/deployments/statusapi-keyFree

The newest publish and where it is. Poll every 10–15 seconds until status is "success" or "error".

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Response fields

FieldTypeDescription
data.statusstring | null"deploying", "success", "error", or null if never published
data.createdAtstring | nullWhen the publish started
data.deploymentIdstring | undefinedThe publish
data.stepstring | undefined"build", "migration", "upload", "probe", "fixing" (the agent is repairing a failed step) or "done"
data.progressobject | undefinedWhile step is "fixing": { stage: "fixing", failedStage, fixAttempt, fixAttempts }
data.errorDetailsobject | undefinedOn "error": { stage, title, message, logExcerpt, versionId, deploymentId?, migrationName?, fixSummary?, at } — fixSummary says what the repair tried and what you need to do
data.liveUrlstringThe live address

Example request

curl -H "api-key: tlm_sk_your_key" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/deployments/status
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "status": "success",
    "createdAt": "2026-10-08T11:20:00.000Z",
    "deploymentId": "dep_01k6xf3a9b",
    "step": "done",
    "liveUrl": "https://barber-bookings.totalum-project.com"
  }
}

When it is "success", the address to show is productionProjectUrl on Get Project (the custom domain once active).

End of Get Deployment StatusNext endpointPOSTUnpublish

#Unpublish

POST/api/v1/vcaas/projects/:projectId/deployments/unpublishapi-keyFree

Take the published site offline and remove the project's custom domain. The preview, the code, the databases and the versions stay. Publish again with Deploy to Production; a custom domain has to be added again. Free, at any balance.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Response fields

FieldTypeDescription
data.projectIdstringProject id
data.statusstring"unpublished"
data.customDomainsRemovedstring[]Domains removed
data.customDomainsFailedstring[]Domains that could not be removed (they serve nothing; call again to retry)
data.warningsstring[]Non-fatal problems
data.messagestringWhat happened

Example request

curl -X POST -H "api-key: tlm_sk_your_key" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/deployments/unpublish
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "projectId": "barber-bookings",
    "status": "unpublished",
    "customDomainsRemoved": [],
    "customDomainsFailed": [],
    "warnings": [],
    "message": "The project is offline: its published site, preview snapshot and custom domains were removed. Deploy again to publish it; custom domains have to be added again."
  }
}

Error codes

CodeHTTPMeaning
DEPLOYMENT_RUNNING409A publish is running and would put the site back; wait until it ends, then retry
End of Unpublish Back to top