Skip to main content
POST
/
v1
/
api-keys
Mint an API key
curl --request POST \
  --url https://api.letmepost.dev/v1/api-keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "ci-publish-key",
  "prefix": "lmp_live_",
  "scopes": []
}
'
{
  "id": "<string>",
  "name": "<string>",
  "prefix": "<string>",
  "last4": "<string>",
  "scopes": [
    "<string>"
  ],
  "key": "lmp_live_AbC123…",
  "createdAt": "2023-11-07T05:31:56Z",
  "profileId": "<string>"
}

Headers

Idempotency-Key
string

Recommended on every write. Replays within 24 hours return the original response; conflicting bodies surface as 409 idempotency_conflict. See Idempotency.

Required string length: 1 - 128
Example:

"post-launch-2026-05-15-001"

Body

application/json
name
string
required
Required string length: 1 - 100
Example:

"ci-publish-key"

prefix
enum<string>
default:lmp_live_
Available options:
lmp_live_,
lmp_test_
scopes
string[]
profileId
string<uuid> | null

Optional profile scope. When set, the key only authenticates requests targeting that profile; cross-profile reads/writes 404.

Response

Key minted — plaintext shown once.

id
string
required
name
string
required
prefix
string
required
last4
string
required
scopes
string[]
required
key
string
required

Plaintext key — returned once at creation and never again. Store it securely.

Example:

"lmp_live_AbC123…"

createdAt
string<date-time>
required
profileId
string | null