<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Deletes an active branch and discards its changes. Its code, its preview, and the entity and backend function changes made on it are removed, along with comments left on its preview. A deleted branch can't be restored.

After deletion, List branches no longer returns the branch, but Get branch still does, with status set to deleted. Its name is free to use again. Merged and already deleted branches can't be deleted.

This endpoint is limited to 30 requests per minute, shared with Create branch, Delete branch and Merge branch.

<Tip>A 409 response carries an extra_data.reason code that says why the request was refused.</Tip>

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted.</Note>

delete/api/apps/{app_id}/branches/{branch_id}

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/branches/{branch_id}
  • Auth: HTTP bearer

Path parameters

branch_idstring required

ID of the branch, as returned by List branches.

app_idstring required

ID of the app the branch belongs to.

Response

The branch was deleted.

successboolean required

Always true.

Example response

{
  "success": true
}

Changes