{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentisend-com/json-schema/agentisend-com-post-api-keys-by-id-rotate-reply-schema.json",
  "title": "PostApi_keysBy_idRotateReply",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentisend-com-api-keys-api-openapi.yml#/components/schemas/PostApi_keysBy_idRotateReply",
  "properties": {
    "budget_per_period": {
      "anyOf": [
        {
          "maximum": 9007199254740991,
          "minimum": -9007199254740991,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      "type": "string"
    },
    "domain_scope": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "type": "string"
    },
    "last_used_at": {
      "anyOf": [
        {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "loop_guard": {
      "enum": [
        "off",
        "repetition-only",
        "full"
      ],
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "object": {
      "const": "api_key",
      "type": "string"
    },
    "period": {
      "enum": [
        "hourly",
        "daily",
        "monthly"
      ],
      "type": "string"
    },
    "permission": {
      "enum": [
        "full_access",
        "sending_access"
      ],
      "type": "string"
    },
    "previous_key_expires_at": {
      "anyOf": [
        {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "rate_ceiling_per_minute": {
      "anyOf": [
        {
          "maximum": 9007199254740991,
          "minimum": -9007199254740991,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "request_count_30d": {
      "maximum": 9007199254740991,
      "minimum": -9007199254740991,
      "type": "integer"
    },
    "rotated_at": {
      "anyOf": [
        {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "scopes": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "system": {
      "type": "boolean"
    },
    "token": {
      "type": "string"
    },
    "token_prefix": {
      "type": "string"
    }
  },
  "required": [
    "object",
    "id",
    "name",
    "permission",
    "domain_scope",
    "scopes",
    "expires_at",
    "token_prefix",
    "system",
    "created_at",
    "last_used_at",
    "request_count_30d",
    "rotated_at",
    "previous_key_expires_at",
    "budget_per_period",
    "period",
    "rate_ceiling_per_minute",
    "loop_guard",
    "token"
  ],
  "type": "object"
}