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 ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-neon |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | Cloud connection UUID for Neon credentials |
neon_project_id | string | Yes | — | Neon project id to create the branch in |
name | string | No | — | Optional branch name; Neon auto-names if omitted |
parent_id | string | No | — | Neon branch id to branch from; defaults to primary |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
neon_project_id | string | No | — | — |
neon_branch_id | string | No | — | — |
name | string | No | — | — |
is_primary | boolean | No | — | — |
parent_id | string | No | — | — |
neon_operation_id | string | No | — | — |
provider_metadata | json | No | — | — |
connection_uuid | uuid | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Create-branch request accepted |
completed | No | Yes | Yes | — | Neon branch create accepted |
failed | No | Yes | No | — | Neon branch creation failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | Create Neon branch |
* (any state) | fail | failed | Mark workflow failed |
API Usage ​
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "neon.branches.create",
"initial_data": {
"connection_uuid": "value",
"neon_project_id": "value"
}
}