curl --request GET \
--url https://api.athenahq.ai/api/v1/api-keys \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/api-keys"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.athenahq.ai/api/v1/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.athenahq.ai/api/v1/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_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.athenahq.ai/api/v1/api-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.athenahq.ai/api/v1/api-keys")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"api_keys": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"key_prefix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
},
"is_global": true,
"website_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_revoked": true
}
],
"pagination": {
"page_num": 123,
"page_size": 123,
"has_more": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}List API Keys
Lists API key metadata for the authenticated key’s organization, including each key’s creator (ID, current name and email), creation date, scope and revocation status. Requires a global API key; website-scoped keys receive 403. No organization ID is accepted. Secrets and hashes are never returned. Revoked keys are included so you can detect a key created and revoked between polls. Results are ordered by creation date ascending, then ID ascending.
For new-key alerts, first record a baseline of key IDs. On each poll, pin until to now minus one minute, overlap since with the previous successful window, and keep both bounds fixed while incrementing page_num until pagination.has_more is false. Both time bounds are inclusive. Deduplicate alerts by key ID and advance your saved window only after all pages succeed. Filter is_revoked locally if you need active keys only.
This is a current inventory, not a durable audit log or webhook: deleting a creator’s account removes their keys, and concurrent deletions can shift pages. Overlapping windows reduce polling gaps but cannot guarantee detection of every creation. The MCP tool list_api_keys exposes the same fields and filters to global API keys and organization-admin OAuth connections, subject to MCP permissions.
curl --request GET \
--url https://api.athenahq.ai/api/v1/api-keys \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/api-keys"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.athenahq.ai/api/v1/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.athenahq.ai/api/v1/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_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.athenahq.ai/api/v1/api-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.athenahq.ai/api/v1/api-keys")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"api_keys": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"key_prefix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
},
"is_global": true,
"website_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"is_revoked": true
}
],
"pagination": {
"page_num": 123,
"page_size": 123,
"has_more": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Query Parameters
Include keys created at or after this ISO 8601 timestamp.
Include keys created at or before this ISO 8601 timestamp. Keep fixed while paging.
Zero-based page number.
x >= 0Number of keys per page, up to 100.
1 <= x <= 100Was this page helpful?