Skip to main content
POST
/
v1
/
apps
/
{id}
/
keys
Mint an API key
curl --request POST \
  --url https://api.alakazam.gg/v1/apps/{id}/keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "kind": "publishable",
  "mode": "test",
  "name": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "key": "<string>",
  "prefix": "sk_test_",
  "last4": "<string>",
  "scopes": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

A Supabase user access token (for app/key management).

Path Parameters

id
string<uuid>
required

Body

application/json
kind
enum<string>
default:publishable
Available options:
publishable,
secret
mode
enum<string>
default:test
Available options:
test,
live
name
string

Response

The minted key (plaintext shown once)

Returned ONCE at creation — the plaintext key is unrecoverable afterward.

id
string<uuid>
key
string

The full plaintext API key. Store it now; it is never shown again.

prefix
string
Example:

"sk_test_"

last4
string
kind
enum<string>
Available options:
publishable,
secret
mode
enum<string>
Available options:
test,
live
scopes
string[]