Skip to content
DocumentationIngest data

Authentication

Product Analytics uses public API keys. Every request is scoped to the organization that owns the key.

Get an API key

  1. Open the Product Analytics catalog.
  2. Open the Details tab.
  3. In Credentials, copy an existing key, or create one if you manage API keys for the organization.

SDK authentication examples

Initialize your SDK once with the API key for the current organization:

import { altertable } from '@altertable/altertable-js';
altertable.init('YOUR_API_KEY', {
environment: 'production',
});

Direct API authentication

For direct HTTP requests, use the same API key as your SDKs.

Method
How to send it
Notes
X-API-Key header
X-API-Key: YOUR_API_KEY
Recommended for server-to-server requests.
Authorization header
Authorization: Bearer YOUR_API_KEY
Equivalent to X-API-Key; useful when your client already uses Bearer auth patterns.
Query parameter
?apiKey=YOUR_API_KEY
Supported, but less preferred than headers because query strings are easier to leak into logs.

Next steps