Send a carousel message
client.sendCarousel.send(SendCarouselSendParams { from_number, media_urls, number, 3 more } body, RequestOptionsoptions?): SendCarouselSendResponse { accountEmail, from_number, is_outbound, 5 more }
POST/api/send-carousel
Send a carousel of images to a single recipient. Requires a V2 (Mac Mini) line. The carousel must contain between 2 and 20 HTTPS image URLs. For sending a single image, use /api/send-message with media_url instead.
Parameters
Returns
Send a carousel message
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.sendCarousel.send({
from_number: '+19998887777',
media_urls: [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg',
'https://example.com/image3.jpg',
],
number: '+19998887777',
});
console.log(response.accountEmail);{
"accountEmail": "[email protected]",
"from_number": "+19998887777",
"is_outbound": true,
"media_url": "https://example.com/image1.jpg",
"message_handle": "msg_abc123def456",
"message_type": "carousel",
"number": "+19998887777",
"status": "QUEUED"
}Returns Examples
{
"accountEmail": "[email protected]",
"from_number": "+19998887777",
"is_outbound": true,
"media_url": "https://example.com/image1.jpg",
"message_handle": "msg_abc123def456",
"message_type": "carousel",
"number": "+19998887777",
"status": "QUEUED"
}