Reverted sprintf to str_replace after Drew pointed out that it's easier to copy endpoint from the docs if using str_replace (as they already use a placeholder in this format).