{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/groundmail-dev/json-schema/groundmail-dev-create-smtp-credential-response-schema.json",
  "title": "CreateSmtpCredentialResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/groundmail-dev-smtpcredentials-api-openapi.yml#/components/schemas/CreateSmtpCredentialResponse",
  "allOf": [
    {
      "$ref": "#/$defs/SmtpCredential"
    },
    {
      "type": "object",
      "required": [
        "password"
      ],
      "properties": {
        "password": {
          "type": "string",
          "description": "Full SMTP password (`gmsmtp_…`), shown once at creation"
        }
      }
    }
  ],
  "$defs": {
    "SmtpCredential": {
      "type": "object",
      "required": [
        "id",
        "name",
        "password_prefix",
        "username",
        "host",
        "port",
        "last_used_at",
        "revoked_at",
        "created_at"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "password_prefix": {
          "type": "string",
          "description": "First characters of the SMTP password for identification"
        },
        "username": {
          "type": "string",
          "description": "Always `groundmail`"
        },
        "host": {
          "type": "string"
        },
        "port": {
          "type": "integer"
        },
        "last_used_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "revoked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}