YCloud - Growsales AI icon

YCloud - Growsales AI

Use YCloud to send WhatsApp messages, SMS, emails, manage templates, contacts, and more

WhatsApp Message → Enqueue (Async)

AI-generated

Summary

Enqueue a WhatsApp message to be sent asynchronously via the YCloud platform, allowing various message types and personalization through templates and media attachments.

Inputs

  • waFrom (required) — Your WhatsApp Business number registered in YCloud, selected from your account or entered manually.
  • waTo (required) — Recipient phone number, selected from contacts or entered manually.
  • messageType (required) — Type of WhatsApp message to send, such as text, template, image, audio, video, document, sticker, location, interactive, reaction, or contacts.
  • textBody (required) — Text content of the message for 'text' type messages, supporting WhatsApp formatting and up to 4096 characters.
  • textPreviewUrl — Whether to generate a link preview for text messages.
  • templateName (required) — Template name to use for 'template' message types, chosen from your YCloud templates or entered manually.
  • templateLanguage (required) — Language code of the chosen template.
  • templateHeaderType — Header type of the template that determines if a variable or media attachment is used.
  • templateHeaderVar — Value for the first variable in a text header template.
  • templateHeaderMedia — URL or media ID for image, video, or document header in the template.
  • templateBodyVar1 — Values for up to 8 template body variables to personalize the template content.
  • templateBtnUrlValue0 — URL suffix for the first button in the template, with fields for up to three buttons.
  • mediaIdOrLink (required) — Media file URL or previously uploaded media ID for image, video, audio, document, or sticker message types.
  • mediaCaption — Caption for media messages supporting caption display.
  • documentFilename — Filename shown to the recipient when sending document-type messages.
  • locationLatitude (required) — Latitude coordinate for location-type messages.
  • locationLongitude (required) — Longitude coordinate for location-type messages.
  • locationName — Name of location for location messages.
  • locationAddress — Address of location for location messages.
  • interactiveJSON (required) — JSON object describing the interactive message content for 'interactive' type messages.
  • reactionMessageId (required) — ID of the message to react to when sending a reaction message.
  • reactionEmoji — Emoji character to send as a reaction; leaving empty removes an existing reaction.
  • contactsJSON (required) — JSON array of contact card objects for 'contacts' message type.
  • additionalFields — Additional optional fields including context message ID (to reply to), external ID, and a flag to filter unsubscribed recipients.

Output shape

a JSON object representing the enqueued message details and server response.

The operation enqueues the message asynchronously and does not guarantee immediate delivery. Outputs include details necessary to track or confirm the enqueued message. Optional fields are available for template customization and advanced options. Errors and API rejections are handled as workflow errors.

Examples

Example 1: Send a text WhatsApp message asynchronously

Specify your WhatsApp Business number (waFrom), recipient number (waTo), set messageType to 'text', and provide the message text in textBody.

Example 2: Send an interactive button message asynchronously

Set messageType to 'interactive' and provide the interactiveJSON defining buttons or other interactive elements along with sender and recipient numbers.

Links

Discussion