Mega icon

Mega

Work with Mega API

Conversation → Create and Send Message

AI-generated

Summary

Create a new conversation for a specified contact in an inbox and optionally send an initial message and/or a subsequent message with attachments, setting conversation status, assignee, and custom attributes.

Inputs

  • Source ID (required) — The source identifier of the contact inbox used to create the conversation.
  • Inbox ID (required) — The numeric identifier of the inbox that will own the conversation.
  • Contact ID (required) — The numeric identifier of the contact linked to the new conversation.
  • Status (required) — The initial status of the created conversation; options include Open, Pending, Resolved, or Snoozed.
  • Assignee ID — Optional numeric identifier for assigning the conversation to a specific user.
  • Initial Message — Optional first message content sent together with the conversation creation.
  • Custom Attributes — Optional JSON object containing custom attributes to attach to the conversation.
  • Message Content — Optional message content to send after creating the conversation; can be omitted if attachments are provided.
  • Message Visibility (required) — Determines whether the sent message is normal or a private note.
  • Attachments Source (required) — Source of attachments to send with the message; currently supports reading from specified binary properties.
  • Attachment Binary Properties — JSON array listing the binary property names that contain attachment data.

Output shape

a single record representing the created conversation, including identifiers and message details as returned by the underlying API

The created conversation includes the initial message if specified, followed by the optionally sent message with content and/or attachments. Attachments are read from the input item binary properties provided. If no message content or attachments are given after creation, no message is sent beyond the initial message (if any). Success or failure to send messages after conversation creation will affect the overall operation result.

Links

Discussion