Docsopenapi.json · llms.txt · llms-full.txt

Create an API key

POST/keyskeys.write

Creates an API key of either kind — see the API page. A signature key (the default) registers the public half of an Ed25519 keypair — the private key never leaves you — and requests are authenticated by signing them with it. A bearer key returns a stp_… secret once (stomped stores only a hash); send it as Authorization: Bearer …. Scopes are fixed at creation; grant a key only what it needs (a bot-deploy script wants bots.read + bots.write, nothing more). An account holds at most 20 unrevoked keys (409 when full).

Body

object

Returns

idstring
kind"bearer" | "signature"
namestring
publicKeystring | nullThe registered key for signature keys, else null.
scopes"bots.read" | "bots.write" | "keys.read" | "keys.write" | "account.read" | "account.write"[]
createdAtstring
lastUsedAtstring | null
revokedAtstring | null
secretstring · optionalBearer keys only: the stp_… token, shown exactly once — stomped stores a hash.