---
title: "Return the account and API key this request authenticates as, including whether the key is a sandbox key"
method: GET
path: "/v2/auth/whoami"
tags: ["auth-v2"]
---

# Return the account and API key this request authenticates as, including whether the key is a sandbox key

`GET /v2/auth/whoami`

## Request

- Base URL: `https://api.tracklysms.com/api`
- URL: `https://api.tracklysms.com/api/v2/auth/whoami`
- Auth: API key in header `X-Api-Key`

## Response `200`

Success

- WhoamiResponse
  - `account` WhoamiAccount
    - `id` integer: Account ID
    - `name` string: Account name
    - `parent_account_id` integer, nullable: Parent account ID for an umbrella child; null otherwise
    - `plan` string: Billing plan (free | paid)
    - `status` string: Account status; always active in a successful response
  - `api_key` WhoamiApiKey
    - `created_at` string: Creation time (ISO8601 UTC)
    - `expires_at` string, nullable: Expiry (ISO8601 UTC); null when the key does not expire
    - `id` string: API key ID
    - `key_prefix` string, nullable: First characters of the key value; null for keys minted before prefixes were recorded
    - `last_used_at` string, nullable: Most recent authenticated use BEFORE this call (ISO8601 UTC); the current call is recorded after the response, so a key answers null on its first ever request
    - `lifecycle_denial` string, nullable: expired_api_key | key_grace_expired when the key is past its expiry or rotation grace and is refused once key-lifecycle enforcement is on; null while the key is in good standing
    - `name` string: Key name as shown in the dashboard
    - `sandbox` boolean: True when requests with this key are simulated (nothing delivered, nothing billed)
    - `send_policy` WhoamiSendPolicy
      - `daily_send_cap` integer, nullable: Maximum live sends per UTC day for this key; null when uncapped
      - `list_numbers` string[]: SMS sending-list restrictions (E.164); empty means unrestricted SMS lists, not a number inventory
      - `require_confirmation` boolean: Whether live sends require human approval
      - `sends_today` integer, nullable: Live sends counted against the cap so far today (UTC); null when uncapped or unavailable
    - `status` string: Stored status: active or pending_deletion; inspect lifecycle_denial for expiry or elapsed grace
  - `voice` WhoamiVoiceDiscovery
    - `calling_numbers_url` string: Owned voice caller-ID inventory endpoint
    - `required_scope` string: Scope required by the inventory endpoint; not an access grant

## Other responses

- `401`: Invalid credentials
- `403`: Account suspended
- `503`: API key send policy unavailable

---

[API](https://skmtc.dev/tracklysms/apis/trackly-sms-api.md) · [All operations](https://skmtc.dev/tracklysms/apis/trackly-sms-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tracklysms/apis/trackly-sms-api/revisions/ac1ad22cb2a9?raw)
