{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/brevo/main/json-schema/brevo-whats-app-campaign-list-schema.json",
  "title": "WhatsAppCampaignList",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brevo-whatsapp-campaigns-api-openapi.yml#/components/schemas/WhatsAppCampaignList",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of WhatsApp campaigns."
    },
    "campaigns": {
      "type": "array",
      "description": "List of WhatsApp campaign summaries.",
      "items": {
        "$ref": "#/$defs/WhatsAppCampaign"
      }
    }
  },
  "$defs": {
    "WhatsAppCampaign": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "description": "Unique identifier of the campaign."
        },
        "campaignName": {
          "type": "string",
          "description": "Name of the campaign."
        },
        "campaignStatus": {
          "type": "string",
          "description": "Current status of the campaign.",
          "enum": [
            "draft",
            "scheduled",
            "sent",
            "archive"
          ]
        },
        "templateId": {
          "type": "integer",
          "format": "int64",
          "description": "ID of the WhatsApp template used for the campaign."
        },
        "scheduledAt": {
          "type": "string",
          "format": "date-time",
          "description": "UTC date-time when the campaign is scheduled to send."
        },
        "recipients": {
          "type": "object",
          "description": "Target audience for the campaign.",
          "properties": {
            "lists": {
              "type": "array",
              "description": "IDs of contact lists to target.",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            },
            "segments": {
              "type": "array",
              "description": "IDs of segments to target.",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        },
        "statistics": {
          "type": "object",
          "description": "Campaign delivery statistics.",
          "properties": {
            "sent": {
              "type": "integer",
              "format": "int64",
              "description": "Number of messages sent."
            },
            "delivered": {
              "type": "integer",
              "format": "int64",
              "description": "Number of messages delivered."
            },
            "read": {
              "type": "integer",
              "format": "int64",
              "description": "Number of messages read."
            }
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "UTC date-time when the campaign was created."
        },
        "modifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "UTC date-time when the campaign was last modified."
        }
      }
    }
  }
}