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