---
title: "Inspects an identity: keys, ledger and credit history."
method: GET
path: "/admin/identities/{email}"
tags: ["admin"]
---

# Inspects an identity: keys, ledger and credit history.

`GET /admin/identities/{email}`

## Request

- Base URL: `https://api.mapmap.ai`
- URL: `https://api.mapmap.ai/admin/identities/{email}`
- Auth: HTTP bearer

## Path parameters

- `email` string, required

## Response `200`

Identity, keys, balance and history

- IdentityDetailResponse: Response for `GET /admin/identities/{email}`.
  - `balance_pence` integer, required: Prepaid balance, in pence.
  - `credited_total_pence` integer, required: Lifetime credited total, in pence.
  - `history` LedgerEntry[], required: Credit history, oldest first.
    - `balance_after_millipence` integer, required: Balance after this credit was applied, in millipence.
    - `created_at` string, required: RFC 3339 timestamp.
    - `delta_millipence` integer, required: Credited amount in millipence.
    - `reason` string, required: Idempotency reason, e.g. `stripe:cs_…`.
  - `identity` IdentityRecord, required: One stored identity.
    - `created_at` string, required: RFC 3339 creation timestamp.
    - `email` string, required: Canonical (lowercased) email address.
    - `id` string, required: Opaque identity id (UUID v4).
    - `tos_accepted_at` string, required: RFC 3339 timestamp of the most recent ToS acceptance.
  - `keys` ApiKeyRecord[], required: Keys belonging to the identity, newest first.
    - `allowed_origins` string[], nullable: Origins this key may be called from (see [`crate::origin`]). Omitted when the key is unrestricted, which is the default.
    - `created_at` string, required: RFC 3339 creation timestamp (UTC).
    - `expires_at` string, nullable: RFC 3339 expiry (provisional keys only).
    - `first_success_at` string, nullable: RFC 3339 timestamp of the key's first successful (2xx) metered API call (the activation event) or `null` if it has never had one.
    - `id` string, required: Opaque key id (UUID v4).
    - `monthly_quota` integer, required: Requests allowed per calendar month.
    - `name` string, required: Human-readable key name.
    - `rate_per_min` integer, required: Requests allowed per minute.
    - `revoked_at` string, nullable: RFC 3339 revocation timestamp, if revoked.
    - `scope` string, nullable: [`SCOPE_MAPS`] when the key is map-scoped; omitted for the full surface, which is the default.
    - `state` string, required: Lifecycle state: `admin`, `provisional` or `verified`.
  - `mau_included` integer, required: Included monthly active users per calendar month.
  - `mau_overdrawn` boolean, required: Whether the identity is MAU-overdrawn this month (fail-open flag: serving continued; sustained overdraw is a commercial conversation).
  - `mau_this_month` integer, required: Distinct monthly active users recorded this calendar month.
  - `month_used` integer, required: Metered quota units recorded this calendar month across the identity's keys. Paired with the live keys' `monthly_quota` it gives quota burn, which is what the account page leads with.
  - `plan` string, required: Coarse plan label (`free` until a subscription is activated).
  - `stripe_customer_id` string, nullable: The Stripe customer this identity is linked to, or `null` when it has never been through checkout.

## Other responses

- `401`: Missing or wrong admin token
- `404`: Unknown identity email

---

[API](https://skmtc.dev/mapmap/apis/sn-gateway.md) · [All operations](https://skmtc.dev/mapmap/apis/sn-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/mapmap/apis/sn-gateway/revisions/2293be8b4c38?raw)
