Authenticate requests
Send the API key with the required Authorization header.
Core concept
Use the correct API host and API key for each ChartHero environment.
ChartHero's current public API hosts are shared by environment. Treat each host/key pair as a boundary: send a key only to the API host for the same environment.
These hosts are not organization-specific.
| Environment | API host | Base URL | Key handling |
|---|---|---|---|
| Staging | https://api.charthero-staging.com |
https://api.charthero-staging.com/external/v1 |
Use staging keys only with the staging API host. |
| Production | https://api.charthero.ai |
https://api.charthero.ai/external/v1 |
Use production keys only from server-side production systems. |
Public REST routes live under /external/v1 for every environment.
https://api.charthero.ai/external/v1
The bundled OpenAPI artifact is published with these docs at /openapi/v1/openapi.json. The artifact describes the v1 contract for the current public hosts.
Every request must send the API key in the Authorization header using this exact format:
Authorization: Bearer <api_key>
Do not reuse production keys in local development, shared test tooling, browser code, mobile apps, logs, analytics events, screenshots, or support tickets. If a key may have crossed an environment boundary or been exposed, rotate it before retrying.
Public route availability is controlled by environment rollout, and each request still requires the route's scope set plus same-organization, real-resource access. A valid key can still receive 403 when the route is unavailable, the key is missing a required scope, or the resource is not available to the caller organization.
Before using an environment, confirm the key, route availability, and required scopes for the integration.
Send the API key with the required Authorization header.
Confirm the least-privilege scopes for each enabled route.
Inspect environment-neutral route and schema contracts.