Account

Create an API key

Changed on

Creates a new API key. The plaintext key is returned once in the api_key field — store it securely. Requires an app session (JWT).

post/api-keys

Request

  • Base URL: https://api.varg.ai/v2
  • URL: https://api.varg.ai/v2/api-keys
  • Auth: HTTP bearer

Request body

namestring
type'personal' | 'service'
revealableboolean

Keep an encrypted copy so the key can be shown again (POST /api-keys/{id}/reveal). Default false = shown once.

Response

Key created

api_keystring

The plaintext key — shown only once

Example response

{
  "api_key": "varg_a1b2c3...",
  "key": {
    "key_preview": "varg_a1b2...c3d4"
  }
}

Changes