Account
List API keys
List non-secret metadata for your account API keys.
GET
/
account
/
api-keys
List API keys
curl --request GET \
--url https://api.darwin.so/api/v2/account/api-keys \
--cookie __Secure-better-auth.session_token=import requests
url = "https://api.darwin.so/api/v2/account/api-keys"
headers = {"cookie": "__Secure-better-auth.session_token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '__Secure-better-auth.session_token='}};
fetch('https://api.darwin.so/api/v2/account/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.darwin.so/api/v2/account/api-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 => "__Secure-better-auth.session_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://api.darwin.so/api/v2/account/api-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "__Secure-better-auth.session_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://api.darwin.so/api/v2/account/api-keys")
.header("cookie", "__Secure-better-auth.session_token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.darwin.so/api/v2/account/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
response = http.request(request)
puts response.read_body{
"apiKeys": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"<string>"
],
"requestCount": 1,
"lastUsedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"message": "<string>",
"fields": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"fields": [
{}
]
}The response includes active, expired, and revoked keys. It never includes plaintext key values.
Manage API keys in Darwin
Review your keys in Developer settings.
Authorizations
The HTTP-only Darwin account session cookie set after sign-in. Local development uses better-auth.session_token without the __Secure- prefix.
Response
Every API key owned by the account, including expired and revoked keys.
Show child attributes
Show child attributes
Last modified on September 21, 2026
⌘I
List API keys
curl --request GET \
--url https://api.darwin.so/api/v2/account/api-keys \
--cookie __Secure-better-auth.session_token=import requests
url = "https://api.darwin.so/api/v2/account/api-keys"
headers = {"cookie": "__Secure-better-auth.session_token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '__Secure-better-auth.session_token='}};
fetch('https://api.darwin.so/api/v2/account/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.darwin.so/api/v2/account/api-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 => "__Secure-better-auth.session_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://api.darwin.so/api/v2/account/api-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "__Secure-better-auth.session_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://api.darwin.so/api/v2/account/api-keys")
.header("cookie", "__Secure-better-auth.session_token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.darwin.so/api/v2/account/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
response = http.request(request)
puts response.read_body{
"apiKeys": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"scopes": [
"<string>"
],
"requestCount": 1,
"lastUsedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"message": "<string>",
"fields": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"fields": [
{}
]
}