Skip to content

Message methods: broadcast, schedule

The Message Verbs broadcast, schedule as typed SDK methods, with inputs, result, refusals and an example.

Reference for Message, one group of Message methods.

Message.broadcast

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

TypeScript
interface MessageVerbs {
  broadcast(input: MessageBroadcastInput, options?: SB.CallOptions): SB.Call<MessageBroadcastOutput>
}

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

TypeScript
import { $ } from 'startup-builder'

const { messages, message } = 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.

TypeScript
interface MessageVerbs {
  schedule(input: MessageScheduleInput, options?: SB.CallOptions): SB.Call<Message>
}

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

TypeScript
import { $ } from 'startup-builder'

const message = await $.Message.schedule({ message: 'message_3Dg8ysSOyQ', at: '2026-10-22T12:00:00Z' })