Get "badge-notification" from API?

I suggest referring to Reverse engineer the Discourse API