---
title: "Inspect the current API key"
method: GET
path: "/v1/auth/self"
tags: ["Authentication"]
---

# Inspect the current API key

`GET /v1/auth/self`

Return metadata about the API key currently being used: id, name, environment, scopes, IP allowlist, last-used timestamp and expiration. Useful for verifying key configuration without storing it client-side.

## Response `200`

API key metadata.

- object
  - `apiKey` ApiKeySelf
    - `id` string, uuid — Internal API key id.
    - `name` string — Human-readable name set in the dashboard.
    - `description` string, nullable
    - `environment` 'SANDBOX' | 'PRODUCTION' — Environment the key is bound to.
    - `prefix` string — The non-secret prefix of the key (`ypk_<env>_<kid>`). Safe to log.
    - `scopes` string[] — Permissions granted to the key.
    - `ipAllowlist` string[] — List of allowed IPs/CIDRs. Empty means no restriction.
    - `rateLimitPerMinute` integer, nullable — Per-key rate limit in requests per minute, or null for the account default.
    - `expiresAt` string, date-time, nullable — Expiration timestamp, or null if the key does not expire.
    - `lastUsedAt` string, date-time, nullable
    - `createdAt` string, date-time

## Other responses

- `401` — Missing or invalid authentication token.

---

[API](https://skmtc.net/yuvexpay/apis/yuvexpay-api.md) · [All operations](https://skmtc.net/yuvexpay/apis/yuvexpay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/yuvexpay/yuvexpay-api/revisions/0d036504e049/schema)
