Skip to content
Download Beeper

Send a message

client.messages.send(stringchatID, MessageSendParams { attachment, replyToMessageID, text } body?, RequestOptionsoptions?): MessageSendResponse { chatID, pendingMessageID }
POST/v1/chats/{chatID}/messages

Send a text message to a specific chat. Supports replying to existing messages. Returns a pending message ID.

ParametersExpand Collapse
chatID: string

Unique identifier of the chat.

body: MessageSendParams { attachment, replyToMessageID, text }
attachment?: Attachment

Single attachment to send with the message

uploadID: string

Upload ID from uploadAsset endpoint. Required to reference uploaded files.

duration?: number

Duration in seconds (optional override of cached value)

fileName?: string

Filename (optional override of cached value)

mimeType?: string

MIME type (optional override of cached value)

size?: Size { height, width }

Dimensions (optional override of cached value)

height: number
width: number
type?: "gif" | "voiceNote" | "sticker"

Special attachment type (gif, voiceNote, sticker). If omitted, auto-detected from mimeType

Accepts one of the following:
"gif"
"voiceNote"
"sticker"
replyToMessageID?: string

Provide a message ID to send this as a reply to an existing message

text?: string

Text content of the message you want to send. You may use markdown.

ReturnsExpand Collapse
MessageSendResponse { chatID, pendingMessageID }
chatID: string

Unique identifier of the chat.

pendingMessageID: string

Pending message ID

Send a message

import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop();

const response = await client.messages.send('!NCdzlIaMjZUmvmvyHU:beeper.com');

console.log(response.pendingMessageID);
{
  "chatID": "!signal_adamvy:local-signal.localhost",
  "pendingMessageID": "m1694783291234567"
}
Returns Examples
{
  "chatID": "!signal_adamvy:local-signal.localhost",
  "pendingMessageID": "m1694783291234567"
}