v1
Northflank docs for LLMs
API
CLI
JS Client

Org / Api Tokens /

Rotate a key on an API token

Creates a new key for an API token and sets all other keys to expire.

Required permission

Account > Admin > ApiTokens > Update

Path parameters

    • tokenId

      string required
      ID of the API token

Request body

  • {object}
    • otherKeysExpiresAt

      string
      Expiry time for all existing keys. Defaults to immediate expiry.

Response body

  • {object}
    Response object.
    • data

      {object} required
      Result data.
      • key

        {object} required
        The newly created API key.
        • id

          string required
          UUID of the new API key.
        • issuedAt

          string required
          The time the key was issued.
      • token

        string required
        The API token for authentication.
API
CLI
JS Client

POST /v1/tokens/{tokenId}/keys

POST /v1/teams/{teamId}/tokens/{tokenId}/keys

Example request

Request body
curl --header "Content-Type: application/json" \
  --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
  --request POST \
  --data '{}' \
  https://api.northflank.com/v1/tokens/{tokenId}/keys

Example response

200 OK

The newly created API key and token.

JSON

{
  "data": {
    "key": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "issuedAt": "2021-01-20T11:19:53.175Z"
    },
    "token": "eyJhbGciOiJIUzI1NiIs..."
  }
}

© 2026 Northflank Ltd. All rights reserved.

northflank.com / Terms / Privacy / feedback@northflank.com