POST
/v1/projects/{projectId}/branchesCreate a branch⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️
Creates a Branch under the specified Project. The first Branch in a Project is always created with isDefault=true and role=production regardless of the body value. Later Branches are created with role=preview. Setting isDefault=true while another Branch already holds the default atomically swaps the default flag only.
Parameters
projectIdstringpathrequiredRequest body
application/json
object
gitNamestringrequiredisDefaultboolean{
"gitName": "string",
"isDefault": true
}Responses
object
dataobjectrequiredShow child attributes
createdAtstring · date-timerequiredgitNamestringrequiredidstringrequiredisDefaultbooleanrequiredprojectobjectrequiredThin reference to the parent Project. Member resources are intentionally NOT inlined — list /v1/databases?branchId=<br_xxx> or /v1/apps?branchId=<br_xxx> instead (see API design principles "Flat and Hierarchical Coexistence").
Show child attributes
idstringrequirednamestringrequiredurlstring · urirequiredrolestringrequiredtypestringrequiredupdatedAtstring · date-timerequiredurlstring · urirequired{
"data": {
"createdAt": "2026-06-09T00:00:00Z",
"gitName": "string",
"id": "string",
"isDefault": true,
"project": {
"id": "string",
"name": "string",
"url": "https://example.com"
},
"role": "preview",
"type": "branch",
"updatedAt": "2026-06-09T00:00:00Z",
"url": "https://example.com"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}