auth

Rotate Api Key Encryption

Re-encrypt the user's stored BYOK key under the current KDF.

Escape hatch for the v1→v2 migration: if the bulk migrate script can't decrypt a row (because JWT_SECRET_KEY was rotated before this fix landed), the row stays at v1 and chat returns "decrypt failed". The user can re-save their key from the UI — but if they don't have the plaintext anymore, this endpoint at least lets them confirm they're already on v2. Idempotent: a v2 row stays v2.

post/api/auth/api-key/rotate-encryption

Request

  • Base URL: https://fojin.app (the document declares no server; this is the origin it was published from)
  • URL: https://fojin.app/api/auth/api-key/rotate-encryption
  • Auth: HTTP bearer

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.