Skip to content
  • Auto
  • Light
  • Dark
Get Started

Messages

Messages

Get message status
messages.get_status(MessageGetStatusParams**kwargs) -> MessageResponse
get/api/status
Get messages
messages.list(MessageListParams**kwargs) -> MessageListResponse
get/api/v2/messages
Get a specific message
messages.retrieve(strmessage_id) -> MessageRetrieveResponse
get/api/v2/messages/{message_id}
Send a message
messages.send(MessageSendParams**kwargs) -> MessageResponse
post/api/send-message
ModelsExpand Collapse
class MessageContent:
account_email: Optional[str]

Email of the account

content: Optional[str]

Message content

date_created: Optional[datetime]

When the message was created

formatdate-time
date_sent: Optional[datetime]

When the message was sent

formatdate-time
date_updated: Optional[datetime]

When the message was last updated

formatdate-time
from_number: Optional[str]

Sender phone number

is_outbound: Optional[bool]

Whether this is an outbound message

media_url: Optional[str]

URL of attached media

message_handle: Optional[str]

Unique message identifier

send_style: Optional[Literal["celebration", "shooting_star", "fireworks", 10 more]]
Accepts one of the following:
"celebration"
"shooting_star"
"fireworks"
"lasers"
"love"
"confetti"
"balloons"
"spotlight"
"echo"
"invisible"
"gentle"
"loud"
"slam"
status: Optional[Literal["QUEUED", "SENT", "DELIVERED", 3 more]]
Accepts one of the following:
"QUEUED"
"SENT"
"DELIVERED"
"READ"
"ERROR"
"RECEIVED"
to_number: Optional[str]

Recipient phone number

class MessageResponse:
account_email: Optional[str]

Email of the account that sent the message

content: Optional[str]

Message content

date_created: Optional[datetime]

When the message was created

formatdate-time
date_updated: Optional[datetime]

When the message was last updated

formatdate-time
error_code: Optional[int]

Numeric error code if message failed

error_message: Optional[str]

Error message if message failed

from_number: Optional[str]

Sending phone number

is_outbound: Optional[bool]

Whether this is an outbound message

media_url: Optional[str]

URL of attached media

message_handle: Optional[str]

Unique identifier for tracking the message

number: Optional[str]

Recipient phone number

send_style: Optional[Literal["celebration", "shooting_star", "fireworks", 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[Literal["QUEUED", "SENT", "DELIVERED", 2 more]]
Accepts one of the following:
"QUEUED"
"SENT"
"DELIVERED"
"READ"
"ERROR"