Skip to content
Proud to collaborate with Microsoft for Startups

neon.branches.create ​

Create a Neon branch (fire-and-forget)

Creates a Neon branch (fire-and-forget).

Issues POST /projects/{neon_project_id}/branches against the Neon REST API (https://console.neon.tech/api/v2). Neon returns an operations[] array whose entries must reach finished, but this atomic does NOT poll — it returns immediately with the new branch id and the create operation id. The caller (orchestration C-03) composes neon.operations.wait (A-22) to block until the operation finishes. This keeps every base atomic uniformly 3-state.

UUID-only surface rule: connection_uuid is our identifying handle; Neon's own ids stay on the neon_<x>_id surface (neon_project_id, neon_branch_id, neon_operation_id). parent_id is a Neon branch id passed straight through.

Inputs:

  • connection_uuid: Cloud connection UUID for Neon credentials (required).
  • neon_project_id: Neon project id to create the branch in (required).
  • name: Optional branch name; Neon auto-names if omitted.
  • parent_id: Optional Neon branch id to branch from; defaults to the primary.

Outputs (terminal state_data):

  • neon_project_id: str — pass-through project id.
  • neon_branch_id: str — id of the newly created branch.
  • name: str — confirmed branch name.
  • is_primary: bool — whether the branch is the project's primary branch.
  • parent_id: str — Neon id of the parent branch.
  • neon_operation_id: str — id of the create operation; feed to A-22.
  • provider_metadata: dict — raw Neon branch object.

Plugin required: context.get_plugin("neon") must expose .api_token.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-neon
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidYes—Cloud connection UUID for Neon credentials
neon_project_idstringYes—Neon project id to create the branch in
namestringNo—Optional branch name; Neon auto-names if omitted
parent_idstringNo—Neon branch id to branch from; defaults to primary

Output Schema ​

FieldTypeRequiredDefaultDescription
neon_project_idstringNo——
neon_branch_idstringNo——
namestringNo——
is_primarybooleanNo——
parent_idstringNo——
neon_operation_idstringNo——
provider_metadatajsonNo——
connection_uuiduuidNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeCreate-branch request accepted
completedNoYesYes—Neon branch create accepted
failedNoYesNo—Neon branch creation failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedCreate Neon branch
* (any state)failfailedMark workflow failed

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "neon.branches.create",
  "initial_data": {
    "connection_uuid": "value",
    "neon_project_id": "value"
  }
}