# Branches ## Create **post** `/v2/vals/{val_id}/branches` Create a new branch ### Returns - **id:** `string` The id of the branch - **createdAt:** `string` - **forkedBranchId:** `string` The id of the branch this branch was forked from - **links:** `object` - **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` ## Retrieve **get** `/v2/vals/{val_id}/branches/{branch_id}` Get a branch by id ### Returns - **id:** `string` The id of the branch - **createdAt:** `string` - **forkedBranchId:** `string` The id of the branch this branch was forked from - **links:** `object` - **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` ## List **get** `/v2/vals/{val_id}/branches` List all branches for a val ### Returns - **data:** `array of object` - **links:** `PaginationLinks` Links to use for pagination ## Delete **delete** `/v2/vals/{val_id}/branches/{branch_id}` Delete a branch