CampaignMessage

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "text",
        "image",
        "video",
        "video_note",
        "audio",
        "voice",
        "document",
        "sticker",
        "location",
        "contacts",
        "poll",
        "buttons",
        "list",
        "carousel",
        "location_request",
        "payment",
        "event"
      ],
      "description": "Tipo da mensagem. Os campos dele vão soltos, ao lado de `type`, no formato do envio."
    },
    "mentions": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Número ou id do participante."
      },
      "description": "Quem mencionar (grupos). Todo `@número` escrito no `text` (texto, legenda de mídia, enquete, botões, lista e carrossel) já vira menção, e `@todos` ou `@all` menciona todos. Em grupo que usa LID, a menção e o `@número` do texto saem com o LID do participante, como o WhatsApp faz. Evento, localização e contato não leem o texto."
    },
    "mention_all": {
      "type": "boolean",
      "description": "Menciona todos do grupo, sem aparecer no texto."
    },
    "forwarded": {
      "type": "boolean",
      "description": "Mostra como encaminhada."
    }
  },
  "required": [
    "type"
  ],
  "description": "Mensagem da campanha, no formato do [envio](/docs/enviar) (`type` e os campos do tipo, e `mentions`, `mention_all`, `forwarded`), sem `to`: o destino é cada destinatário. Vale qualquer tipo do envio menos `template` (400). Arquivo em `base64` ou `url`, como no envio.",
  "oneOf": [
    {
      "properties": {
        "type": {
          "const": "text"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentText"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "image"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentImage"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "video"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentVideo"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "video_note"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentVideoNote"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "audio"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentAudio"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "voice"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentVoice"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "document"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentDocument"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "sticker"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentSticker"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "location"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentLocation"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "contacts"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentContacts"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "poll"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentPoll"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "buttons"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentButtons"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "list"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentList"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "carousel"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentCarousel"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "location_request"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentLocationRequest"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "payment"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentPayment"
        }
      ]
    },
    {
      "properties": {
        "type": {
          "const": "event"
        }
      },
      "allOf": [
        {
          "$ref": "#/components/schemas/SendContentEvent"
        }
      ]
    }
  ],
  "unevaluatedProperties": false
}