action whatsapp_send_message { label: "Send-Message" provider: whatsapp method: POST path: "/messages" encoding: json input: { type: "object" required: ["to"] properties: { audio: { type: "object" description: "The media object containing audio" } contacts: { type: "array" items: { type: "object" properties: { addresses: { type: "array" description: "Full contact address(es)" items: { type: "object" required: ["city", "country", "country_code", "state", "street", "type", "zip"] properties: { city: { type: "string" description: "City name" } country: { type: "string" description: "Full country name" } country_code: { type: "string" description: "Two-letter country abbreviation" } state: { type: "string" description: "State abbreviation" } street: { type: "string" description: "Street number and name" } type: { type: "string" description: "Standard Values: HOME, WORK" } zip: { type: "string" description: "ZIP code" } } } } birthday: { type: "string" description: "YYYY-MM-DD formatted string" } emails: { type: "array" description: "Contact email address(es)" items: { type: "object" required: ["email", "type"] properties: { email: { type: "string" } type: { type: "string" } } } } ims: { type: "array" items: { type: "string" } } name: { type: "object" description: "Full contact name" required: ["formatted_name"] properties: { first_name: { type: "string" description: "First name" } formatted_name: { type: "string" description: "Full name as it normally appears" } last_name: { type: "string" description: "Last name" } prefix: { type: "string" description: "Name preffix" } suffix: { type: "string" description: "Name suffix" } } } org: { type: "object" description: "Contact organization information" required: ["company"] properties: { company: { type: "string" description: "Name of the contact's company" } department: { type: "string" description: "Name of the contact's department" } title: { type: "string" description: "Contact's business title" } } } phones: { type: "array" description: "Contact phone number(s)" items: { type: "object" properties: { phone: { type: "string" } type: { type: "string" description: "Standard Values: CELL, MAIN, IPHONE, HOME, WORK" } wa_id: { type: "string" description: "WhatsApp ID" } } } } urls: { type: "array" description: "Contact URL(s)" items: { type: "object" description: "Standard Values: HOME, WORK" properties: { type: { type: "string" description: "Standard Values: HOME, WORK" } url: { type: "string" description: "URL" } } } } } } } document: { type: "object" description: "The media object containing a document" } hsm: { type: "object" description: "The containing element for the message content — Indicates that the message is highly structured. Parameters contained within provide the structure." required: ["element_name", "language", "localizable_params", "namespace"] properties: { element_name: { type: "string" description: "The element name that indicates which template to use within the namespace" } language: { type: "object" required: ["code", "policy"] properties: { code: { type: "string" description: "The code of the language or locale to use — Accepts both language and language_locale formats (e.g., en and en_US)." } policy: { type: "string" description: "The language policy the message should follow" enum: ["fallback", "deterministic"] } } } localizable_params: { type: "array" description: "This field is an array of values to apply to variables in the template" items: { type: "object" required: ["default"] properties: { currency: { type: "object" required: ["amount_1000", "currency_code"] properties: { amount_1000: { type: "integer" format: "int32" } currency_code: { type: "string" } } } date_time: { type: "object" description: "The Whatsapp Business API Client will attempt to format the date/time based on a specified localization." properties: { component: { type: "object" description: "Date/time by component" properties: { day_of_month: { type: "integer" format: "int32" description: "The day of month" } day_of_week: { type: "integer" format: "int32" description: "Both strings and numbers are accepted. If different from the value derived from the date (if specified), use the derived value." enum: ["1", "2", "3", "4", "5", "6", "7"] } hour: { type: "integer" format: "int32" description: "The hour" } minute: { type: "integer" format: "int32" description: "The minute" } month: { type: "integer" format: "int32" description: "The month" } year: { type: "integer" format: "int32" description: "The year" } } } unix_epoch: { type: "object" description: "Date/time by Unix epoch" properties: { timestamp: { type: "integer" format: "int32" description: "Epoch timestamp in seconds" } } } } } default: { type: "string" description: "Default text if localization fails" } } } } namespace: { type: "string" description: "The namespace that will be used" } } } image: { type: "object" description: "The media object containing an image" } location: { type: "object" required: ["address", "latitude", "longitude", "name"] properties: { address: { type: "string" description: "Address of the location. Only displayed if name is present." } latitude: { type: "string" description: "Latitude of the location" } longitude: { type: "string" description: "Longitude of the location" } name: { type: "string" description: "Name of the location" } } } preview_url: { type: "boolean" description: "Specifying preview_url in the request is optional when not including a URL in your message.\nTo include a URL preview, set preview_url to true in the message body and make sure the URL begins with http:// or https://. For more information, see the Sending URLs in Text Messages section." } recipient_type: { type: "string" description: "Determines whether the recipient is an individual or a group\nSpecifying recipient_type in the request is optional when the value is individual.\nHowever, recipient_type is required when using group. If sending a text message to a group, see the Sending Group Messages documentation." enum: ["individual", "group"] } text: { type: "object" required: ["body"] properties: { body: { type: "string" } } } to: { type: "string" description: "When recipient_type is individual, this field is the WhatsApp ID (phone number) returned from contacts endpoint. When recipient_type is group, this field is the WhatsApp group ID." } ttl: { type: "object" } type: { type: "string" description: "type of the message" enum: ["audio", "contacts", "document", "hsm", "image", "location", "text", "video", "voice", "unknown"] } video: { type: "object" description: "The media object containing a video" } } } output: { type: "object" } }