Skip to content
API referenceRotate a virtual key's API key

Rotate a virtual key's API key

POST/v1/virtual-keys/{slug}/rotate

Rotate a virtual key's API key.

Issues a new API key and answers it once: store it now. The previous API key stops authenticating on the next request (for a key created before API keys existed, the bare slug stops working). The slug, settings, limits, usage and logs are unchanged, so routing configs that use the key keep working.

Requires an organization admin key, or a workspace admin key for the key's workspace.

Errors: 403 without the required role; 404 when no key has this slug; 409 when the key is EXPIRED.

Authorization

  • AuthorizationBearer va_

    A platform API key (va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.

Path parameters

  • slugstringrequired

    the key's slug

Responses

200application/json
  • slugstringrequired

    The key's slug, unchanged by the rotation.

  • api_keystringrequired

    The new API key: the slug, a dot, then a new secret. Shown only once.

  • token_hintstringrequired

    The last characters of the new secret, as later shown on the key as token_hint.

  • rotated_atstring<date-time>required

    When the key was rotated (ISO 8601 date-time).

NVIDIA Inception Program member

VectorAxis is built by GK Labs, a member of NVIDIA Inception.