# Retrieve the caller

`GET https://api.morevoice.ai/v1/whoami`

Returns the organisation, key, mode, scopes and API version of the key that authenticated the request, and what the organisation can do: its plan, the plan's features and main limits, and the partner-settable feature flags as they resolve for it. With `Mv-Account` (a partner key acting in a client organisation), the client's.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `whoami_retrieve`.

## Parameters

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Responses

### 200 OK

OK Returns `ApiKeyPrincipal`.

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"api_key_principal"` | — |
| `org_id` | `string` | The organisation the key belongs to (`org_…`). |
| `key_id` | `string \| null` | The API key (`key_…`); null for OAuth app tokens. |
| `livemode` | `boolean` | false for test-mode keys (`mv_test_…`). |
| `scopes` | `string[]` | The scopes granted to the key; ["*"] means every scope. |
| `api_version` | `string` | The API version this request was answered in (MoreVoice-Version header, else the key's pinned version). |
| `plan` | `string \| null` | The organisation's plan (`starter`, `growth`, `business`, `enterprise`, …). With `Mv-Account`, the client organisation's. Null only while the plan can't be read (try again). |
| `features` | `PlanFeatures \| null` | — |
| `limits` | `PlanLimits \| null` | — |
| `limits.assistants` | `integer \| null` | Assistants (null = unlimited). |
| `limits.dids` | `integer \| null` | Phone numbers (DIDs) (null = unlimited). |
| `limits.concurrent_ai_calls` | `integer \| null` | AI calls at the same time (null = unlimited). |
| `limits.flows` | `integer \| null` | Flows (null = unlimited). |
| `limits.seats` | `integer \| null` | Seats (active members) (null = unlimited). |
| `flags` | `CapabilityFlags \| null` | — |

Example:

```json
{
  "api_version": "2026-11-01",
  "features": {
    "campaigns": true,
    "copilot": true,
    "did_provisioning": true,
    "media_streams": true,
    "pbx": true,
    "sso": false,
    "voice_ai": true
  },
  "flags": {
    "media_streams": true,
    "telephony.fax": false,
    "tools.contract_v1": true,
    "v1.transcript_stream": true
  },
  "key_id": "key_9i2E2pKO6g3z4nXl57Qb4g",
  "limits": {
    "assistants": 15,
    "concurrent_ai_calls": 20,
    "dids": 10,
    "flows": null,
    "seats": 60
  },
  "livemode": true,
  "object": "api_key_principal",
  "org_id": "org_7n42DGM5Tflk9n8mt7Fhc9",
  "plan": "growth",
  "scopes": [
    "calls:read",
    "calls:write"
  ]
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const apiKeyPrincipal = await mv.whoami.retrieve();
console.log(apiKeyPrincipal);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

api_key_principal = client.whoami.retrieve()
print(api_key_principal)
```

**cURL**

```sh
curl https://api.morevoice.ai/v1/whoami \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```
