API reference
Create an API key
**Dashboard-session only** — this operation does not accept `bk_` Bearer auth. Requires capability `apikey:manage` (Admin role). The plaintext secret is returned exactly once, in this response.
POST
/api/keys__session<token>
A signed-in Clerk dashboard session (browser cookie), not a bk_ API key. /api/keys deliberately rejects Bearer auth on every operation — a key must never be able to mint or revoke keys — so API-key management is reachable only from the Stet dashboard, not programmatically. Documented here for completeness.
In: cookie
labelstring
Length
1 <= length <= 80scopeApiKeyScope
Value in
"read" | "write"Response Body
curl -X POST "https://app.stethq.com/api/keys" \ -H "Content-Type: application/json" \ -d '{ "label": "string", "scope": "read" }'{
"id": "string",
"label": "string",
"prefix": "string",
"scope": "read",
"plaintext": "string"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}