Mega icon

Mega

Work with Mega API

Message → Create

AI-generated

Summary

Create a new message in a specified conversation with optional content, attachments, and metadata.

Inputs

  • Conversation ID (required) — The ID of the conversation in which to create the message.
  • Content — Text content of the message; can be omitted if attachments are provided.
  • Attachments Source (required) — Source from which to read attachments; currently supports binary properties.
  • Attachment Binary Properties — JSON array specifying binary property names containing the attachments.
  • Message Type (required) — Specifies whether the message is incoming or outgoing.
  • Private — Flag indicating if the message is a private note (default false).
  • Content Type (required) — Defines the content format/type of the message, e.g., text, article, cards, form.
  • Content Attributes — A JSON object of additional attributes depending on the content type.
  • Campaign ID — An optional campaign ID to associate with the message.
  • Template Params — JSON object of WhatsApp template parameters for structured messages.

Output shape

a single record containing the created message's data as returned by the API

The output includes message details such as IDs, content, type, and metadata. Attachments are handled via binary properties but the response does not include the actual binary data.

Links

Discussion