Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Get a branch

GET/v1/branches/{branchId}Get a branch

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Returns a single Branch by ID. Member resources are not inlined — list them via /v1/databases?branchId= and /v1/apps?branchId=.

Parameters

branchIdstringpathrequired

pattern ^(br_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Responses

200Returned the Branch.application/json
object
dataobjectrequired
Show child attributes
createdAtstring · date-timerequired
gitNamestringrequired
idstringrequired

pattern ^(br_)([cC][^\s-]{8,}|[a-z0-9]+)$

isDefaultbooleanrequired
projectobjectrequired

Thin 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
idstringrequired
namestringrequired
urlstring · urirequired
rolestringrequired

one of "production", "preview"

typestringrequired

const "branch"

updatedAtstring · date-timerequired
urlstring · urirequired
Example response
{
  "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"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Branch not found.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu