List API keys
curl --request GET \
--url https://api-v2.forager.ai/api/api_keys/ \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-v2.forager.ai/api/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-v2.forager.ai/api/api_keys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api-v2.forager.ai/api/api_keys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-v2.forager.ai/api/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))
}require 'uri'
require 'net/http'
url = URI("https://api-v2.forager.ai/api/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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-v2.forager.ai/api/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;
}HttpResponse<String> response = Unirest.get("https://api-v2.forager.ai/api/api_keys/")
.header("X-API-KEY", "<api-key>")
.asString();[
{
"prefix": "<string>",
"created": "2023-11-07T05:31:56Z",
"name": "<string>"
}
]{
"detail": "Authentication credentials were not provided."
}List API keys
List the API keys for your Forager account.
GET
https://api-v2.forager.ai
/
api
/
api_keys
/
List API keys
curl --request GET \
--url https://api-v2.forager.ai/api/api_keys/ \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-v2.forager.ai/api/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-v2.forager.ai/api/api_keys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api-v2.forager.ai/api/api_keys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-v2.forager.ai/api/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))
}require 'uri'
require 'net/http'
url = URI("https://api-v2.forager.ai/api/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<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-v2.forager.ai/api/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;
}HttpResponse<String> response = Unirest.get("https://api-v2.forager.ai/api/api_keys/")
.header("X-API-KEY", "<api-key>")
.asString();[
{
"prefix": "<string>",
"created": "2023-11-07T05:31:56Z",
"name": "<string>"
}
]{
"detail": "Authentication credentials were not provided."
}When to use this endpoint
You want to see which API keys exist for your user, for example to audit or rotate them. Only the key prefix, name and creation date are returned, never the key itself.Example request
cURL
curl "https://api-v2.forager.ai/api/api_keys/" \
-H "X-API-KEY: $FORAGER_API_KEY"
FORAGER_API_KEY and FORAGER_ACCOUNT_ID as in the quickstart.
Example response
200 (illustrative values)
[
{
"prefix": "a1b2c3d4",
"created": "2026-10-20T08:15:00Z",
"name": "ci-server"
}
]
Credits
The credit cost of this operation is not documented yet. See API credits and pricing.Last modified on November 1, 2026