Skip to main content
GET
/
me
Get current organization
curl --request GET \
  --url https://api.getmetacognition.com/me
{
  "org_id": "<string>",
  "user_id": {},
  "api_keys": [
    {}
  ]
}
Returns the authenticated org and user, plus all API keys visible to that org.

Headers

Authorization: Bearer <access_token>

Response — 200

org_id
string
The org bound to the JWT.
user_id
string | null
The user bound to the JWT. May be null for service tokens.
api_keys
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
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_at advances after a deploy.