Get current organization
curl --request GET \
--url https://api.getmetacognition.com/meimport requests
url = "https://api.getmetacognition.com/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.getmetacognition.com/me', 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.getmetacognition.com/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.getmetacognition.com/me"
req, _ := http.NewRequest("GET", url, nil)
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.getmetacognition.com/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmetacognition.com/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"org_id": "<string>",
"user_id": {},
"api_keys": [
{}
]
}Organization
Get current organization
Read the authenticated org, user, and visible API keys.
GET
/
me
Get current organization
curl --request GET \
--url https://api.getmetacognition.com/meimport requests
url = "https://api.getmetacognition.com/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.getmetacognition.com/me', 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.getmetacognition.com/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.getmetacognition.com/me"
req, _ := http.NewRequest("GET", url, nil)
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.getmetacognition.com/me")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmetacognition.com/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"org_id": "<string>",
"user_id": {},
"api_keys": [
{}
]
}Returns the authenticated org and user, plus all API keys visible to that org.
Response —
Headers
Authorization: Bearer <access_token>
Response — 200
string
The org bound to the JWT.
string | null
The user bound to the JWT. May be null for service tokens.
array
API key metadata for the org, sorted by
created_at descending. Plaintext keys are not included. To get a plaintext key, create a new one with POST /me/api-keys.Example
curl -H "Authorization: Bearer $JWT" \
https://api.getmetacognition.com/me
import httpx
resp = httpx.get(
"https://api.getmetacognition.com/me",
headers={"Authorization": f"Bearer {access_token}"},
)
me = resp.json()
print(me["org_id"], "→", len(me["api_keys"]), "keys")
Response
{
"org_id": "org_79d0fHwDRhoZ8Ww7",
"user_id": "apikey_a1247653",
"api_keys": [
{
"id": "a1247653-9646-4f32-b04f-72d2c0f5355b",
"prefix": "tex_live_",
"display_id": "LfbRIlFW",
"name": "production",
"scopes": ["*"],
"is_active": true,
"created_at": "2026-05-08T09:56:42.855738",
"last_used_at": "2026-05-08T10:02:11.123456",
"revoked_at": null
}
]
}
When to use
- Build a “logged-in as” UI in your own product.
- Audit which keys are still active before a rotation.
- Verify that
last_used_atadvances after a deploy.

