Send Message
Send a group message
post/api/send-group-message
Send a message to a group of recipients (beta feature)
Body Parameters
contentstring
Message text content
from_numberstring
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_idstring
optional
Unique identifier for an existing group
media_urlstring
optional
URL of media file to send
formaturi
numbersarray of string
optional
Array of recipient phone numbers in E.164 format
Returns
account_emailstringcontentstringdate_createdstringdate_updatedstringerror_codenumbererror_messagestringfrom_numberstringis_outboundbooleanmedia_urlstringmessage_handlestringnumberstringsend_styleenumstatusenumMessageResponse
curl https://api.sendblue.co/api/send-group-message \
-H 'Content-Type: application/json' \
-H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
-H "sb-api-secret-key: $SENDBLUE_API_API_SECRET" \
-d '{
"content": "Hello, everyone!",
"from_number": "+19998887777",
"group_id": "group_123456",
"media_url": "https://example.com/image.jpg",
"numbers": [
"+19998887777",
"+18887776666"
]
}'
200 Example
{
"account_email": "[email protected]",
"content": "Hello, World!",
"date_created": "2023-10-01T12:00:00Z",
"date_updated": "2023-10-01T12:00:01Z",
"error_code": 0,
"error_message": "error_message",
"from_number": "+19998887777",
"is_outbound": true,
"media_url": "https://cdn.sendblue.co/media/abc123.jpg",
"message_handle": "msg_abc123def456",
"number": "+18887776666",
"send_style": "celebration",
"status": "QUEUED"
}