You should substitute the value colored in green (for illustrative purposes only) to one of the following: stable, testing, unstable.
sudo pacman-mirrors --api --set-branch {branch}