What is an API Key?
An API key is a secret token that identifies your application or system when making requests to Compago’s API. It ensures that only authorized systems can initiate transactions, retrieve data, or trigger any backend logic. Keep your API key secure and never expose it in public client-side code.How to Generate an API Key
Keys are created in the dashboard of the environment they will call:
To create an API key:
- Sign in to the dashboard of the environment you want to call.
- Navigate to Configuraciones → Desarrollador.
- Click Crear llave.
- Enter a name for the key (e.g.,
Tienda en línea,ERP), choose when it expires, and turn on only the permissions the integration needs. - Click Crear llave and copy the key immediately (it will only be visible once).
What a key is allowed to do
A key is bound to the organization it was created in and can only ever reach that organization’s data. It cannot be repointed, and an id from another organization returns404.
Within that organization, a key reaches only what its permissions allow: a key made for reconciliation can read payouts and fees and nothing else. A request outside its permissions answers 403 with INSUFFICIENT_SCOPE. Keys created before permissions existed hold full access, so existing integrations keep working. See Key permissions, expiry and rotation.
Base URLs
Keys are per environment. A demo key will not authenticate against production.
The examples in these docs use the production host. While you build, call the Demo host with a Demo key.
The previous hosts,
demo.api.harmony.compago.com and api.harmony.compago.com, stop working on December 15, 2026. If your integration still calls them, switch to the hosts above before then. Only the host changes: paths and API keys stay the same. See Moving to the new API hosts.Using the API Key in Requests
Every request to a protected endpoint must include your API key in the request headers.Header Format
curl:
/api/developer/v1:
401 Unauthorized response. On the Developer API its code says why: UNAUTHORIZED (unknown key), API_KEY_EXPIRED, API_KEY_DISABLED or API_KEY_REVOKED.
🔒 Always keep your API key secret. Rotate it regularly and never commit it to version control. Keys created from now on start with cmp_, which secret scanners can match.