Getting your API key
Sign in at socdefenders.ai, then navigate to Settings → API Keys. Click Create key, give it a name, and copy the key value immediately — it is only shown once. You can also reach the API Keys section from the export page.
If you need to revoke a key, return to Settings → API Keys and delete it. The key stops working immediately.
Passing your key
The SOC Defenders API accepts your key in two request headers. Use whichever fits your tooling or integration. Option 1:Authorization header with Bearer scheme
X-API-Key header
Authorization: Bearer form is the standard HTTP convention and is the recommended default. Use X-API-Key if your infrastructure strips or rewrites the Authorization header.
API key security
Treat your API key like a password. Recommended practices:- Store keys in environment variables or a secrets manager, not in code.
- Use separate keys for different environments (development, staging, production).
- Rotate keys periodically and immediately after any suspected exposure.
- Grant keys only the access level your integration actually needs — use Free-tier keys for testing rather than production Pro keys.
Authentication errors
When a request fails authentication, the API returns a401 Unauthorized response with a JSON error body. For example, a request with a missing key returns:
code field to identify the problem programmatically. The request_id is useful when contacting support.