{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/inboxpolicy-com/json-schema/inboxpolicy-com-create-secret-request-schema.json",
  "title": "CreateSecretRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/inboxpolicy-com-openapi.json#/components/schemas/CreateSecretRequest",
  "properties": {
    "name": {
      "type": "string",
      "description": "Human-readable name for the secret."
    },
    "secret_type": {
      "$ref": "#/$defs/SecretType",
      "description": "Type of secret: 'login' for credentials, 'string' for simple values."
    },
    "username": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Login username. Required for 'login' type."
    },
    "password": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Login password. Required for 'login' type."
    },
    "totp_secret": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional TOTP secret (base32 encoded). Only for 'login' type."
    },
    "value": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Secret value. Required for 'string' type."
    }
  },
  "type": "object",
  "required": [
    "name",
    "secret_type"
  ],
  "$defs": {
    "SecretType": {
      "type": "string",
      "enum": [
        "login",
        "string"
      ],
      "title": "SecretType"
    }
  }
}