Mega icon

Mega

Work with Mega API

Scheduled Message → Create

AI-generated

Summary

Create a scheduled message either at the account level or within a specific conversation, defining content, timing, and optional recurrence details.

Inputs

  • Scope (required) — Choose whether to create the scheduled message at the account or conversation scope.
  • Conversation ID (required) — Specify the ID of the conversation when scope is 'conversation', or optionally for account scope.
  • Inbox ID — Define the inbox ID associated with the scheduled message.
  • Contact ID — For account-level scope, specify the contact ID relevant to the scheduled message.
  • Content (required) — Provide the text content of the scheduled message.
  • Scheduled At (required) — Set the UTC date and time in ISO 8601 format when the message should be sent.
  • Title — Optionally add a title to the scheduled message.
  • Template Params — Include optional JSON object for template parameters, such as WhatsApp template data.
  • Recurrence Type — Define how often the scheduled message should repeat (none, daily, weekly, monthly, yearly).
  • Recurrence Interval — Set the interval number for the recurrence frequency (e.g., every 2 days).
  • Recurrence Days — For weekly recurrence, specify an array of weekdays (0 Sunday through 6 Saturday).
  • Recurrence End Type — Determine how recurrence ends: never, on a specific date, or after a number of occurrences.
  • Recurrence End Date — If ending on a date, provide the ISO 8601 date when recurrence stops.
  • Recurrence Max Occurrences — If ending after occurrences, specify the maximum number of repeats.

Output shape

a single record

Returns the created scheduled message object; includes fields reflecting scheduling details and recurrence if specified.

Links

Discussion