Skip to main content
POST
/
api
/
v1
/
keys
Create a 90-day key
const r = await fetch('/api/v1/keys', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ name: 'prod-splunk-2026q2', expires_in_days: 90 }),
});
const { data, meta } = await r.json();
console.log(meta.warning);  // "Store this API key securely..."
console.log(`Save: ${data.full_key}`);  // sk_live_... (shown ONCE)
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "key_preview": "sk_live_••••••••",
    "tier": "free",
    "scopes": [
      "<string>"
    ],
    "rate_limit_per_minute": 123,
    "rate_limit_per_day": 123,
    "total_requests": 123,
    "last_used_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "expires_at": "2023-11-07T05:31:56Z",
    "key": "sk_live_abc123def456..."
  },
  "meta": {
    "warning": "Store this API key securely. It will not be shown again."
  }
}

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.

Authorizations

sb-access-token
string
cookie
required

Session cookie (for API key management endpoints)

Body

application/json
name
string
required

A friendly name for this key

Maximum string length: 100
Example:

"Production SIEM Integration"

expires_in_days
integer

Number of days until key expires (optional)

Required range: 1 <= x <= 365
Example:

90

Response

API key created successfully

data
object
meta
object