SurfacedBySurfacedBy Docs
DocumentationConsoleReference

Keys

Mint, list, and revoke Console API keys.

Ask an AI:Open in ChatGPTOpen in Claude

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 in plaintext once; 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, and revoked_reason. Filter with ?is_test=true or ?is_test=false. The full key is never returned.
  • Revoke takes effect immediately. A revoked key is rejected with 401 invalid_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.

GET
/keys

Query Parameters

is_test?Is Test

Response Body

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"
    }
  ]
}
POST
/keys

Empty Object

Response Body

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"
    }
  ]
}
DELETE
/keys/{key_id}

Path Parameters

key_idKey Id

Response Body

curl -X DELETE "https://api.surfacedby.com/api/v1/console/keys/string"
null
{
  "detail": [
    {
      "ctx": {},
      "input": null,
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}