{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Create Service Account",
  "description": "Create a new service account for programmatic API access. Issues a default access token alongside the service account; the raw token value is returned once and cannot be retrieved later.",
  "type": "object",
  "required": ["name", "defaultAccessTokenExpirationInMinutes"],
  "properties": {
    "name": {
      "type": "string",
      "title": "Name",
      "description": "A human-readable name for the service account",
      "examples": ["CI Bot", "Deploy Pipeline"]
    },
    "description": {
      "type": "string",
      "title": "Description",
      "description": "What this service account is used for",
      "examples": ["Continuous integration pipeline"]
    },
    "defaultAccessTokenExpirationInMinutes": {
      "type": "integer",
      "title": "Default Access Token Expiration",
      "description": "How long the default access token issued alongside the service account remains valid, in minutes. The raw token value is returned once on creation and cannot be retrieved again. Capped at 5,256,000 minutes (10 years) by the service-account expiry policy.",
      "minimum": 1,
      "maximum": 5256000,
      "oneOf": [
        { "const": 10080, "title": "7 days" },
        { "const": 43200, "title": "30 days" },
        { "const": 129600, "title": "90 days" },
        { "const": 525600, "title": "1 year" },
        { "const": 1576800, "title": "3 years" },
        { "const": 5256000, "title": "10 years" }
      ]
    }
  }
}
