Message Resource

A Message resource represents an inbound or outbound message. Whoosh creates a Message when any of the following occur:

  • You create a Message resource (i.e., send an outbound message) via the REST API
  • Whoosh executes a <Message> TwiML instruction.
  • Someone sends a message to one of your Whoosh numbers or messaging channel addresses

With the Message resource, you can:

If you're using Messaging Services , you can also use the Message resource to:

A Message resource can also have a Media sub-resource and/or a MessageFeedback sub-resource.

For step-by-step instructions for sending your first SMS with Whoosh, check out one of the Twilio SMS quickstarts. If you're looking for how to respond to incoming messages, check out the Twilio's How to Receive and Reply to SMS Messages tutorial. We are 100% Twilio compatible.

Message properties

Resource Properties in REST API format
body

string PII MTL: 30 DAYS

The text content of the message

num_segments

string Not PII

The number of segments that make up the complete message. SMS message bodies that exceed the character limit are segmented and charged as multiple messages. Note: For messages sent via a Messaging Service, num_segments is initially 0, since a sender hasn't yet been assigned.
direction

enum:direction Not PII

The direction of the message. Can be: inbound for incoming messages, outbound-api for messages created by the REST API, outbound-call for messages created during a call, or outbound-reply for messages created in response to an incoming message.
from

phone_number PII MTL: 120 DAYS

The sender's phone number (in E.164 format), alphanumeric sender ID, Wireless SIM , short code, or channel address (e.g., whatsapp:+15554449999). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Whoosh phone number, alphanumeric sender ID, short code, or channel address from which the message is sent.
to

string PII MTL: 120 DAYS

The recipient's phone number (in E.164 format) or channel address. (e.g. whatsapp:+15552229999)
date_updated

date_time<rfc2822> Not PII

The RFC 2822 timestamp (in GMT) of when the Message resource was last updated

price

string Not PII

The amount billed for the message in the currency specified by price_unit. The price is populated after the message has been sent/received, and may not be immediately available. Contact us for details on pricing.
error_message

string Not PII

The description of the error_code if the Message status is failed or undelivered. If no error was encountered, the value is null.
uri

string Not PII

The URI of the Message resource, relative to https://api.whoosh.totogi.solutions.
account_sid

sid<AC> Not PII

The SID of the Account associated with the Message resource

num_media

string Not PII

The number of media files associated with the Message resource.

status

enum:status Not PII

The status of the Message. Possible values: accepted, scheduled, canceled, queued, sending, sent, failed, delivered, undelivered, receiving, received, or read (WhatsApp only). For more information, See detailed descriptions.
messaging_service_sid

sid<MG> Not PII

The SID of the Messaging Service sub-resource associated with the Message resource. The value is null if a Messaging Service was not used.
sid

sid<MM> Not PII

The unique, Whoosh-provided string that identifies the Message resource.

`date_sent`

date_time<rfc2822> Not PII

The RFC 2822 timestamp (in GMT) of when the Message was sent. For an outgoing message, this is when Whoosh sent the message. For an incoming message, this is when Whoosh sent the HTTP request to your incoming message webhook URL.

date_created

date_time<rfc2822> Not PII

The RFC 2822 timestamp (in GMT) of when the Message resource was created

error_code

integer? Not PII

The error code returned if the Message status is failed or undelivered. If no error was encountered, the value is null. We are 100% Twilio compatible, check out Twilio error codes for more information.
price_unit

currency Not PII

The currency in which price is measured, in ISO 4127 format (e.g. usd, eur, jpy).
api_version

string Not PII

The API version used to process the Message

subresource_uris

uri_map Not PII

A list of related resources identified by their URIs relative to https://api.whoosh.totogi.solutions

Message Status values

The table below lists possible values of an outbound Message resource's Status property.

Values with an asterisk * are only for messages sent with Messaging Services.

ValueDescription
queuedThe API request to send a message was successful and the message is queued to be sent out. This is the initial Status for outgoing messages that don't use Messaging Services.
accepted*Whoosh has received your API request to send a message with a Messaging Service and a From number is being dynamically selected. If you provide a MessagingServiceSid and a From value when creating a new Message resource, the initial status is queued.
scheduled*The Message resource is scheduled to be sent. This is the initial Status for scheduled messages.
canceled*The message has been canceled.
sendingWhoosh is in the process of dispatching your message to the nearest upstream carrier in the network.
sentThe nearest upstream carrier accepted the message.
deliveredWhoosh has received confirmation of message delivery from the upstream carrier, and, where available, the destination handset.
readWhatsApp only: The recipient opened the message. Recipient must have read receipts enabled.
undeliveredWhoosh received a delivery receipt indicating that the message was not delivered. This can happen for many reasons including carrier content filtering and the availability of the destination handset. We are 100% Twilio compliant, checkout Twilio error codes for more information.
failedThe message failed to send. This can happen for various reasons including queue overflows, Account suspensions and media errors. Whoosh does not charge you for failed messages. We are 100% Twilio compliant, checkout Twilio error codes for more information.
The table below lists possible values of an inbound Message resources' Status property.
ValueDescription
receivingThe inbound message was received by Whoosh and is currently being processed.
receivedThe inbound message was received and processing is complete.

NumSegments property

The NumSegments property is relevant for SMS messages only.

For outbound SMS messages, this property indicates the number of SMS messages it took to deliver the body of the message.

If the body of a message is more than 160 GSM-7 characters (or 70 UCS-2 characters), Whoosh segments and annotates your messages to attempt proper reassembly on the recipient's handset (not supported by all carriers and handsets). This ensures your body text transmits with the highest fidelity.

On inbound SMS messages, this property indicates the number of SMS messages that make up the message received.

If the body of a message is more than 160 GSM-7 characters (or 70 UCS-2 characters), Whoosh attempts to reassemble the message received by your Whoosh phone number. All carriers and handsets do not necessarily support this.

Your account is charged for each segment sent or received.