1
Get your credentials
You need one thing: an API key, a static secret you send on every request in the
x-api-key HTTP header. It works from serverless functions, containers and CI just as well as from a fixed server.Contact your PowerHQ representative to receive your key. Want to run real queries before you have one? The playground needs no key at all.2
Choose your environment
PowerHQ provides two identical endpoints. Use Certification while you build and test your integration, then point to Production when you go live.
All code examples in this guide use the Certification endpoint. Swap the hostname when you’re ready for production traffic.
3
Send your first request
Start with a A successful response looks like this:The
utilities query — it’s the simplest call and confirms your key is working. This example looks up the transmission and distribution utility (TDU) for ZIP code 75231 (Dallas, TX).id value (here "ONCOR") is the utilityId you’ll pass in subsequent plan queries for addresses in this service territory.4
Fetch residential plans
Now query for residential plans. The example below requests plans for ZIP code 77002 (Houston, TX) sized for a customer using 1,000 kWh per month. It asks for the plan title, base price, contract term, rate type, supplier name, tiered rate details, and a ready-to-use enrollment URL.Send it with curl:The response includes one or more plans. Here’s an example entry:The
headlessEnrollmentUrl takes a customer directly into the enrollment flow for that plan. Replace YOUR_PARTNER_CODE with the partner code provided by your PowerHQ representative before surfacing these URLs to customers.Next Steps
Authentication
How the
x-api-key header works, why there is nothing else to configure, and how to handle 403 errors in production.Reading Pricing
Understand the difference between
price, allInRateUsdPerKwh, and avgMonthlyBillUsd, and when to display each.Residential Plans Query
Full reference for every parameter and return field on the
residentialPlans query.All Queries
Browse the complete query reference — business plans, utilities, start dates, accounts, and more.