DocumentationConsoleReference
Keys
Mint, list, and revoke Console API keys.
Manage keys from a signed-in Console session with workspace key-management permission. Integration keys cannot list, issue, or revoke credentials. Send your integration key in the X-API-Key header on supported operations. A key is sk_live_ or sk_test_ followed by 32 characters.
- Mint with
{"name": "...", "is_test": false}. The response returns the full key inplaintextonce; store it immediately, because it cannot be shown again. - List returns every Console key on the account, including revoked ones, with
id,name,prefix(the first 16 characters),is_test,created_at,last_used_at,expires_at,revoked_at, andrevoked_reason. Filter with?is_test=trueor?is_test=false. The full key is never returned. - Revoke takes effect immediately. A revoked key is rejected with
401invalid_api_key.
Test keys (sk_test_) behave like live keys except when submitting a check, where they return a priced placeholder response without debiting credits or starting a check. See Test keys.
curl -X GET "https://api.surfacedby.com/api/v1/console/keys?is_test=true"null{
"detail": [
{
"ctx": {},
"input": null,
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}curl -X POST "https://api.surfacedby.com/api/v1/console/keys" \ -H "Content-Type: application/json" \ -d '{}'null{
"detail": [
{
"ctx": {},
"input": null,
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}curl -X DELETE "https://api.surfacedby.com/api/v1/console/keys/string"null{
"detail": [
{
"ctx": {},
"input": null,
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}