Skip to content

Message programs: broadcast, schedule

The Message Verbs broadcast, schedule as MCP do programs, with inputs, result, refusals and an example.

Reference for Message, one group of Message programs.

Message.broadcast

Broadcast sends one Message to an Audience, now or at a set time, split by Variant when an Experiment runs. Verb page.

Text
do: return await $.Message.broadcast(input)

Emits Message.broadcasted.

Inputs

InputTypeRequiredDescription
messageMessagerequiredThe Message to send.
audienceAudiencerequiredWho receives it.
atdatetimeWhen it goes out; omitted, now.

Returns

OutputTypeRequiredDescription
messageslist of MessagerequiredOne sent Message per Contact.
messageMessagerequiredThe Message broadcast.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

JSON
{
  "name": "do",
  "arguments": {
    "code": "return await $.Message.broadcast({ message: 'message_3Dg8ysSOyQ', audience: 'audience_vmVkEYrXCN' })"
  }
}

Message.schedule

Schedule holds a Message until a set time and sends it then, unless it is canceled first. Verb page.

Text
do: return await $.Message.schedule(input)

Emits Message.scheduled.

Inputs

InputTypeRequiredDescription
messageMessagerequiredThe Message to hold.
atdatetimerequiredWhen it goes out.

Returns

OutputTypeRequiredDescription
messageMessagerequiredThe scheduled Message.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

JSON
{
  "name": "do",
  "arguments": {
    "code": "return await $.Message.schedule({ message: 'message_3Dg8ysSOyQ', at: '2026-10-22T12:00:00Z' })"
  }
}