Heroku's Platform API at https://api.heroku.com needs Accept: application/vnd.heroku+json; version=3 on every request.
Create a token at Account settings → API key, or heroku authorizations:create. Send it as Authorization: Bearer <token>. In the examples it's written {{HEROKU_API_KEY}}.
Full reference: https://devcenter.heroku.com/articles/platform-api-reference
curl https://api.heroku.com/apps \
-H "Authorization: Bearer {{HEROKU_API_KEY}}" \
-H "Accept: application/vnd.heroku+json; version=3"
curl https://api.heroku.com/apps/{{APP_NAME}}/dynos \
-H "Authorization: Bearer {{HEROKU_API_KEY}}" \
-H "Accept: application/vnd.heroku+json; version=3"
curl https://api.heroku.com/apps/{{APP_NAME}}/releases \
-H "Authorization: Bearer {{HEROKU_API_KEY}}" \
-H "Accept: application/vnd.heroku+json; version=3"