Authentication
Every request to the Cornect API is authenticated with an API token. Tokens are created from the Cornect web app and look like cornect_….
Get an API token#
Sign in to Cornect and open Account → API tokens. Click Create Token, give it a name, pick a scope (below), and copy the token — it is shown only once.
Choosing a scope#
Each token carries a scope that limits what it can do. Pick the narrowest scope your integration needs:
read— all query endpoints: search companies, get company detail, check credits, and read/download exports.read_write— everythingreadcan do, plus creating exports (POST /exports), which charges credits.
Authorization header#
Send the token as a bearer token on every request:
Authorization: Bearer cornect_your_token_hereWorkspace binding#
A token is bound to the workspace it was created in — the token is the workspace context. You do not send an X-Workspace-Id header on API requests (that header is only used by the web app's session auth). All data a token can read or write belongs to its bound workspace.
Token security#
- Treat tokens like passwords. Never commit them to source control.
- Load them from environment variables or a secrets manager.
- Use separate tokens per integration so you can revoke one without disrupting others.
- Prefer
readtokens for anything that doesn't need to create exports.
Revoking a token#
Revoke a token any time from Account → API tokens. Revocation takes effect immediately — the next request with that token returns 401 INVALID_TOKEN.