Unkey · Schema

UpdateKeyCreditsRefill

Configuration for automatic credit refill behavior.

API KeysRate LimitingAuthenticationDeveloper PlatformAccess ControlIdentityAnalytics

Properties

Name Type Description
interval string How often credits are automatically refilled.
amount integer Number of credits to add during each refill cycle.
refillDay integer Day of the month for monthly refills (1-31). Only required when interval is 'monthly'. For days beyond the month's length, refill occurs on the last day of the month.
View JSON Schema on GitHub

JSON Schema

unkey-updatekeycreditsrefill-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/UpdateKeyCreditsRefill",
  "title": "UpdateKeyCreditsRefill",
  "type": [
    "object",
    "null"
  ],
  "description": "Configuration for automatic credit refill behavior.",
  "properties": {
    "interval": {
      "type": "string",
      "enum": [
        "daily",
        "monthly"
      ],
      "x-speakeasy-unknown-values": "allow",
      "description": "How often credits are automatically refilled.",
      "example": "daily"
    },
    "amount": {
      "type": "integer",
      "format": "int64",
      "minimum": 1,
      "maximum": 9223372036854776000,
      "description": "Number of credits to add during each refill cycle.",
      "example": 1000
    },
    "refillDay": {
      "type": "integer",
      "minimum": 1,
      "maximum": 31,
      "description": "Day of the month for monthly refills (1-31).\nOnly required when interval is 'monthly'.\nFor days beyond the month's length, refill occurs on the last day of the month.\n",
      "example": 15
    }
  },
  "required": [
    "interval",
    "amount"
  ],
  "additionalProperties": false
}