Getting an API key
1
Subscribe to API Access
API access is a separate subscription from your standard StratAlerts plan. Visit the API Access subscription page and complete checkout.
2
Generate a key
After subscribing, go to your account settings and generate a new API key. Give it a descriptive label so you can identify it later.
3
Copy the raw key immediately
The full key value is only shown once at creation time. Copy it to a secure location before closing the dialog — you cannot retrieve the raw key afterward, only revoke and regenerate it.
Passing your key
You can pass your API key in either of two request headers. Both are accepted on every REST endpoint and on the WebSocket handshake.- X-API-Key header
Code examples
Key scopes
When you generate a key, you choose which scopes to grant. A request to an endpoint whose scope is not on the key returns a403 missing_scope error. The table below lists all available scopes.
Error responses
Authentication failures return a JSON error envelope. The HTTP status code andcode field tell you exactly what went wrong.
A
401 response looks like this:
403 scope error looks like this:
Security best practices
- Store your key in an environment variable or secrets manager, not in source code.
- Use a separate key per integration so you can revoke one without affecting others.
- Grant only the scopes each key requires — avoid creating full-access keys for read-only integrations.
- Rotate keys on a regular schedule or immediately if you suspect exposure.
WebSocket authentication
The WebSocket connection handshake also requires your API key. Pass it in the same headers (Authorization: Bearer or X-API-Key) during the initial HTTP upgrade request. Your key must include both ws:connect and the scope for every channel you plan to subscribe to.
If authentication fails during the WebSocket handshake, the connection is closed with one of these close codes before any messages are exchanged: