{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendly-now/json-schema/sendly-now-campaign-v1-list-schema.json",
  "title": "CampaignV1List",
  "description": "Cursor-paginated list of campaigns.",
  "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/CampaignV1List",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/CampaignV1"
      },
      "type": "array"
    },
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "description": "Pass as `after` to fetch the next page. `null` on the last page.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "has_more",
    "next_cursor"
  ],
  "type": "object",
  "$defs": {
    "CampaignV1": {
      "description": "A campaign as exposed on the v1 API.",
      "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"
    }
  }
}