Docs
BlogHomeStart building

Versions

Every change is a version. Browse them, compare them, roll back.


Every change to a project's code is saved as a version: each prompt that changed files, each file write through the API, each visual edit, GitHub pull, import and restore. Restoring a version changes the development preview; publish to put it live.

#List Versions

GET/api/v1/vcaas/projects/:projectId/versionsapi-keyFree

The project's versions, newest first.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Query parameters

FieldTypeRequiredDescription
limitnumberNo1–100 (default 20)
skipnumberNoVersions to skip (default 0)

Response fields

FieldTypeDescription
data.versionsobject[]The versions
data.versions[]._idstringVersion id — for Recover Version
data.versions[].namestringDisplay name
data.versions[].commitShastringCommit of the version — for Get Version Diff
data.versions[].commitMessagestring | undefinedCommit message
data.versions[].promptstring | undefinedThe prompt that produced it (first 300 characters)
data.versions[].gcsUploadedbooleantrue once the version's archive is stored
data.versions[].recoveredVersionIdstring | undefinedWhen this version is a restore: the version it restored
data.versions[].createdAtstringISO 8601
data.versions[].updatedAtstringISO 8601 (same as createdAt)
data.totalCountnumberTotal versions

Example request

curl -H "api-key: tlm_sk_your_key" \
  "https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/versions?limit=20"
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "versions": [
      {
        "_id": "ver_01k6xd2m8q",
        "commitSha": "9f2c1ab4d3e5f60718293a4b5c6d7e8f90a1b2c3",
        "commitMessage": "Add a contact form",
        "prompt": "Add a contact form that emails me every message",
        "gcsUploaded": true,
        "createdAt": "2026-10-08T11:15:40.000Z",
        "updatedAt": "2026-10-08T11:15:40.000Z",
        "name": "Version 4"
      }
    ],
    "totalCount": 4
  }
}

#Get Version Diff

GET/api/v1/vcaas/projects/:projectId/version-diffapi-keyFree

The unified diff (git diff format) a version introduced.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Query parameters

FieldTypeRequiredDescription
commitShastringYesThe version's commitSha, 7–40 hexadecimal characters

Response fields

FieldTypeDescription
data.commitShastringThe commit
data.diffstringThe diff; "" when nothing tracked changed

Example request

curl -H "api-key: tlm_sk_your_key" \
  "https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/version-diff?commitSha=9f2c1ab"
Success · 200 OK
json
{ "errors": null, "data": { "commitSha": "9f2c1ab", "diff": "diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx\nnew file mode 100644\n+export default function Contact() {\n" } }

Error codes

CodeHTTPMeaning
MISSING_COMMIT_SHA400commitSha is missing
INVALID_COMMIT_SHA400Not 7–40 hexadecimal characters
VERSION_NOT_FOUND404No version with this commit

#Recover Version

POST/api/v1/vcaas/projects/:projectId/versions/:id/recoverapi-key2 credits

Restore an earlier version's code as a new version, deployed to the preview. It runs in the background (1–4 minutes): poll Get Project until versionRecovery is null (on failure it shows status: "error" with errorMessage).

The database is never rolled back by a code restore: the restored code keeps working on the current schema (a column it needs that a later change dropped is added back, empty). Send restoreDevDatabase: true to also put the development database back to that version's time.

Path parameters

ParameterTypeDescription
projectIdstringThe project id
idstringThe version's _id

Body parameters

FieldTypeRequiredDescription
restoreDevDatabasebooleanNoAlso restore the development database to the version's time (a restore point is taken first)

Response fields

FieldTypeDescription
data.messagestring"Version recovered successfully" — the restore has started

Example request

curl -X POST -H "api-key: tlm_sk_your_key" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/versions/ver_01k6xd2m8q/recover
Success · 200 OK
json
{ "errors": null, "data": { "message": "Version recovered successfully" } }

Error codes

CodeHTTPMeaning
VERSION_NOT_FOUND404No such version
AGENT_RUNNING409A prompt is running
DEPLOYMENT_RUNNING409A publish is running
OPERATION_IN_PROGRESS409Another restore or long operation is running
INSUFFICIENT_CREDITS402Not enough credits

#Clear Recovery Marker

DELETE/api/v1/vcaas/projects/:projectId/versions/recoveryapi-keyFree

Clear versionRecovery on the project after a failed restore, so it no longer shows. A restore that is really running ends by itself; never more than 25 minutes.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Response fields

FieldTypeDescription
data.clearedbooleanfalse when there was nothing to clear
data.wasRunningbooleanThe cleared restore had started less than 10 minutes ago
data.previousStatusstring | undefinedIts status before clearing
data.messagestringWhat to do next

Example request

curl -X DELETE -H "api-key: tlm_sk_your_key" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/versions/recovery
Success · 200 OK
json
{ "errors": null, "data": { "cleared": true, "wasRunning": false, "previousStatus": "error", "message": "Cleared. Restart, deploy, prompts and a new recovery are allowed again." } }
End of Clear Recovery Marker Back to top