Getting StartedGet an API Key

Get an API Key

Create a read-only API key in the Dashboard and use it to access your Analytics reports.

Use an API key to read Analytics reports from your scripts and integrations. Each key belongs to an organization and can read only the tenants selected when it was created.

API keys are for the Analytics API. To send events, follow Send Events or Send Agent Events, which use the collection URL and Tenant/Source information described on those pages.

Create a key

You must be an organization Owner or Admin to manage API keys. Ask an owner or admin if you do not have access.

  1. Sign in to the Hardal Dashboard.
  2. Select the organization whose reports you want to access using the organization selector at the bottom of the sidebar.
  3. Open Settings under Organization, then find API Keys.
  4. Click Create key.
  5. Enter a recognizable Name, such as Weekly report export.
  6. Under Tenants this key can read, select at least one tenant. Select only the tenants your integration needs.
  7. Choose Expires: In 30 days, In 90 days, In 1 year, or Never.
  8. Click Create key, copy the key, and store it in your secret manager. Click Done when you have saved it.

The full key is shown only once. You cannot reveal it again later. If you lose it, create a replacement and revoke the old key.

Use the key

Send the key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

In an Analytics endpoint's Try it panel:

  1. Paste the key into Bearer Token without adding the Bearer prefix.
  2. Enter the required tenantId for a tenant selected on the key. Add any other required fields shown by that endpoint.
  3. Set the report parameters and click Send.

You can use Workspace Access to list the organizations, tenants, and sources accessible to the key, then choose a report such as Overview.

Keep the key in a server-side secret or environment variable. Do not embed it in website JavaScript, mobile app code, or public repositories.

Manage or replace a key

Return to Settings → API Keys to check the key's status, selected tenants, expiry, and last-used time.

To replace a key, create a new one, update your integration, and then Revoke the old key. Revocation stops its access immediately and cannot be undone.

  • 401: Check that the key was copied correctly and is not expired or revoked.
  • 403: Check that the requested tenant is included in the key's selected tenants.