Skip to content
Proud to collaborate with Microsoft for Startups

neon.branches.delete ​

Delete a Neon branch by project + branch ID

Delete a Neon branch by project + branch ID.

Inputs:

  • neon_project_id: Neon project ID (required).
  • neon_branch_id: Neon branch ID to delete (required).

Outputs (terminal state_data):

  • neon_project_id: str — the project ID
  • neon_branch_id: str — the deleted branch ID
  • deleted: bool — true on success (including idempotent 404)

Idempotency: HTTP 404 (branch already gone) is treated as success. Primary branch cannot be deleted — Neon returns HTTP 409, mapped to a non-retryable error.

Compensation: branch deletion is destructive; recreate via neon.branches.create from a snapshot if needed. Plugin required: context.get_plugin("neon") must expose .api_token.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryBase
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—Cloud connection holding the Neon credential
neon_project_idstringYes—Neon project ID
neon_branch_idstringYes—Neon branch ID

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo——
neon_project_idstringNo——
neon_branch_idstringNo——
deletedbooleanNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "neon.branches.delete",
  "initial_data": {
    "neon_project_id": "value",
    "neon_branch_id": "value"
  }
}