{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendly-now/json-schema/sendly-now-campaign-v1-schema.json",
  "title": "CampaignV1",
  "description": "A campaign as exposed on the v1 API.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendly-now-campaigns-api-openapi.yml#/components/schemas/CampaignV1",
  "properties": {
    "audience_type": {
      "enum": [
        "ALL",
        "FILTERED",
        "SEGMENT",
        "LIST"
      ],
      "type": "string"
    },
    "created_at": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "format": "uuid",
      "type": "string"
    },
    "list_id": {
      "format": "uuid",
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": "string"
    },
    "scheduled_at": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "sent_at": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "stats": {
      "properties": {
        "bounced": {
          "type": "integer"
        },
        "clicked": {
          "type": "integer"
        },
        "delivered": {
          "type": "integer"
        },
        "opened": {
          "type": "integer"
        },
        "sent": {
          "type": "integer"
        },
        "total_recipients": {
          "type": "integer"
        }
      },
      "required": [
        "total_recipients",
        "sent",
        "delivered",
        "opened",
        "clicked",
        "bounced"
      ],
      "type": "object"
    },
    "status": {
      "enum": [
        "DRAFT",
        "SCHEDULED",
        "SENDING",
        "PAUSED",
        "SENT",
        "CANCELLED"
      ],
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "topic_id": {
      "format": "uuid",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "status",
    "subject",
    "audience_type",
    "list_id",
    "topic_id",
    "scheduled_at",
    "sent_at",
    "created_at",
    "stats"
  ],
  "type": "object"
}