OpenPhn docs
Referenceauth

Rotate an API key (24h grace window)

Mint a new key with the same scope + number_ids. Set the old key's expires_at to now+24h. Usage of the old key during the grace window writes an api_key.rotated_key_used audit event.

POST
/auth/api-keys/{key_id}/rotate

Path Parameters

key_id*Key Id

Response Body

application/json

application/json

curl -X POST "https://loading/auth/api-keys/string/rotate"
{
  "id": "string",
  "prefix": "string",
  "api_key": "string",
  "rotated_from": "string",
  "created_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}