SOC Defenders uses API key authentication for all REST API requests. Every request you make must include a valid API key — requests without a key, or with an invalid or expired key, are rejected before reaching any endpoint. There are no session cookies or OAuth flows; the API key is the only credential you need.Documentation Index
Fetch the complete documentation index at: https://docs.socdefenders.ai/llms.txt
Use this file to discover all available pages before exploring further.
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.| Tier | API keys allowed |
|---|---|
| Free | Up to 3 |
| Pro | Up to 50 |
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.
| Error code | Cause | Fix |
|---|---|---|
missing_api_key | No API key was included in the request. | Add the Authorization: Bearer sk_live_... or X-API-Key header. |
invalid_api_key | The key was provided but does not match any active key on your account. | Check for typos or extra whitespace. Verify the key exists in Settings → API Keys. |
expired_api_key | The key existed but has been deleted or has expired. | Create a new key in Settings → API Keys and update your integration. |