Review environments
Pair each API key with the current public host for that environment.
Core concept
API key headers, safe key handling, access checks, and common authentication errors.
An organization owner or admin creates API keys in ChartHero, under the organization's settings in Connections → API Keys. Choose the key's scopes and expiration date when you create it: keys can't be edited, so to change scopes, create a new key and revoke the old one. ChartHero shows the full key once; store it in your secret manager right away.
Send each key only to its own environment's host, as Environments describes. If you don't see the API Keys tab, contact ChartHero support.
Every public API request must include an API key in the Authorization header using the Bearer scheme.
Authorization: Bearer <api_key>
Send the header from your server-side integration. Do not send API keys in query parameters.
API key values are shown only as synthetic placeholders in these docs. Treat production API keys as secrets.
Store keys in a server-side secret manager or encrypted configuration. Do not place keys in browser code, mobile applications, logs, analytics events, customer-visible error messages, or support screenshots. Rotate a key if it may have been exposed.
ChartHero checks API-key validity, route availability, organization-scoped key requirements, and required scopes before returning data or parsing route-specific query parameters.
A request may be denied when:
Because route-level checks run first, a request that fails authentication, route availability, organization-scope, or scope checks can return an authentication or authorization error even if the URL also contains an invalid query parameter. After those checks pass, unsupported query parameters can be reported before ChartHero looks up a specific resource.
Production API access requires the production host, a production API key, available public routes, and the required scopes. Before sending production traffic, confirm the host, key, route availability, and scope set for your integration.
Use separate keys for separate environments. A staging key may be rejected in production, and a production key should not be used in local development or shared test tooling.
Before sending production traffic, confirm the key, route availability, and scope set in Environments.
| HTTP status | reason_code |
What it means | What to do |
|---|---|---|---|
401 |
missing_bearer |
The request did not include Authorization: Bearer <api_key>. |
Send the header from server-side code. |
401 |
malformed_token or invalid_key |
The API key could not be read or is not recognized. | Check that you are using the full key for the correct environment. |
401 |
disabled_key, expired_key, or revoked_key |
The key is no longer active. | Replace the key with an active one. |
401 |
api_keys_disabled or test_prefix_not_allowed |
API-key access is not available for this request or environment. | Confirm the environment and key type with ChartHero. |
403 |
org_scope_only_required |
The route requires an organization-scoped API key. | Use an organization-scoped key issued for the partner organization. |
403 |
missing_scope |
The key does not include every scope required by the route. | Request the smallest additional scope set needed for the integration. |
403 |
route_not_allowed |
ChartHero hasn't released the route in this environment. | Contact ChartHero support to ask when it will be available. |
403 |
cross_organization_denied or demo_training_denied |
The resource is not available to this integration. | Treat the resource as unavailable through the public API. |
Pair each API key with the current public host for that environment.
Map routes to the minimum API-key scopes.
Handle 401 and 403 responses with stable reason codes.