Project Transfer
Export a project and import it into another, on the same or a different account.
Project transfer lets you clone a project — its database and source code — into another project, on the same or a different account. Export returns a secret importCode; whoever holds it can import the project. This is not part of the normal build workflow.
POST /projects/{sourceProjectId}/export→ savedata.importCode.POST /projects→ create a NEW empty target project.POST /projects/{targetProjectId}/importwith{ "importCode": "<the code>" }.- Poll
GET /projects/{targetProjectId}every 10-15s untilagentServerStatus: "Active"— the target is now a clone of the source.
#Export Project
/api/v1/vcaas/projects/:projectId/exportUses creditsExport this project's database (excluding secrets/sandbox/auth/users/tokens/org) plus a reference to its source code, and get a secret import code. Rate limit: 1 per minute, 5 per hour.
Path parameters
| Parameter | Type | Description |
|---|---|---|
:projectId | string | The project ID to export |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
includeRecords | boolean | No | Default false. true also exports table data records; false exports only schema/pages/config |
Response fields
| Field | Type | Description |
|---|---|---|
data.importCode | string | Secret code to import this project. SECRET — anyone with it can import the data + source |
data.includeRecords | boolean | Whether data records were included |
data.message | string | Human-readable confirmation |
Example request
curl -X POST \
-H "api-key: tlm_sk_your_key" \
-H "Content-Type: application/json" \
-d '{"includeRecords":false}' \
https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/export{
"errors": null,
"data": {
"importCode": "my-app-export-project-8f3b1c9a47e2d650b9114af0c7e3a2d1.zip",
"includeRecords": false,
"message": "Export ready. Save the importCode and keep it secret..."
}
}{
"errors": {
"errorCode": "INSUFFICIENT_CREDITS",
"errorMessage": "Not enough credits"
},
"data": null
}Error codes
| Code | HTTP | Meaning |
|---|---|---|
PROJECT_EXPORT_LIMIT_REACHED | 400 | Rate limit reached (1/min, 5/hour) |
INSUFFICIENT_CREDITS | 402 | Not enough credits |
PROJECT_NOT_FOUND | 404 | Project not found or not owned by you |
#Import Project
/api/v1/vcaas/projects/:projectId/importUses creditsImport a project from an importCode into THIS (almost empty) project: restores the database, sets up the source code, then builds and runs it. Returns immediately; the restore + rebuild run in the background (a few minutes). Existing data is always dropped before restoring. Rate limit: 1 per minute, 5 per hour.
The target project must be (almost) empty — at most 5 database tables and at most 1 version. While importing, prompting the agent returns IMPORT_IN_PROGRESS. After calling import, poll GET /projects/{projectId} every 10-15s until agentServerStatus is "Active" and a preview URL is present.
Path parameters
| Parameter | Type | Description |
|---|---|---|
:projectId | string | The target project ID to import into |
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
importCode | string | Yes | The importCode returned by the export endpoint (any project) |
Response fields
| Field | Type | Description |
|---|---|---|
data.projectId | string | The target project ID |
data.status | string | Always "importing" |
data.message | string | Instructions to poll for completion |
Example request
curl -X POST \
-H "api-key: tlm_sk_your_key" \
-H "Content-Type: application/json" \
-d '{"importCode":"my-app-export-project-8f3b1c9a....zip"}' \
https://api-accounts.totalum.app/api/v1/vcaas/projects/my-new-app/import{
"errors": null,
"data": {
"projectId": "my-new-app",
"status": "importing",
"message": "Project import started. Poll GET /projects/:projectId until agentServerStatus='Active'."
}
}{
"errors": {
"errorCode": "PROJECT_NOT_IMPORTABLE",
"errorMessage": "Target already has content (>5 tables or >1 version). Use a fresh project"
},
"data": null
}Error codes
| Code | HTTP | Meaning |
|---|---|---|
MISSING_IMPORT_CODE | 400 | importCode is required |
PROJECT_NOT_IMPORTABLE | 400 | Target already has content (>5 tables or >1 version). Use a fresh project |
IMPORT_IN_PROGRESS | 400 | An import is already running for this project |
AGENT_RUNNING | 409 | Wait for the agent to finish before importing |
PROJECT_IMPORT_LIMIT_REACHED | 400 | Rate limit reached (1/min, 5/hour) |
INSUFFICIENT_CREDITS | 402 | Not enough credits |
