New Relic's main API is NerdGraph, GraphQL at https://api.newrelic.com/graphql (api.eu.newrelic.com for EU accounts). NRQL queries run inside it.
Create a User key under API keys and send it as the API-Key header. In the examples it's written {{NEW_RELIC_API_KEY}}.
Full reference: https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/
curl -X POST https://api.newrelic.com/graphql \
-H "API-Key: {{NEW_RELIC_API_KEY}}" \
-H "Content-Type: application/json" \
-d '{"query": "{ actor { user { name email } } }"}'
curl -X POST https://api.newrelic.com/graphql \
-H "API-Key: {{NEW_RELIC_API_KEY}}" \
-H "Content-Type: application/json" \
-d '{"query": "{ actor { account(id: {{ACCOUNT_ID}}) { nrql(query: \"SELECT count(*) FROM Transaction SINCE 1 hour ago\") { results } } } }"}'