Skip to content
  • Auto
  • Light
  • Dark
Get Started

Retrieve

Get a specific message
get/api/v2/messages/{message_id}

Retrieve details of a specific message by its ID

Path ParametersExpand Collapse
message_id: string
ReturnsExpand Collapse
data: optional object { accountEmail, content, date_sent, 22 more }
accountEmail: optional string

Email of the account

content: optional string

Message content

date_sent: optional string

When the message was sent

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_detail: optional string

Detailed error information

error_message: optional string

Error message if message failed

error_reason: optional string

Error reason if message failed

from_number: optional string

Sender phone number

group_display_name: optional string

Display name for group messages

group_id: optional string

Group ID for group messages

is_outbound: optional boolean

Whether this is an outbound message

media_url: optional string

URL of attached media

message_handle: optional string

Unique message identifier

message_type: optional "message" or "group"
Accepts one of the following:
"message"
"group"
number: optional string

Primary phone number (to_number for outbound, from_number for inbound)

opted_out: optional boolean

Whether the recipient has opted out

participants: optional array of string

List of participants for group messages

plan: optional string

Account plan used for this message

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"
sendblue_number: optional string

Sendblue phone number used

service: optional "iMessage" or "SMS"
Accepts one of the following:
"iMessage"
"SMS"
status: optional "REGISTERED" or "PENDING" or "SENT" or 7 more
Accepts one of the following:
"REGISTERED"
"PENDING"
"SENT"
"DELIVERED"
"RECEIVED"
"QUEUED"
"ERROR"
"DECLINED"
"ACCEPTED"
"SUCCESS"
to_number: optional string

Recipient phone number

was_downgraded: optional boolean

Whether the message was downgraded from iMessage to SMS

status: optional string
Get a specific message
curl https://api.sendblue.co/api/v2/messages/$MESSAGE_ID \
    -H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
    -H "sb-api-secret-key: $SENDBLUE_API_API_SECRET"
{
  "data": {
    "accountEmail": "[email protected]",
    "content": "Hello, World!",
    "date_sent": "2024-01-01T12:00:00Z",
    "date_updated": "2024-01-01T12:00:01Z",
    "error_code": null,
    "error_detail": null,
    "error_message": null,
    "error_reason": null,
    "from_number": "+19998887777",
    "group_display_name": null,
    "group_id": null,
    "is_outbound": true,
    "media_url": null,
    "message_handle": "msg_abc123def456",
    "message_type": "message",
    "number": "+18887776666",
    "opted_out": false,
    "participants": [
      "string"
    ],
    "plan": "premium",
    "send_style": "celebration",
    "sendblue_number": "+19998887777",
    "service": "iMessage",
    "status": "SENT",
    "to_number": "+18887776666",
    "was_downgraded": false
  },
  "status": "OK"
}
Returns Examples
{
  "data": {
    "accountEmail": "[email protected]",
    "content": "Hello, World!",
    "date_sent": "2024-01-01T12:00:00Z",
    "date_updated": "2024-01-01T12:00:01Z",
    "error_code": null,
    "error_detail": null,
    "error_message": null,
    "error_reason": null,
    "from_number": "+19998887777",
    "group_display_name": null,
    "group_id": null,
    "is_outbound": true,
    "media_url": null,
    "message_handle": "msg_abc123def456",
    "message_type": "message",
    "number": "+18887776666",
    "opted_out": false,
    "participants": [
      "string"
    ],
    "plan": "premium",
    "send_style": "celebration",
    "sendblue_number": "+19998887777",
    "service": "iMessage",
    "status": "SENT",
    "to_number": "+18887776666",
    "was_downgraded": false
  },
  "status": "OK"
}