Skip to main content
GET
/
api
/
v1
/
keys
List keys from logged-in browser
const r = await fetch('/api/v1/keys', { credentials: 'include' });
const { data } = await r.json();
data.forEach(k => console.log(`${k.key_prefix}: ${k.name} (${k.tier})`));
curl --request GET \
--url https://socdefenders.ai/api/v1/keys \
--cookie sb-access-token=
import requests

url = "https://socdefenders.ai/api/v1/keys"

headers = {"cookie": "sb-access-token="}

response = requests.get(url, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://socdefenders.ai/api/v1/keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "sb-access-token=",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://socdefenders.ai/api/v1/keys"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("cookie", "sb-access-token=")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://socdefenders.ai/api/v1/keys")
.header("cookie", "sb-access-token=")
.asString();
require 'uri'
require 'net/http'

url = URI("https://socdefenders.ai/api/v1/keys")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["cookie"] = 'sb-access-token='

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": "00000000-0000-4000-8000-000000000123",
      "key_prefix": "sk_live_zIc8",
      "name": "Production SIEM",
      "tier": "pro",
      "scopes": [
        "read:iocs",
        "read:articles",
        "read:articles:export",
        "read:stix"
      ],
      "total_requests": 142587,
      "last_used_at": "2026-05-17T09:42:11Z",
      "created_at": "2026-01-15T10:00:00Z",
      "expires_at": null,
      "revoked_at": null
    },
    {
      "id": "00000000-0000-4000-8000-000000000456",
      "key_prefix": "sk_live_aB3x",
      "name": "Dev sandbox",
      "tier": "free",
      "scopes": [
        "read:iocs",
        "read:articles"
      ],
      "total_requests": 234,
      "last_used_at": "2026-05-16T18:30:00Z",
      "created_at": "2026-05-10T08:00:00Z",
      "expires_at": "2026-08-10T08:00:00Z",
      "revoked_at": null
    }
  ],
  "meta": {
    "total": 2
  }
}
{
"error": {
"code": "missing_api_key",
"message": "API key is required. Include it in the Authorization header as \"Bearer sk_live_...\"",
"request_id": "req_abc123"
}
}

Authorizations

sb-access-token
string
cookie
required

Session cookie (for API key management endpoints)

Response

Array of API key metadata. Full key secrets are never returned here.

data
object[]
meta
object