@getdial/sdk - v0.38.0
    Preparing search index...

    Interface SendMessageParams

    interface SendMessageParams {
        body?: string;
        channel?: MessageChannel;
        forceAudioFile?: boolean;
        fromNumber?: string;
        fromNumberId?: string;
        groupId?: string;
        media?: SendMessageMedia[];
        to?: string;
    }
    Index
    body?: string

    Message text; optional when media is attached (a media-only send records "").

    channel?: MessageChannel

    Which channel to send on, for a line that carries more than one (an iMessage number with WhatsApp connected). Omit to use the number's own default, so existing calls are unaffected.

    "whatsapp" needs a line whose WhatsApp channel is ready; "imessage" is refused on a number with no iMessage rail rather than sent as an SMS.

    forceAudioFile?: boolean

    Send an audio attachment as a regular file attachment instead of an iMessage voice message. No effect on standard numbers or non-audio media.

    fromNumber?: string

    Number to send from, referenced flexibly: a phone-number id, one of your numbers in E.164, or a nickname. Provide exactly one of fromNumber or fromNumberId (enforced by the server).

    fromNumberId?: string

    Number id to send from. Legacy alternative to fromNumber — provide exactly one.

    groupId?: string

    A group conversation to send into (see DialClient.listGroups), instead of a to number. The sending line comes from the group, so the from-number params are optional here — and a from-number naming a different line is refused rather than silently overridden.

    Media attachments (MMS), in send order — max 10 items, 5 MB each.

    to?: string

    Recipient phone number, E.164. Provide exactly one of to or groupId.