Consented access to residential electricity interval data from Ontario utilities, delivered through Green Button Connect My Data and normalized to one JSON model. JSON over HTTPS with Bearer API keys. Build and test against the sandbox today; live access is enabled per partner.
With a sandbox key (pk_sandbox_…) you can run the whole flow end to end in a few minutes. Set PEAKSHIFT_KEY to your key first.
18 live Ontario utilities plus Milton Hydro (testing).
curl -s https://www.peakshift.ca/api/v1/utilities \
-H "Authorization: Bearer $PEAKSHIFT_KEY"By postal code (or FSA) or city. The response includes match_type and confidence.
curl -s "https://www.peakshift.ca/api/v1/utilities/lookup?postal_code=M5V2T6" \
-H "Authorization: Bearer $PEAKSHIFT_KEY"account_id is a UUID your app generates for the customer. state is optional and returned unchanged.
curl -s -X POST https://www.peakshift.ca/api/v1/auth/consent/initiate \
-H "Authorization: Bearer $PEAKSHIFT_KEY" \
-H "Content-Type: application/json" \
-d '{"account_id":"3f6c1b9e-2d4a-4c8e-9b1f-7a2e5d8c0f41",
"utility":"toronto_hydro",
"redirect_uri":"https://yourapp.example/peakshift/callback",
"state":"xyz123"}'In sandbox this is a clearly labelled simulated authorization page. After approval the browser is redirected to your redirect_uri.
https://yourapp.example/peakshift/callback
?consent_session_id=9b2d7c4e-...&account_id=3f6c1b9e-...
&state=xyz123&status=authorized&utility=toronto_hydroUtility, service points, data range and (sandbox) a simulated service address.
curl -s https://www.peakshift.ca/api/v1/accounts/3f6c1b9e-2d4a-4c8e-9b1f-7a2e5d8c0f41/metadata \
-H "Authorization: Bearer $PEAKSHIFT_KEY"12 months of hourly usage plus a summary. Use granularity=daily|monthly, start/end (YYYY-MM-DD) and format=csv as needed.
curl -s "https://www.peakshift.ca/api/v1/accounts/3f6c1b9e-2d4a-4c8e-9b1f-7a2e5d8c0f41/energy-profile?granularity=monthly" \
-H "Authorization: Bearer $PEAKSHIFT_KEY"Every endpoint requires your API key in the Authorization header. Keys are issued by PeakShift — email [email protected]. The environment is a property of the key; the base URL is the same.
Authorization: Bearer pk_sandbox_your_key_herepk_sandbox_…Simulated consent flow and deterministic synthetic data for every utility in the catalog. No real customer data.
pk_live_…Real Green Button data for accounts your key connects. Live consent is enabled per partner on request.
Key security: keep API keys server-side — never in browser or mobile app code or public repositories. If a key may be exposed, email [email protected] and we will revoke and reissue it.
Fetching daily usage for January for a connected account.
curl -s "https://www.peakshift.ca/api/v1/accounts/{account_id}/energy-profile?granularity=daily&start=2026-01-01&end=2026-01-31" \
-H "Authorization: Bearer pk_sandbox_your_key_here"Replace account_id with the UUID you used when starting consent.
The sandbox lets you build the full integration — coverage lookup, consent redirect handling and data parsing — without real customer data.
Limits apply per API key, per minute (sandbox keys default to 60 requests/minute; higher limits on request). Responses include X-RateLimit-Limit and X-RateLimit-Remaining. When exceeded the API returns 429 rate_limit_exceeded with Retry-After: 60.
All errors return {"error": {"code": "…", "message": "…"}}. Handle errors by code; messages may change.
| HTTP | Code | Meaning | Handling |
|---|---|---|---|
| 400 | invalid_request | Request body is not a JSON object. | Send a JSON object with Content-Type: application/json. |
| 400 | invalid_parameter | A parameter is missing or invalid. The message names the parameter. | Fix the request; do not retry unchanged. |
| 400 | validation_error | Webhook registration input is invalid (URL or event names). | Use a public https URL and supported event names. |
| 401 | unauthorized | API key missing, invalid, inactive or expired. | Send Authorization: Bearer <key>. Contact us if your key expired. |
| 404 | account_not_found | The account does not exist or was not connected by your API key. | Use the account_id from a completed consent made with the same key. |
| 404 | not_covered | No covered utility for the location, or the location is outside Ontario. | Show the customer an out-of-coverage message. |
| 409 | account_conflict | The account_id is already used by another API key. | Generate a new UUID for the customer. |
| 429 | rate_limit_exceeded | Per-key request limit exceeded. | Wait for Retry-After seconds (60), then retry. |
| 500 | server_error | Unexpected server error. | Retry with exponential backoff; contact us if it persists. |
| 503 | live_consent_unavailable | Live consent has not been enabled for your live key yet. | Email [email protected] to enable live onboarding. |
Click Authorize and paste a sandbox key to try requests from this page.