Send
Send an iMessage, SMS, or MMS to a single recipient
Parameters
Returns
Send a message
from sendblue_api import SendblueAPI
client = SendblueAPI(
api_key="My API Key",
api_secret="My API Secret",
)
message_response = client.messages.send(
content="Hello, World!",
from_number="+19998887777",
number="+19998887777",
)
print(message_response.account_email)
{
"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"
}