HelipodDocs

Branches

Give each environment its own copy of the database.

A branch is a full copy of the database at the moment it is created, with its own connection string and its own compute. Changes in one branch never touch another. Branches are copy-on-write, so a new branch is ready in seconds whatever the size of the data.

  • Production uses the primary branch. Every other branch is created from it (or from another environment you choose).
  • When the database is created, every environment the project has gets a branch. Add a branch for an environment created later with the call below.

List

GET/databases/{databaseId}/branches
{
  "success": true,
  "data": [
    { "environmentId": "e1d4a0f2-6c11-4a9e-8a0e-5f2b7d1c9a33", "environmentName": "production", "name": "production", "isPrimary": true, "status": "ready", "createdAt": "2026-10-16T08:00:00.000Z" },
    { "environmentId": "7c2f9e10-1d4b-4a8e-b6a1-0e9d3c5f2a71", "environmentName": "staging", "name": "staging", "isPrimary": false, "status": "ready", "createdAt": "2026-10-16T09:12:00.000Z" }
  ]
}

Create

POST/databases/{databaseId}/branches
Creates the environment's branch. Returns 201 with the branch.

Prop

Type

curl -X POST https://api.helipod.io/api/databases/$DB/branches \
  -H "Authorization: Bearer hel_your_key" -H "Content-Type: application/json" \
  -d "{ \"environmentId\": \"$STAGING\" }"

If the environment already has a branch, it is returned unchanged. To start staging again from fresh production data, delete its branch and create it again.

Delete

DELETE/databases/{databaseId}/branches/{environmentId}
Deletes the environment's branch and its data.

The primary branch can't be deleted, because every other branch is created from it. Delete the whole database instead.

Typical flow

  1. Create a staging environment in the project.
  2. POST /branches with its id: staging now has a copy of production.
  3. Read /connection?environmentId= for staging and set it as DATABASE_URL on the staging service.
  4. Test migrations on staging with SQL (environmentId = staging) before running them on production.

On this page