Skip to main content
POST
/
database
/
v1
/
projects
/
{id}
/
branches
curl -X POST "https://api.case.dev/database/v1/projects/%3Cstring%3E/branches" \ -H "Authorization: Bearer $CASEDEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "<string>" }'
{
  "id": "branch_staging_456",
  "name": "staging",
  "parentBranchId": "branch_main_123",
  "isDefault": false,
  "status": "active",
  "createdAt": "2025-01-15T10:30:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.case.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Path Parameters

id
string
required

Database project ID

Body

application/json
name
string
required

Branch name (letters, numbers, hyphens, underscores only)

Pattern: ^[a-zA-Z0-9_-]+$
parentBranchId
string

Parent branch ID to clone from (defaults to main branch)

Response

Branch created successfully

id
string
required

Branch ID

name
string
required

Branch name

parentBranchId
string | null
required

Parent branch ID

isDefault
boolean
required

Whether this is the default branch (always false for new branches)

status
string
required

Branch status

createdAt
string<date-time>
required

Branch creation timestamp