Table: twilio_account_message - Query Twilio Account Messages using SQL
Twilio Messaging is a service within Twilio that allows you to send and receive SMS, MMS, and other types of messages globally. It provides a simple and powerful API for developers to integrate messaging capabilities into their applications. Twilio Messaging helps you stay informed about the details of individual messages sent or received on a Twilio account.
Table Usage Guide
The twilio_account_message
table provides insights into individual messages sent or received on a Twilio account. As a developer or IT professional, explore message-specific details through this table, including status, direction, and associated metadata. Utilize it to uncover information about messages, such as those with delivery issues, the direction of messages (inbound or outbound), and verification of message content.
Examples
Basic info
Explore which messages were sent in what direction and their status to gain insights into communication patterns and potential issues. This can be useful in assessing the effectiveness of communication strategies and identifying areas for improvement.
select sid, sent_to, direction, status, date_sent, account_sidfrom twilio_account_message;
select sid, sent_to, direction, status, date_sent, account_sidfrom twilio_account_message;
List outgoing messages
Explore the history of outgoing messages sent through your account. This can be useful for tracking communication patterns, identifying potential issues, or auditing message activity.
select sid, sent_to, direction, status, date_sent, account_sidfrom twilio_account_messagewhere direction = 'outbound-api';
select sid, sent_to, direction, status, date_sent, account_sidfrom twilio_account_messagewhere direction = 'outbound-api';
List undelivered messages
Discover the segments that contain undelivered messages to understand potential communication gaps or issues within your system. This can be particularly useful in troubleshooting or improving customer communication strategies.
select sid, sent_to, direction, status, date_sent, account_sidfrom twilio_account_messagewhere status <> 'delivered';
select sid, sent_to, direction, status, date_sent, account_sidfrom twilio_account_messagewhere status <> 'delivered';
Schema for twilio_account_message
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
account_sid | text | The SID of the Account that created the resource. | |
api_version | text | The API version used to process the message. | |
body | text | The message text. | |
date_created | timestamp with time zone | The date and time that the resource was created. | |
date_sent | timestamp with time zone | >, >=, =, <, <= | The date and time when the message was sent. |
date_updated | timestamp with time zone | The date and time that the resource was last updated. | |
direction | text | The direction of the message. | |
error_code | bigint | The error code associated with the message. | |
error_message | text | The description of the error_code. | |
messaging_service_sid | text | The SID of the Messaging Service used with the message. | |
num_media | text | The number of media files associated with the message. | |
num_segments | text | The number of messages used to deliver the message body. | |
price | text | The amount billed for the message. | |
price_unit | text | The currency in which price is measured. | |
sent_from | text | = | The phone number that initiated the message. |
sent_to | text | = | The phone number that received the message. |
sid | text | = | The unique string that identifies the resource. |
status | text | The status of the message. | |
sub_resource_uris | jsonb | A list of related resources identified by their relative URIs. | |
uri | text | The URI of the resource, relative to 'https://api.twilio.com'. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- twilio
You can pass the configuration to the command with the --config
argument:
steampipe_export_twilio --config '<your_config>' twilio_account_message