{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"phone_number_id": {
"type": "string",
"description": "The ID of the sending phone number"
},
"audio": {
"type": "object",
"description": "Audio message content. Required when type is 'audio'.",
"properties": {
"id": {
"type": "string",
"description": "Media object ID"
},
"link": {
"type": "string",
"description": "Publicly accessible URL of the audio file"
}
}
},
"context": {
"type": "object",
"description": "For reply messages, contains the ID of the message being replied to",
"properties": {
"message_id": {
"type": "string",
"description": "ID of the message to reply to"
}
}
},
"document": {
"type": "object",
"description": "Document message content. Required when type is 'document'.",
"properties": {
"id": {
"type": "string",
"description": "Media object ID"
},
"link": {
"type": "string",
"description": "Publicly accessible URL of the document"
},
"caption": {
"type": "string",
"description": "Document caption text"
},
"filename": {
"type": "string",
"description": "Filename displayed in the message"
}
}
},
"image": {
"type": "object",
"description": "Image message content. Required when type is 'image'.",
"properties": {
"id": {
"type": "string",
"description": "Media object ID (from media upload)"
},
"link": {
"type": "string",
"description": "Publicly accessible URL of the image"
},
"caption": {
"type": "string",
"description": "Image caption text"
}
}
},
"messaging_product": {
"type": "string",
"description": "Messaging service used. Must be 'whatsapp'.",
"enum": [
"whatsapp"
]
},
"reaction": {
"type": "object",
"description": "Reaction message content. Required when type is 'reaction'.",
"properties": {
"message_id": {
"type": "string",
"description": "ID of the message to react to"
},
"emoji": {
"type": "string",
"description": "Emoji to react with (or empty string to remove reaction)"
}
}
},
"recipient_type": {
"type": "string",
"description": "Recipient type. Use 'individual' to send to a single phone number.",
"enum": [
"individual",
"group"
]
},
"template": {
"type": "object",
"description": "Template message content. Required when type is 'template'.",
"properties": {
"name": {
"type": "string",
"description": "The template name"
},
"language": {
"type": "object",
"description": "Template language"
},
"components": {
"type": "array",
"description": "Template component variable values"
}
}
},
"text": {
"type": "object",
"description": "Text message content. Required when type is 'text'.",
"properties": {
"body": {
"type": "string",
"description": "Message text (max 4096 characters)"
},
"preview_url": {
"type": "boolean",
"description": "Whether to render link previews for URLs in the message body"
}
}
},
"to": {
"type": "string",
"description": "Recipient's phone number in E.164 format (e.g. +14155552671) for individuals, or group ID for groups"
},
"type": {
"type": "string",
"description": "Type of message to send",
"enum": [
"text",
"image",
"audio",
"video",
"document",
"sticker",
"template",
"interactive",
"contacts",
"location",
"reaction"
]
},
"video": {
"type": "object",
"description": "Video message content. Required when type is 'video'.",
"properties": {
"id": {
"type": "string",
"description": "Media object ID"
},
"link": {
"type": "string",
"description": "Publicly accessible URL of the video"
},
"caption": {
"type": "string",
"description": "Video caption text"
}
}
}
},
"required": [
"PCID",
"phone_number_id",
"messaging_product",
"to",
"type"
]
}