{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/waspytech-com/json-schema/waspytech-com-post-messages-request-schema.json",
  "title": "PostMessagesRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/waspytech-com-openapi-generated.yml#/components/schemas/PostMessagesRequest",
  "type": "object",
  "properties": {
    "phoneNumberId": {
      "type": "string",
      "description": "ID del canal (de `GET /channels`)"
    },
    "to": {
      "type": "string",
      "description": "Número del destinatario en formato E.164 (`+5491126032641`)"
    },
    "type": {
      "type": "string",
      "description": "`text`, `image`, `video`, `audio`, `document`, `template`, `interactive`, `reaction`"
    },
    "text": {
      "type": "object",
      "description": "Si type=text: `{ body: string, preview_url?: boolean }`"
    },
    "image": {
      "type": "object",
      "description": "Si type=image: `{ link?: string, id?: string, caption?: string }`"
    },
    "video": {
      "type": "object",
      "description": "Si type=video: `{ link?: string, id?: string, caption?: string }`"
    },
    "audio": {
      "type": "object",
      "description": "Si type=audio: `{ link?: string, id?: string }`"
    },
    "document": {
      "type": "object",
      "description": "Si type=document: `{ link?: string, id?: string, filename?: string, caption?: string }`"
    },
    "template": {
      "type": "object",
      "description": "Si type=template: `{ name: string, language: { code: string }, components?: array }`"
    },
    "clientRef": {
      "type": "string",
      "description": "Identificador propio (máx 256 chars) que se devuelve verbatim en cada webhook y en `GET /messages/:id`"
    }
  },
  "required": [
    "phoneNumberId",
    "to",
    "type"
  ]
}