{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendly-now/json-schema/sendly-now-domain-schema.json",
  "title": "Domain",
  "description": "A sending identity: one domain registered with SES, with its own DKIM keys, its own MAIL FROM and its own reputation.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendly-now-openapi.json#/components/schemas/Domain",
  "properties": {
    "createdAt": {
      "description": "ISO 8601 datetime string",
      "format": "date-time",
      "type": "string"
    },
    "defaultFromAddress": {
      "description": "The address a send on this stream uses when it names none. Always on this identity's own host.",
      "type": [
        "string",
        "null"
      ]
    },
    "defaultFromName": {
      "description": "The display name recipients see beside any address on this identity when a send names none, e.g. `Acme` in `Acme <receipts@mail.example.com>`. A send's own `name` and its template's from-name both win over it; `null` falls back to the project name.",
      "type": [
        "string",
        "null"
      ]
    },
    "dkimStatus": {
      "description": "Result of the last DNS check for this record type.",
      "enum": [
        "NOT_CHECKED",
        "PENDING",
        "VERIFIED",
        "FAILED",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "dkimTokens": {
      "description": "SES DKIM tokens to publish as CNAME records before the domain can verify.",
      "items": {
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "dmarcStatus": {
      "description": "Result of the last DNS check for this record type.",
      "enum": [
        "NOT_CHECKED",
        "PENDING",
        "VERIFIED",
        "FAILED",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "domain": {
      "description": "The bare domain, e.g. `mail.acme.com`.",
      "type": "string"
    },
    "id": {
      "format": "uuid",
      "type": "string"
    },
    "lastHealthCheckAt": {
      "description": "ISO 8601 datetime string",
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "mailFromDomain": {
      "description": "Custom MAIL FROM subdomain SES has on record (normally `sendly.<domain>`).",
      "type": [
        "string",
        "null"
      ]
    },
    "mailFromDomainStatus": {
      "description": "SES custom MAIL FROM setup state. Only `Success` means SES is using it.",
      "enum": [
        "Pending",
        "Success",
        "Failed",
        "TemporaryFailure",
        "NotConfigured",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "projectId": {
      "format": "uuid",
      "type": "string"
    },
    "receivingEnabled": {
      "description": "Whether inbound mail for this domain is routed to Sendly mailboxes.",
      "type": "boolean"
    },
    "region": {
      "type": [
        "string",
        "null"
      ]
    },
    "spfStatus": {
      "description": "Result of the last DNS check for this record type.",
      "enum": [
        "NOT_CHECKED",
        "PENDING",
        "VERIFIED",
        "FAILED",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "stream": {
      "description": "Which traffic this identity carries. `null` means unassigned, and an unassigned identity carries every stream — the behaviour of every domain added before per-stream identities. A send whose stream does not match an ASSIGNED identity is refused.",
      "enum": [
        "TRANSACTIONAL",
        "MARKETING",
        null
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "streamDefault": {
      "description": "Whether this is the project's default identity for its stream — the one a send picks when it names no from-address. At most one per (project, stream).",
      "type": "boolean"
    },
    "updatedAt": {
      "description": "ISO 8601 datetime string",
      "format": "date-time",
      "type": "string"
    },
    "verified": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "projectId",
    "domain",
    "verified",
    "receivingEnabled",
    "createdAt",
    "updatedAt"
  ],
  "type": "object"
}