SurfacedBySurfacedBy Docs
DocumentationConsoleReference

Keys

Mint, list, and revoke Console API keys.

Ask an AI:Open in ChatGPTOpen in Claude

Every Console API request is authenticated with a key from this resource, sent in the X-API-Key header. 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
/keys

Query Parameters

is_testIs Test

Header Parameters

X-API-KeyX-Api-Key

curl -X GET "https://api.surfacedby.com/api/v1/console/keys?is_test=true" \
  -H "X-API-Key: string"

Successful Response

null

POST
/keys
/keys

Request Body

application/jsonRequired

[key: string]any

Header Parameters

X-API-KeyX-Api-Key

curl -X POST "https://api.surfacedby.com/api/v1/console/keys" \
  -H "X-API-Key: string" \
  -H "Content-Type: application/json" \
  -d '{}'

Successful Response

null

DELETE
/keys/{key_id}
/keys/{key_id}

Path Parameters

key_id
Required
Key Id

Header Parameters

X-API-KeyX-Api-Key

curl -X DELETE "https://api.surfacedby.com/api/v1/console/keys/string" \
  -H "X-API-Key: string"

Successful Response

null