Skip to content
  • Auto
  • Light
  • Dark
Get Started

Send Message

Send a group message
post/api/send-group-message

Send a message to a group of recipients (beta feature)

Body ParametersExpand Collapse
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: optional string

Unique identifier for an existing group

media_url: optional string

URL of media file to send

formaturi
numbers: optional array of string

Array of recipient phone numbers in E.164 format

ReturnsExpand Collapse
MessageResponse = object { account_email, content, date_created, 10 more }
account_email: optional string

Email of the account that sent the message

content: optional string

Message content

date_created: optional string

When the message was created

formatdate-time
date_updated: optional string

When the message was last updated

formatdate-time
error_code: optional number

Numeric error code if message failed

error_message: optional string

Error message if message failed

from_number: optional string

Sending phone number

is_outbound: optional boolean

Whether this is an outbound message

media_url: optional string

URL of attached media

message_handle: optional string

Unique identifier for tracking the message

number: optional string

Recipient phone number

send_style: optional "celebration" or "shooting_star" or "fireworks" or 10 more

The iMessage expressive message style

Accepts one of the following:
"celebration"
"shooting_star"
"fireworks"
"lasers"
"love"
"confetti"
"balloons"
"spotlight"
"echo"
"invisible"
"gentle"
"loud"
"slam"
status: optional "QUEUED" or "SENT" or "DELIVERED" or 2 more
Accepts one of the following:
"QUEUED"
"SENT"
"DELIVERED"
"READ"
"ERROR"
Send a group message
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"
          ]
        }'
{
  "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"
}
Returns Examples
{
  "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"
}