# Groups ## Send Message `client.groups.sendMessage(GroupSendMessageParamsbody, RequestOptionsoptions?): MessageResponse` **post** `/api/send-group-message` Send a message to a group of recipients (beta feature) ### Parameters - `body: GroupSendMessageParams` - `content: string` Message text content - `from_number: string` **REQUIRED** - The phone number to send from. Must be one of your registered Sendblue phone numbers in E.164 format. Without this parameter, the message will fail to send. - `group_id?: string` Unique identifier for an existing group - `media_url?: string` URL of media file to send - `numbers?: Array` Array of recipient phone numbers in E.164 format ### Returns - `MessageResponse` - `account_email?: string` Email of the account that sent the message - `content?: string` Message content - `date_created?: string` When the message was created - `date_updated?: string` When the message was last updated - `error_code?: number` Numeric error code if message failed - `error_message?: string` Error message if message failed - `from_number?: string` Sending phone number - `is_outbound?: boolean` Whether this is an outbound message - `media_url?: string` URL of attached media - `message_handle?: string` Unique identifier for tracking the message - `number?: string` Recipient phone number - `send_style?: "celebration" | "shooting_star" | "fireworks" | 10 more` The iMessage expressive message style - `"celebration"` - `"shooting_star"` - `"fireworks"` - `"lasers"` - `"love"` - `"confetti"` - `"balloons"` - `"spotlight"` - `"echo"` - `"invisible"` - `"gentle"` - `"loud"` - `"slam"` - `status?: "QUEUED" | "SENT" | "DELIVERED" | "ERROR"` - `"QUEUED"` - `"SENT"` - `"DELIVERED"` - `"ERROR"` ### Example ```typescript import SendblueAPI from 'sendblue'; const client = new SendblueAPI({ apiKey: process.env['SENDBLUE_API_API_KEY'], // This is the default and can be omitted apiSecret: process.env['SENDBLUE_API_API_SECRET'], // This is the default and can be omitted }); const messageResponse = await client.groups.sendMessage({ content: 'Hello, everyone!', from_number: '+19998887777', }); console.log(messageResponse.account_email); ``` ## Modify `client.groups.modify(GroupModifyParamsbody, RequestOptionsoptions?): GroupModifyResponse` **post** `/api/modify-group` Add or manage participants in a group chat (beta feature) ### Parameters - `body: GroupModifyParams` - `group_id: string` Group identifier - `modify_type: "add_recipient"` Type of modification to perform - `"add_recipient"` - `number: string` Phone number to add/modify in E.164 format ### Returns - `GroupModifyResponse` - `message?: string` - `status?: string` ### Example ```typescript import SendblueAPI from 'sendblue'; const client = new SendblueAPI({ apiKey: process.env['SENDBLUE_API_API_KEY'], // This is the default and can be omitted apiSecret: process.env['SENDBLUE_API_API_SECRET'], // This is the default and can be omitted }); const response = await client.groups.modify({ group_id: 'group_123456', modify_type: 'add_recipient', number: '+19998887777', }); console.log(response.message); ```