Skip to content

Restore a scheduled branch deletion

post/v1/branches/{branch_id_or_ref}/restore

Cancels scheduled deletion and restores the branch to active state

OAuth scopes

  • environment:write

The fine-grained token must include the following permissions to access this endpoint:

  • branching_development_write
  • or
  • branching_production_write

Path parameters

  • branch_id_or_ref
    Required
    any of the following options

    Branch ref or deprecated branch ID

Response codes

  • 201
  • 401
  • 403
  • 429
  • 500

Response (201)

{
"message": "Branch restoration initiated"
}
{
"type": "object",
"properties": {
"message": {
"type": "string",
"enum": [
"Branch restoration initiated"
]
}
},
"required": [
"message"
]
}