---
title: "Get API key details"
method: GET
path: "/api-keys/{api_key_id}"
tags: ["API Keys"]
---

# Get API key details

`GET /api-keys/{api_key_id}`

## Request

- Base URL: `https://statusstack.com/api`
- URL: `https://statusstack.com/api/api-keys/{api_key_id}`
- Auth: HTTP bearer

## Response `200`

API key details, including `revoked_at`.

- object
  - `data` object, required: An API key's metadata. The secret itself is returned once, when the key is created, and never again.
    - `id` string, uuid
    - `name` string
    - `version` string: API version the key targets, `v` followed by a number (e.g. `v1`).
    - `permissions` string[]
    - `expires_at` string, date-time, nullable
    - `last_used_at` string, date-time, nullable
    - `created_at` string, date-time
    - `revoked_at` string, date-time, nullable: When the key was revoked; null for a live key.

## Other responses

- `401`: No valid Sanctum session or token. Laravel's own `{message}` body.
- `403`: The policy refused access to this key.
- `404`: No such key among the user's own keys.

---

[API](https://skmtc.dev/statusstack/apis/statusstack-api.md) - [All operations](https://skmtc.dev/statusstack/apis/statusstack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/statusstack/apis/statusstack-api/revisions/a5fabf6ac5e4?raw)
