Review required scopes
Map routes to the minimum bearer-token scopes.
Core concept
API key headers, safe key handling, access checks, and common authentication errors.
Every public API request must include an API key in the Authorization header as a bearer token.
Authorization: Bearer ch_sk_example_123
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, partner route enablement, 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, partner enablement, 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 is enabled per partner organization and route. Before sending production traffic, confirm that ChartHero has enabled the routes your integration needs and issued a production API key with the required scopes.
Use separate keys for separate environments when they are provided. A test key may be rejected in production, and a production key should not be used in local development or shared test tooling.
| HTTP status | reason_code |
What it means | What to do |
|---|---|---|---|
401 |
missing_bearer |
The request did not include a bearer API key. | Send Authorization: Bearer <api_key>. |
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 or organization_not_allowlisted |
The route has not been enabled for the partner organization. | Ask ChartHero to enable the route before retrying. |
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. |
Review Scopes for route-level requirements and Errors for the standard error body and client handling guidance.
Map routes to the minimum bearer-token scopes.
Handle 401 and 403 responses with stable reason codes.
Inspect required headers and security schemes.