Skip to Content
Xeonr Developer Docs

Register Legacy Prefix

POST
/xeonr.auth.api.v1.ApiKeysService/RegisterLegacyPrefix

Claims a product's historical key prefix (cpk_) for the calling application, so tokens carrying it can be imported and verified without customers rotating them. Idempotent for the same application and format.

Service accounts only.

Required scopes: auth:api-keys:import

Authorization

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

prefix?string

The product's token prefix, underscore included (cpk_, or a multi-part one like burrow's burrow_tok_). Globally unique: two applications cannot claim the same prefix.

Match^[a-z][a-z0-9_]*_$
Length2 <= length <= 16
hashFormat?not unknown

How a legacy (product-issued) key's presented token maps to the stored hash. New xk_ keys are always SHA256_FULL.

Value in"API_KEY_HASH_FORMAT_UNSPECIFIED" | "API_KEY_HASH_FORMAT_SHA256_FULL" | "API_KEY_HASH_FORMAT_SHA256_SUFFIX"
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://auth.xeonr.io/xeonr.auth.api.v1.ApiKeysService/RegisterLegacyPrefix" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "prefix": {
    "prefix": "string",
    "hashFormat": "API_KEY_HASH_FORMAT_UNSPECIFIED",
    "applicationId": "string",
    "createdAt": "2023-01-15T01:30:15.01Z"
  }
}