Projects
Branch previews
Spin up an isolated preview environment per git branch or pull request, then tear it down when the PR merges.
A branch preview is a throwaway instance of a project tied to a git branch or PR number — useful for reviewing a change against real infrastructure before it reaches production.
Create a branch
Section titled “Create a branch”curl -X POST https://cloud.backlex.com/api/org/<org>/projects/<project>/branches \ -H "Authorization: Bearer pak_..." \ -H "Content-Type: application/json" \ -d '{"name":"feat-checkout","prNumber":42}'Creating a branch provisions a preview deployment and writes a deploy record (trigger branch) so it shows up in the project’s deploy history. prNumber is optional — pass it to link the preview to a pull request.
List & delete
Section titled “List & delete”The project’s Branches tab lists active previews. Delete one when its PR merges or closes:
curl -X DELETE \ https://cloud.backlex.com/api/org/<org>/projects/<project>/branches/<id> \ -H "Authorization: Bearer pak_..."Creating and deleting branch previews requires at least the developer role.