{
"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"
}
}
},
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "object",
"description": "Contact name"
},
"phones": {
"type": "array",
"items": {
"type": "object",
"properties": {
"phone": {
"type": "string"
},
"type": {
"type": "string",
"description": "Phone type (CELL, MAIN, HOME, WORK)"
}
}
},
"description": "Contact phone numbers"
},
"emails": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"type": {
"type": "string",
"description": "Email type (HOME, WORK)"
}
}
},
"description": "Contact email addresses"
}
}
},
"description": "Contacts message content. Required when type is 'contacts'. Array of contact objects."
},
"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"
}
}
},
"interactive": {
"type": "object",
"description": "Interactive message content. Required when type is 'interactive'. Supports list, button, product, and product_list subtypes.",
"properties": {
"type": {
"type": "string",
"description": "Interactive message subtype: list, button, product, product_list",
"enum": [
"list",
"button",
"product",
"product_list"
]
},
"header": {
"type": "object",
"description": "Optional header (text, image, video, or document)"
},
"body": {
"type": "object",
"description": "Body text of the interactive message"
},
"footer": {
"type": "object",
"description": "Optional footer text"
},
"action": {
"type": "object",
"description": "Action object (buttons or list sections)"
}
}
},
"location": {
"type": "object",
"description": "Location message content. Required when type is 'location'.",
"properties": {
"longitude": {
"type": "number",
"description": "Location longitude"
},
"latitude": {
"type": "number",
"description": "Location latitude"
},
"name": {
"type": "string",
"description": "Location name"
},
"address": {
"type": "string",
"description": "Location address"
}
}
},
"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"
]
},
"sticker": {
"type": "object",
"description": "Sticker message content. Required when type is 'sticker'.",
"properties": {
"id": {
"type": "string",
"description": "Media object ID (from media upload)"
},
"link": {
"type": "string",
"description": "Publicly accessible URL of the sticker (WebP format)"
}
}
},
"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",
"items": {
"type": "object"
},
"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"
]
}