Skip to main content
Authentication is a single step: put your API key in the x-api-key header. That is the whole model. There is no OAuth exchange and no token to refresh.

Your API Key

Pass your API key in the x-api-key HTTP header on every request. The key is a static secret issued by your PowerHQ representative; treat it like a password and never expose it in client-side code or public repositories.

Where You Can Call From

Anything that can make an HTTPS request and set a header can call the API:
  • Serverless and edge runtimes with rotating egress IPs (Lambda, Cloudflare Workers, Vercel)
  • Containers and autoscaling groups whose IPs change on every deploy
  • CI pipelines and local development machines
Because the key is the only credential, keep it server-side. Never ship it in a browser bundle, a mobile app, or a public repository. If you need something a browser can call, put a thin proxy of your own in front of it and keep the key on the proxy.
Want to try the API before you have a key at all? The playground runs real queries against production with no key and no signup.

Environments

Both environments enforce the same authentication requirements. Use Certification while you build and test; switch to Production for live customer traffic.
Point your integration at the Certification environment during development. It lets you iterate safely without risking any impact to production data or customer-facing systems.
Onboarding asks for the IP addresses your team will be testing from, so we can enable them for the certification checkout flow. Sending them early keeps your first end-to-end test from waiting on us.

Error Responses

403 Forbidden

A 403 Forbidden response means the x-api-key header is missing, malformed, or not a valid key for that environment. Check that the header is present, that the key has no stray whitespace, and that you are using the right key for the environment you are calling — staging and production keys are different.

400 Bad Request

A 400 Bad Request response indicates a malformed HTTP request body — for example, invalid JSON or a missing Content-Type: application/json header. Check that your request body is valid JSON and that the Content-Type header is set correctly.

GraphQL Errors (HTTP 200)

GraphQL errors — such as unknown fields, missing required arguments, or resolver-level failures — are returned with an HTTP status of 200. The response body contains an errors array alongside (or instead of) the data object:
For a full list of GraphQL error codes and how to handle them, see the Errors reference.