{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/customdomain-ai/json-schema/customdomain-ai-certificate-schema.json",
  "title": "Certificate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/customdomain-ai-secure-api-openapi.yml#/components/schemas/Certificate",
  "type": "object",
  "required": [
    "domain",
    "status",
    "managed"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "application_id": {
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/CertStatus"
    },
    "issuer": {
      "type": "string"
    },
    "not_before": {
      "type": "string",
      "format": "date-time"
    },
    "not_after": {
      "type": "string",
      "format": "date-time"
    },
    "last_error": {
      "type": "string",
      "description": "most recent issuance/renewal failure; empty when healthy."
    },
    "managed": {
      "type": "boolean",
      "description": "true = edge auto-manages (ACME); false = operator-imported."
    },
    "renew_after": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "CertStatus": {
      "type": "string",
      "enum": [
        "pending",
        "issued",
        "renewing",
        "failed",
        "revoked"
      ]
    }
  }
}