{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openmail-sh/json-schema/openmail-sh-owned-domain-schema.json",
  "title": "OwnedDomain",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openmail-sh-openapi.json#/components/schemas/OwnedDomain",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string",
      "description": "Owned domain ID"
    },
    "domain": {
      "type": "string",
      "description": "The domain your organisation controls, e.g. `acme.com`. Subdomains are covered too."
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "verified",
        "failed"
      ],
      "description": "`pending` — added, TXT record not yet seen. `verified` — recipients on this domain are not metered as cold outreach. `failed` — the record was verified before and has since disappeared; publish it again and call verify."
    },
    "record": {
      "type": "object",
      "description": "The one TXT record to publish to prove ownership.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "TXT"
          ]
        },
        "host": {
          "type": "string",
          "description": "Record name, e.g. `_openmail-owner.acme.com`"
        },
        "value": {
          "type": "string",
          "description": "Record value, e.g. `openmail-owner=…`"
        }
      }
    },
    "verifiedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "checkedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the record was last looked up, whatever the result."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}