Project Branches

Create a contained project branch

Create an expiring branch project from the live project or a snapshot. The branch is materialized in a spare schema slot, receives a derived noindex host, copies auth identities, deploys the parent's live release, sandboxes email by default, and leaves scheduled functions disabled unless requested.

post/projects/v1/{project_id}/branches

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/projects/v1/{project_id}/branches
  • Auth: one of:
    • API key in header SIGN-IN-WITH-X
    • HTTP bearer

Path parameters

project_idstring required

Run402 project ID. Public IDs are not UUIDs.

Example:prj_1741340000_0042

Request body

from_snapshot_idstring
namestring
email_mode'sandbox' | 'off'
enable_cronboolean
ttl_daysnumber

Response

Branch created.

branch_project_idstring required

The branch project's Run402 project ID.

parent_project_idstring required

The parent project's Run402 project ID.

namestring required
branch_urlstring uri nullable
subdomainstring nullable
status'active' required
email_mode'sandbox' | 'off' required
enable_cronboolean required
expires_atstring date-time required
created_atstring date-time required

Example response

{
  "branch_project_id": "prj_1741340000_branch",
  "parent_project_id": "prj_1741340000_0042",
  "next_actions": [
    {
      "method": "POST",
      "path": "/tiers/v1/hobby",
      "auth": "x402"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.