## Create `client.vals.branches.create(stringvalId, BranchCreateParamsbody, RequestOptionsoptions?): BranchCreateResponse` **post** `/v2/vals/{val_id}/branches` Create a new branch ### Parameters - **valId:** `string` - **body:** `BranchCreateParams` - **name:** `string` - **branchId:** `string` The branch ID to fork from. If this is not specified, the new branch will be forked from main. ### Returns - `BranchCreateResponse` A Branch - **id:** `string` The id of the branch - **createdAt:** `string` - **forkedBranchId:** `string | null` The id of the branch this branch was forked from - **links:** `Links` - **html:** `string` The URL of this resource on Val Town - **self:** `string` The URL of this resource on this API - **name:** `string` - **updatedAt:** `string` - **version:** `number` ### Example ```node import ValTown from '@valtown/sdk'; const client = new ValTown(); const branch = await client.vals.branches.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { name: 'my-branch', branchId: '00000000-0000-0000-0000-000000000000', }); console.log(branch.id); ```