Skip to content
Download Beeper

Send a message

messages.send(strchat_id, MessageSendParams**kwargs) -> MessageSendResponse
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
chat_id: str

Unique identifier of the chat.

attachment: Optional[Attachment]

Single attachment to send with the message

upload_id: str

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

duration: Optional[float]

Duration in seconds (optional override of cached value)

file_name: Optional[str]

Filename (optional override of cached value)

mime_type: Optional[str]

MIME type (optional override of cached value)

size: Optional[AttachmentSize]

Dimensions (optional override of cached value)

height: float
width: float
type: Optional[Literal["gif", "voiceNote", "sticker"]]

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

Accepts one of the following:
"gif"
"voiceNote"
"sticker"
reply_to_message_id: Optional[str]

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

text: Optional[str]

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

ReturnsExpand Collapse
class MessageSendResponse:
chat_id: str

Unique identifier of the chat.

pending_message_id: str

Pending message ID

Send a message

from beeper_desktop_api import BeeperDesktop

client = BeeperDesktop()
response = client.messages.send(
    chat_id="!NCdzlIaMjZUmvmvyHU:beeper.com",
)
print(response.pending_message_id)
{
  "chatID": "!signal_adamvy:local-signal.localhost",
  "pendingMessageID": "m1694783291234567"
}
Returns Examples
{
  "chatID": "!signal_adamvy:local-signal.localhost",
  "pendingMessageID": "m1694783291234567"
}