Add branch body string in api

Hi, i need create a link api in python
https://api.github.com/repos/{USERNAME}/{REPOSITORY}/{fname}/ with body string “branch”
i try REPO/branchname and fname/branchname, this create a folder. branch/branchname send 404 code.