---
title: "Mint a new API key. The full secret is returned EXACTLY ONCE."
method: POST
path: "/v1/keys"
tags: ["keys"]
---

# Mint a new API key. The full secret is returned EXACTLY ONCE.

`POST /v1/keys`

## Request

- Base URL: `https://api.premiumpin.com`
- URL: `https://api.premiumpin.com/v1/keys`
- Auth: API key in cookie `pp_session`

## Request body

- object
  - `expires_at` string, date-time, nullable
  - `name` string

## Response `201`

created — `secret` present only in this response

- object
  - `created_at` string, date-time
  - `expires_at` string, date-time, nullable
  - `id` string
  - `is_active` boolean
  - `key_prefix` string: safe-to-display; NOT the secret
  - `last_used_at` string, date-time, nullable
  - `name` string
  - `secret` string: shown once, unrecoverable

## Other responses

- `401`: missing or invalid API key / session

---

[API](https://skmtc.dev/premiumpin/apis/premiumpin-property-records-api.md) · [All operations](https://skmtc.dev/premiumpin/apis/premiumpin-property-records-api/llms.txt) · [OpenAPI document](https://skmtc.dev/premiumpin/apis/premiumpin-property-records-api/revisions/18f5ec1c629c?raw)
