Apikee

Keys

Issue, rotate, and revoke API keys on the apikee platform.

Keys

API keys are issued per client. A client can have multiple active keys simultaneously (useful for rotation).

Issue a key

Keys are created as part of client creation or added later:

# Add a key to an existing client
curl -X PUT "https://apikee.dev/api/v1/client/{uuid}?project_env=my-api-production" \
  -H "x-api-key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "keys": [
      {
        "name": "Production Key v2",
        "expiresAt": "2027-01-01T00:00:00Z",
        "autoRotate": true
      }
    ]
  }'

The raw key secret appears once in the API response and is never stored. Deliver it to the client immediately via a secure channel.

Key fields

FieldTypeDescription
idstringInternal key ID
namestringDisplay name
prefixstringFirst chars of the key (for identification)
keystring | nullRaw secret — only returned on creation
enabledbooleanWhether the key is currently active
requestCountintegerTotal validated requests
expiresAtdatetime | nullExpiry (also embedded in the key itself)
autoRotateboolean | nullAuto-renew before expiry
metadataobject | nullArbitrary metadata

Revoke a key

curl -X DELETE "https://apikee.dev/api/v1/client/{uuid}?keyId={keyId}" \
  -H "x-api-key: sk_live_..."

Because expiry is embedded in the key, you only need to call the revocation endpoint for early invalidation. Keys that have naturally expired are rejected by the SDK without any API call.

On this page