Create or start a chat
client.chats.create(ChatCreateParams { params } params?, RequestOptionsoptions?): ChatCreateResponse { chatID, status }
POST/v1/chats
Create a single/group chat (mode=‘create’) or start a direct chat from merged user data (mode=‘start’).
Create or start a chat
import BeeperDesktop from '@beeper/desktop-api';
const client = new BeeperDesktop({
accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});
const chat = await client.chats.create();
console.log(chat.chatID);{
"chatID": "!NCdzlIaMjZUmvmvyHU:beeper.com",
"status": "existing"
}Returns Examples
{
"chatID": "!NCdzlIaMjZUmvmvyHU:beeper.com",
"status": "existing"
}