Learn how to authenticate your requests to the Seizn API.
All API requests require authentication using a Bearer token in the Authorization header.
curl -H "Authorization: Bearer szn_your_api_key_here" \
https://seizn.com/api/memories?query=testRecommended: Use the Authorization: Bearer header for all new integrations.
Seizn API keys follow this format:
szn_<random_string>
Example: szn_abc123def456ghi789jkl012mno345pqrszn_ identifies Seizn keysDeprecation Notice
The x-api-key header is deprecated and will be removed on May 1, 2026. Please migrate to Authorization: Bearer.
# Deprecated - do not use for new integrations
curl -H "x-api-key: szn_your_api_key_here" \
https://seizn.com/api/memories?query=testWhen using the deprecated header, the API will return these headers:
Deprecation: true
Sunset: 2026-05-01T00:00:00Z
Link: <https://seizn.com/docs/auth#migration>; rel="deprecation"
X-Deprecation-Notice: x-api-key header is deprecated. Use Authorization: Bearer instead.Follow these steps to migrate from x-api-key to Authorization: Bearer:
Change the header from x-api-key to Authorization.
Prepend Bearer (with a space) to your API key.
Verify your requests work with the new header format.
Before (Deprecated)
curl -H "x-api-key: szn_xxx" ...After (Recommended)
curl -H "Authorization: Bearer szn_xxx" ...from seizn import Seizn
# API key from environment variable (recommended)
client = Seizn()
# Or pass explicitly
client = Seizn(api_key="szn_xxx")import { Seizn } from 'seizn';
// API key from environment variable (recommended)
const client = new Seizn();
// Or pass explicitly
const client = new Seizn({ apiKey: 'szn_xxx' });API keys should only be used server-side. Use a backend proxy for browser applications.
Store API keys in environment variables, not in source code.
Generate new keys periodically and revoke old ones from the dashboard.
Configure auto-expiration for keys (90 days recommended).
| Error Code | Status | Description |
|---|---|---|
AUTH_MISSING_KEY | 401 | No API key provided |
AUTH_INVALID_KEY | 401 | Invalid or inactive API key |
AUTH_EXPIRED_KEY | 401 | API key has expired |