> ## Documentation Index
> Fetch the complete documentation index at: https://metacognition-fdc534de-master.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get current organization

> Read the authenticated org, user, and visible API keys.

Returns the authenticated org and user, plus all API keys visible to that **org**.

## Headers

```http theme={null}
Authorization: Bearer <access_token>
```

## Response — `200`

<ResponseField name="org_id" type="string">
  The org bound to the JWT.
</ResponseField>

<ResponseField name="user_id" type="string | null">
  The user bound to the JWT. May be null for service tokens.
</ResponseField>

<ResponseField name="api_keys" type="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`](/api-reference/account/api-keys).
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer $JWT" \
    https://api.getmetacognition.com/me
  ```

  ```python Python theme={null}
  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")
  ```
</CodeGroup>

```json Response theme={null}
{
  "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.
