Step 1
Create an API key
An API key lets your scripts and systems call Edgecom as you. You create it yourself in the Edgecom portal in about a minute, and you choose exactly what it can do.
-
Open your API keys
Sign in to portal.edgecom.ai and go to SettingsAPI KeysPersonal Keys.
-
Click New API key
Give the key a name you'll recognize later, such as Billing export, and choose when it expires: 30, 90, 180 or 365 days.
-
Choose its access
Under Access, pick what the key can do, for example pTrack · Dashboard, read. Only what your own role allows is listed. Also pick List locations so the key can look up your location IDs.
-
Copy the key now
Click Create key. The key is shown only once, so copy it into a password manager or secret store, tick I've stored this key somewhere safe, and click Done.
The key can never do more than you can. If your role in the portal changes, or you leave your company's account, the key changes with you.
Don't see Personal Keys, or can't create one? Your company's administrators may have limited API keys to certain roles. Ask them, or email support@edgecom.ai.
Step 2
Authenticate your requests
Send the key as a bearer token in the Authorization header of every request.
Authorization: Bearer authx_production_usr_v1_<id>.<secret>
Keep it secret
Load the key from an environment variable or secret manager. Never put it in source code, URLs or logs.
Same key everywhere
One key works across dataTrack, pTrack and demand response, for whatever access you gave it.
Moving from v1?
The v2 APIs ignore the old X-API-Key header. Create a new key and send it as a bearer token.
Step 3
Find your locations
Most routes take a location or organization ID. List your locations once and keep their IDs.
export EDGECOM_API_KEY="authx_production_usr_v1_…"
curl https://api.edgecom.ai/x/organizations/me/locations \
-H "Authorization: Bearer $EDGECOM_API_KEY"
Each item in result[] has the location's id, name, organization_id, address, market and zone. Use that id wherever a route asks for a location {id}, and organization_id where it asks for an organization.
This call needs the key to include List locations. On dataTrack you can also call GET https://api.edgecom.ai/core/v2/location, which lists every dataTrack site you can see, across all your organizations.
Reference
APIs
Every reference is interactive. Paste your key under Authentication and send real requests from the browser.
Site data
Market data and forecasts
IESO demand, prices, peaks and weather, with pTrack peak predictions and peak-call history.
AESO internal load, pool price, supply and demand, with pTrack predictions and your alert thresholds.
Demand response
Events, season standing, revenue, settlement, LMP, curtailment plans and reports.
Seasons, events, participation, curtailment plans, baseline requests, demand and revenue.
Seasons, events, participation, curtailment plans, baseline requests, demand and revenue.
Seasons, events, participation, curtailment plans, baseline requests, demand and revenue.
Seasons, events, participation, curtailment plans, baseline requests, demand and revenue.
Keys over time
Rotate and revoke keys
Keys expire. Rotate yours before it does, and revoke it the moment it might have leaked.
Expiry
A key lasts up to 365 days; your company may set a shorter limit. The portal warns you 14 days before.
Rotate
Choose Rotate on the key. You get a new key with the same access, and the old one keeps working for up to 24 hours while you switch.
Revoke
Choose Revoke to stop a key immediately. A revoked key can't be restored.
Troubleshooting
Errors
All the APIs use the same status codes, and error bodies carry a readable message.
| Status | Meaning | What to check |
|---|---|---|
| 400 | The request is malformed. | Date formats, IDs and required parameters, as documented in each reference. |
| 401 | The key is missing, malformed, expired or revoked. | The Authorization: Bearer header, and the key's status in the portal. |
| 403 | The key works, but its access doesn't cover this product, location or action. | The key's Access in the portal, and your own role. If the message says your email isn't verified, verify it first. |
| 404 | The location or record doesn't exist, or your key can't see it. | The ID. Use the IDs from your location list. |
| 503 | An Edgecom service is briefly unavailable. | Retry with exponential backoff. |
Contacting support about a 403? Include the X-AuthX-Decision-ID response header if one was returned. It points to the exact access decision.
Need a hand?
Questions about your key, your access or an API? We're happy to help. Never send the key itself; its name is enough.