Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Soft-delete a branch

DELETE/v1/branches/{branchId}Soft-delete a branch

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

Soft-deletes a Branch (sets deletedAt). Refuses if the Branch is the Project's current default, the Project's production Branch, or has live members.

Parameters

branchIdstringpathrequired

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

Responses

204Branch soft-deleted.
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"
  }
}
409Branch still has live member resources.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
422Branch is the Project's current default or production Branch.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu