Webhook get commit branch


I’ve setup a webhook to call a specific url when a commit occurs however it doesn’t give any information as to which branch is being commited, “master” or “dev”.

Is there any way I can get this information from a webhook?

How do I get the payload (PHP or Node)? I don’t care what was commited only what branch was commited so that I can make a request to my dev or live servers to do a git pull and execute update.sh

All I get from the webhook is:

"Referer":"webhook url called",

I make a call to:


But just returns

"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/reference/repos#get-a-repository-webhook"