Telnyx
App · 20 actions
Send and track messages and manage Telnyx messaging profiles.
Actions
| Action | What it does |
|---|---|
| Cancel scheduled message | Cancel scheduled message. |
| Create messaging profile | Create messaging profile. |
| Delete messaging profile | Deletes the specified messaging profile and returns the profile's final configuration. |
| Get balance | Retrieve the current balance, available credit, and credit limit for your account. |
| Get group MMS | Retrieve all messages in a group MMS conversation by the group message ID. |
| Get message | Get message. |
| Get messaging profile | Returns the complete configuration of the specified messaging profile, including webhook and sender-selection settings. |
| Get phone number | Get phone number. |
| Get webhook delivery | Provides webhook_delivery debug data, such as timestamps, delivery status and attempts. |
| List alphanumeric sender IDs | List all alphanumeric sender IDs associated with a specific messaging profile. |
| List available phone numbers | List available phone numbers. |
| List messaging profiles | Lists messaging profiles owned by the authenticated account. |
| List phone numbers | List phone numbers. |
| List profile phone numbers | Returns the phone numbers currently associated with the specified messaging profile. |
| List profile short codes | Returns the short codes currently associated with the specified messaging profile. |
| List webhook deliveries | Lists webhook_deliveries for the authenticated user |
| Schedule message | Schedule message. |
| Send group MMS | Queues an MMS addressed to multiple recipients as a group conversation. |
| Send message | Send message. |
| Update messaging profile | Updates the supplied settings on the specified messaging profile. |
Cancel scheduled message
Cancel scheduled message.
Inputs
- Message ID
message_idtextRequired - The id of the message to cancel
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"cc": [],
"completed_at": "example",
"cost": {
"amount": "example",
"currency": "example"
},
"cost_breakdown": {
"carrier_fee": {
"amount": "example",
"currency": "example"
},
"rate": {
"amount": "example",
"currency": "example"
}
},
"direction": "outbound",
"encoding": "example",
"errors": [],
"from": {
"carrier": "example",
"line_type": "Wireline",
"phone_number": "example"
},
"id": "example",
"media": [],
"messaging_profile_id": "example",
"num_chars": 1,
"organization_id": "example",
"parts": 1,
"received_at": "example",
"record_type": "message",
"sent_at": "example",
"smart_encoding_applied": false,
"subject": "example",
"tags": [],
"tcr_campaign_billable": false,
"tcr_campaign_id": "example",
"tcr_campaign_registered": "example",
"text": "example",
"to": [],
"type": "SMS",
"valid_until": "example",
"webhook_failover_url": "example",
"webhook_url": "example"
}
}Create messaging profile
Create messaging profile.
Inputs
- Name
nametextRequired - A user friendly name for the messaging profile.
- Whitelisted destinations
whitelisted_destinationslistRequired - Destinations to which the messaging profile is allowed to send. The elements in the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]` all destinations will be allowed.
- Enabled
enabledtrue/false - Specifies whether the messaging profile is enabled or not.Default:
true. - Webhook URL
webhook_urltext - The URL where webhooks related to this messaging profile will be sent.
- Webhook failover URL
webhook_failover_urltext - The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails.
- Webhook API version
webhook_api_versiontext - Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.One of:
1,2,2010-04-01. Default:2. - Number pool settings
number_pool_settingsobject - Number pool settings.
- Url shortener settings
url_shortener_settingsobject - Url shortener settings.
- Mm7 metadata
mm7_metadataobject - MM7 settings for inbound messages
- Alpha sender
alpha_sendertext - The alphanumeric sender ID to use when sending to destinations that require an alphanumeric sender ID.
- Daily spend limit
daily_spend_limittext - The maximum amount of money (in USD) that can be spent by this profile before midnight UTC.
- Daily spend limit enabled
daily_spend_limit_enabledtrue/false - Whether to enforce the value configured by `daily_spend_limit`.
- Mms fall back to sms
mms_fall_back_to_smstrue/false - enables SMS fallback for MMS messages.Default:
false. - Mms transcoding
mms_transcodingtrue/false - enables automated resizing of MMS media.Default:
false. - Mobile only
mobile_onlytrue/false - Send messages only to mobile phone numbers.Default:
false. - Smart encoding
smart_encodingtrue/false - Enables automatic character encoding optimization for SMS messages. When enabled, the system automatically selects the most efficient encoding (GSM-7 or UCS-2) based on message content to maximize character limits and minimize costs.Default:
false. - Features
featuresobject - Telnyx product features the messaging customer can enable on the messaging profile. Keys map to individual feature flags; unknown keys are accepted and preserved for forward compatibility with rolling deployments.
- Resource group ID
resource_group_idtext - The resource group ID to associate with this messaging profile.
- Health webhook URL
health_webhook_urltext - A URL to receive health check webhooks for numbers in this profile.
- Ai assistant ID
ai_assistant_idtext - The AI assistant ID to associate with this messaging profile.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"ai_assistant_id": "example",
"alpha_sender": "example",
"created_at": "example",
"daily_spend_limit": "example",
"daily_spend_limit_enabled": false,
"enabled": false,
"features": {
"ai_opt_out_detection_enabled": false,
"auto_chunk_long_messages": false
},
"health_webhook_url": "example",
"id": "example",
"mm7_metadata": {
"mm7_failover_webhook_url": "example",
"mm7_webhook_url": "example"
},
"mms_fall_back_to_sms": false,
"mms_transcoding": false,
"mobile_only": false,
"name": "example",
"number_pool_settings": {
"geomatch": false,
"long_code_weight": 1.0,
"skip_unhealthy": false,
"sticky_sender": false,
"toll_free_weight": 1.0
},
"organization_id": "example",
"record_type": "messaging_profile",
"redaction_enabled": false,
"redaction_level": 1,
"resource_group_id": "example",
"smart_encoding": false,
"updated_at": "example",
"url_shortener_settings": {
"domain": "example",
"prefix": "example",
"replace_blacklist_only": false,
"send_webhooks": false
},
"v1_secret": "example",
"webhook_api_version": "1",
"webhook_failover_url": "example",
"webhook_url": "example",
"whitelisted_destinations": []
}
}
}Delete messaging profile
Deletes the specified messaging profile and returns the profile's final configuration.
Inputs
- Messaging profile ID
messaging_profile_idtextRequired - The id of the messaging profile to retrieve
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"ai_assistant_id": "example",
"alpha_sender": "example",
"created_at": "example",
"daily_spend_limit": "example",
"daily_spend_limit_enabled": false,
"enabled": false,
"features": {
"ai_opt_out_detection_enabled": false,
"auto_chunk_long_messages": false
},
"health_webhook_url": "example",
"id": "example",
"mm7_metadata": {
"mm7_failover_webhook_url": "example",
"mm7_webhook_url": "example"
},
"mms_fall_back_to_sms": false,
"mms_transcoding": false,
"mobile_only": false,
"name": "example",
"number_pool_settings": {
"geomatch": false,
"long_code_weight": 1.0,
"skip_unhealthy": false,
"sticky_sender": false,
"toll_free_weight": 1.0
},
"organization_id": "example",
"record_type": "messaging_profile",
"redaction_enabled": false,
"redaction_level": 1,
"resource_group_id": "example",
"smart_encoding": false,
"updated_at": "example",
"url_shortener_settings": {
"domain": "example",
"prefix": "example",
"replace_blacklist_only": false,
"send_webhooks": false
},
"v1_secret": "example",
"webhook_api_version": "1",
"webhook_failover_url": "example",
"webhook_url": "example",
"whitelisted_destinations": []
}
}
}Get balance
Retrieve the current balance, available credit, and credit limit for your account.
Inputs
None.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"available_credit": "example",
"balance": "example",
"credit_limit": "example",
"currency": "example",
"pending": "example",
"record_type": "balance"
}
}
}Get group MMS
Retrieve all messages in a group MMS conversation by the group message ID.
Inputs
- Message ID
message_idtextRequired - The group message ID.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": []
}
}Get message
Get message.
Inputs
- Message ID
message_idtextRequired - The id of the message
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"body": {
"text": "example"
},
"cc": [],
"child_message_id": "example",
"completed_at": "example",
"cost": {
"amount": "example",
"currency": "example"
},
"cost_breakdown": {
"carrier_fee": {
"amount": "example",
"currency": "example"
},
"rate": {
"amount": "example",
"currency": "example"
}
},
"direction": "outbound",
"encoding": "example",
"errors": [],
"from": {
"agent_id": "example",
"agent_name": "example",
"carrier": "example",
"line_type": "Wireline",
"phone_number": "example"
},
"id": "example",
"media": [],
"messaging_profile_id": "example",
"num_chars": 1,
"organization_id": "example",
"parent_message_id": "example",
"parts": 1,
"received_at": "example",
"record_type": "message",
"sent_at": "example",
"smart_encoding_applied": false,
"subject": "example",
"tags": [],
"tcr_campaign_billable": false,
"tcr_campaign_id": "example",
"tcr_campaign_registered": "example",
"template_id": "example",
"template_name": "example",
"text": "example",
"to": [],
"type": "SMS",
"valid_until": "example",
"wait_seconds": 1.0,
"webhook_failover_url": "example",
"webhook_url": "example"
}
}
}Get messaging profile
Returns the complete configuration of the specified messaging profile, including webhook and sender-selection settings.
Inputs
- Messaging profile
messaging_profile_idtextRequired - The id of the messaging profile to retrieve
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"ai_assistant_id": "example",
"alpha_sender": "example",
"created_at": "example",
"daily_spend_limit": "example",
"daily_spend_limit_enabled": false,
"enabled": false,
"features": {
"ai_opt_out_detection_enabled": false,
"auto_chunk_long_messages": false
},
"health_webhook_url": "example",
"id": "example",
"mm7_metadata": {
"mm7_failover_webhook_url": "example",
"mm7_webhook_url": "example"
},
"mms_fall_back_to_sms": false,
"mms_transcoding": false,
"mobile_only": false,
"name": "example",
"number_pool_settings": {
"geomatch": false,
"long_code_weight": 1.0,
"skip_unhealthy": false,
"sticky_sender": false,
"toll_free_weight": 1.0
},
"organization_id": "example",
"record_type": "messaging_profile",
"redaction_enabled": false,
"redaction_level": 1,
"resource_group_id": "example",
"smart_encoding": false,
"updated_at": "example",
"url_shortener_settings": {
"domain": "example",
"prefix": "example",
"replace_blacklist_only": false,
"send_webhooks": false
},
"v1_secret": "example",
"webhook_api_version": "1",
"webhook_failover_url": "example",
"webhook_url": "example",
"whitelisted_destinations": []
}
}
}Get phone number
Get phone number.
Inputs
- Phone number ID
phone_number_idtextRequired - Identifies the resource.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"activated_at": "example",
"billing_group_id": "example",
"call_forwarding_enabled": false,
"call_recording_enabled": false,
"caller_id_name_enabled": false,
"cnam_listing_enabled": false,
"connection_id": "example",
"connection_name": "example",
"country_iso_alpha2": "example",
"created_at": "example",
"customer_reference": "example",
"deletion_lock_enabled": false,
"emergency_address_id": "example",
"emergency_enabled": false,
"emergency_status": "active",
"external_pin": "example",
"hd_voice_enabled": false,
"id": "example",
"inbound_call_screening": "disabled",
"messaging_campaign_id": "example",
"messaging_profile_id": "example",
"messaging_profile_name": "example",
"phone_number": "example",
"phone_number_type": "local",
"purchased_at": "example",
"record_type": "example",
"source_type": "number_order",
"status": "purchase-pending",
"t38_fax_gateway_enabled": false,
"tags": [],
"updated_at": "example"
}
}
}Get webhook delivery
Provides webhook_delivery debug data, such as timestamps, delivery status and attempts.
Inputs
- Webhook delivery ID
webhook_delivery_idtextRequired - Uniquely identifies the webhook_delivery.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"attempts": [],
"finished_at": "example",
"id": "example",
"record_type": "example",
"started_at": "example",
"status": "delivered",
"user_id": "example",
"webhook": {
"event_type": "example",
"id": "example",
"occurred_at": "example",
"payload": {},
"record_type": "event"
}
}
}
}List alphanumeric sender IDs
List all alphanumeric sender IDs associated with a specific messaging profile.
Inputs
- Messaging profile
messaging_profile_idtextRequired - The identifier of the messaging profile.
- Page number
page_numbernumber - Page number to retrieve (1-based).Default:
1. - Page size
page_sizenumber - Number of items to return per page.Default:
20.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": [],
"meta": {
"page_number": 1,
"page_size": 1,
"total_pages": 1,
"total_results": 1
}
}
}List available phone numbers
List available phone numbers.
Inputs
- Filter locality
filter_localitytext - Filter phone numbers by city.
- Filter administrative area
filter_administrative_areatext - Find numbers in a particular US state or CA province.
- Filter country code
filter_country_codetext - Filter phone numbers by country.
- Filter national destination code
filter_national_destination_codetext - Filter by the national destination code of the number.
- Filter rate center
filter_rate_centertext - Filter phone numbers by rate center. This filter is only applicable to USA and Canada numbers.
- Filter phone number type
filter_phone_number_typetext - Filter phone numbers by number type.One of:
local,toll_free(Toll free),mobile,national,shared_cost(Shared cost). - Filter limit
filter_limitnumber - Limits the number of results.
- Filter best effort
filter_best_efforttrue/false - Filter to determine if best effort results should be included. Only available in USA/CANADA.
- Filter quickship
filter_quickshiptrue/false - Filter to exclude phone numbers that need additional time after to purchase to activate. Only applicable for +1 toll_free numbers.
- Filter reservable
filter_reservabletrue/false - Filter to ensure only numbers that can be reserved are included in the results.
- Filter exclude held numbers
filter_exclude_held_numberstrue/false - Filter to exclude phone numbers that are currently on hold/reserved for your account.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": [],
"meta": {
"best_effort_results": 1,
"total_results": 1
},
"metadata": {
"best_effort_results": 1,
"total_results": 1
}
}
}List messaging profiles
Lists messaging profiles owned by the authenticated account. Apply the documented filters and pagination parameters to narrow the result set.
Inputs
- Filter name eq
filter_name_eqtext - Filter profiles by exact name match.
- Filter name contains
filter_name_containstext - Filter profiles by name containing the given string.
- Filter name
filter_nametext - Filter by name
- Page
pagenumber - The page number to loadAt least 1. Default:
1. - Page size
page_sizenumber - The size of the pageFrom 1 to 250. Default:
20.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": [],
"meta": {
"page_number": 1,
"page_size": 1,
"total_pages": 1,
"total_results": 1
}
}
}List phone numbers
List phone numbers.
Inputs
- Sort
sorttext - Specifies the sort order for results. If not given, results are sorted by created_at in descending order.One of:
purchased_at(Purchased at),phone_number(Phone number),connection_name(Connection name),usage_payment_method(Usage payment method). - Handle messaging profile error
handle_messaging_profile_errortext - Handle messaging profile error.One of:
true,false. Default:false. - Page size
page_sizenumber - The size of the pageFrom 1 to 250. Default:
20. - Page
pagenumber - The page number to loadAt least 1. Default:
1. - Filter tag
filter_tagtext - Filter by phone number tags.
- Filter without tags
filter_without_tagstext - When set to 'true', filters for phone numbers that do not have any tags applied. All other values are ignored.One of:
true,false. - Filter phone number
filter_phone_numbertext - Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned.
- Filter status
filter_statustext - Filter by phone number status.One of:
purchase-pending,purchase-failed,port-pending,active,deleted,port-failed,emergency-only,ported-out,port-out-pending. - Filter connection ID
filter_connection_idtext - Filter by connection_id.
- Filter voice usage payment method
filter_voice_usage_payment_methodtext - Filter by usage_payment_method.One of:
pay-per-minute,channel. - Filter billing group ID
filter_billing_group_idtext - Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'.
- Filter emergency address ID
filter_emergency_address_idtext - Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'.
- Filter customer reference
filter_customer_referencetext - Filter numbers via the customer_reference set.
- Filter source
filter_sourcetext - Filter phone numbers by their source. Use 'ported' for numbers ported from other carriers, or 'purchased' for numbers bought directly from Telnyx.One of:
ported,purchased.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": [],
"errors": [],
"meta": {
"page_number": 1,
"page_size": 1,
"total_pages": 1,
"total_results": 1
}
}
}List profile phone numbers
Returns the phone numbers currently associated with the specified messaging profile.
Inputs
- Messaging profile
messaging_profile_idtextRequired - The id of the messaging profile to retrieve
- Page
pagenumber - The page number to loadAt least 1. Default:
1. - Page size
page_sizenumber - The size of the pageFrom 1 to 250. Default:
20.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": [],
"meta": {
"page_number": 1,
"page_size": 1,
"total_pages": 1,
"total_results": 1
}
}
}List profile short codes
Returns the short codes currently associated with the specified messaging profile.
Inputs
- Messaging profile
messaging_profile_idtextRequired - The id of the messaging profile to retrieve
- Page
pagenumber - The page number to loadAt least 1. Default:
1. - Page size
page_sizenumber - The size of the pageFrom 1 to 250. Default:
20.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": [],
"meta": {
"page_number": 1,
"page_size": 1,
"total_pages": 1,
"total_results": 1
}
}
}List webhook deliveries
Lists webhook_deliveries for the authenticated user
Inputs
- Page
pagenumber - The page number to loadAt least 1. Default:
1. - Page size
page_sizenumber - The size of the pageFrom 1 to 250. Default:
20. - Filter event type
filter_event_typetext - Return only webhook_deliveries matching the given value of `event_type`. Accepts multiple values separated by a `,`.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": [],
"meta": {
"page_number": 1,
"page_size": 1,
"total_pages": 1,
"total_results": 1
}
}
}Schedule message
Schedule message.
Inputs
- From number
from_numbertext - Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code). **Required if sending with a phone number, short code, or alphanumeric sender ID.**
- Messaging profile
messaging_profile_idtext - Unique identifier for a messaging profile. **Required if sending via number pool or with an alphanumeric sender ID.**
- To
totextRequired - Receiving address (+E.164 formatted phone number or short code).
- Text
texttext - Message body (i.e., content) as a non-empty string. **Required for SMS**
- Subject
subjecttext - Subject of multimedia message
- Media URLs
media_urlslist - A list of media URLs. The total media size must be less than 1 MB. **Required for MMS**
- Webhook URL
webhook_urltext - The URL where webhooks related to this message will be sent.
- Webhook failover URL
webhook_failover_urltext - The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.
- Use profile webhooks
use_profile_webhookstrue/false - If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.Default:
true. - Type
typetext - The protocol for sending the message, either SMS or MMS.One of:
SMS,MMS. - Auto detect
auto_detecttrue/false - Auto detect.Default:
false. - Send at
send_atdate and timeRequired - ISO 8601 formatted date indicating when to send the message - accurate up till a minute.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"body": {
"text": "example"
},
"cc": [],
"child_message_id": "example",
"completed_at": "example",
"cost": {
"amount": "example",
"currency": "example"
},
"cost_breakdown": {
"carrier_fee": {
"amount": "example",
"currency": "example"
},
"rate": {
"amount": "example",
"currency": "example"
}
},
"direction": "outbound",
"encoding": "example",
"errors": [],
"from": {
"agent_id": "example",
"agent_name": "example",
"carrier": "example",
"line_type": "Wireline",
"phone_number": "example"
},
"id": "example",
"media": [],
"messaging_profile_id": "example",
"num_chars": 1,
"organization_id": "example",
"parent_message_id": "example",
"parts": 1,
"received_at": "example",
"record_type": "message",
"sent_at": "example",
"smart_encoding_applied": false,
"subject": "example",
"tags": [],
"tcr_campaign_billable": false,
"tcr_campaign_id": "example",
"tcr_campaign_registered": "example",
"template_id": "example",
"template_name": "example",
"text": "example",
"to": [],
"type": "SMS",
"valid_until": "example",
"wait_seconds": 1.0,
"webhook_failover_url": "example",
"webhook_url": "example"
}
}
}Send group MMS
Queues an MMS addressed to multiple recipients as a group conversation. Delivery events are reported asynchronously through messaging webhooks.
Inputs
- Idempotency key
idempotency_keytext - Idempotency key.
- From number
from_numbertextRequired - Phone number, in +E.164 format, used to send the message.
- To
tolistRequired - A list of destinations. No more than 8 destinations are allowed.
- Text
texttext - Message body (i.e., content) as a non-empty string.
- Subject
subjecttext - Subject of multimedia message
- Media URLs
media_urlslist - A list of media URLs. The total media size must be less than 1 MB.
- Webhook URL
webhook_urltext - The URL where webhooks related to this message will be sent.
- Webhook failover URL
webhook_failover_urltext - The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.
- Use profile webhooks
use_profile_webhookstrue/false - If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.Default:
true.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"body": {
"text": "example"
},
"cc": [],
"child_message_id": "example",
"completed_at": "example",
"cost": {
"amount": "example",
"currency": "example"
},
"cost_breakdown": {
"carrier_fee": {
"amount": "example",
"currency": "example"
},
"rate": {
"amount": "example",
"currency": "example"
}
},
"direction": "outbound",
"encoding": "example",
"errors": [],
"from": {
"agent_id": "example",
"agent_name": "example",
"carrier": "example",
"line_type": "Wireline",
"phone_number": "example"
},
"id": "example",
"media": [],
"messaging_profile_id": "example",
"num_chars": 1,
"organization_id": "example",
"parent_message_id": "example",
"parts": 1,
"received_at": "example",
"record_type": "message",
"sent_at": "example",
"smart_encoding_applied": false,
"subject": "example",
"tags": [],
"tcr_campaign_billable": false,
"tcr_campaign_id": "example",
"tcr_campaign_registered": "example",
"template_id": "example",
"template_name": "example",
"text": "example",
"to": [],
"type": "SMS",
"valid_until": "example",
"wait_seconds": 1.0,
"webhook_failover_url": "example",
"webhook_url": "example"
}
}
}Send message
Send message.
Inputs
- Idempotency key
idempotency_keytext - Idempotency key.
- From number
from_numbertext - Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code). **Required if sending with a phone number, short code, or alphanumeric sender ID.**
- Messaging profile
messaging_profile_idtext - Unique identifier for a messaging profile. **Required if sending via number pool or with an alphanumeric sender ID.**
- To
totextRequired - Receiving address (+E.164 formatted phone number or short code).
- Text
texttext - Message body (i.e., content) as a non-empty string. **Required for SMS**
- Subject
subjecttext - Subject of multimedia message
- Media URLs
media_urlslist - A list of media URLs. The total media size must be less than 1 MB. **Required for MMS**
- Webhook URL
webhook_urltext - The URL where webhooks related to this message will be sent.
- Webhook failover URL
webhook_failover_urltext - The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.
- Use profile webhooks
use_profile_webhookstrue/false - If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.Default:
true. - Type
typetext - The protocol for sending the message, either SMS or MMS.One of:
SMS,MMS. - Auto detect
auto_detecttrue/false - Auto detect.Default:
false. - Send at
send_atdate and time - ISO 8601 formatted date indicating when to send the message - accurate up till a minute.
- Encoding
encodingtext - Encoding.One of:
auto,gsm7,ucs2. Default:auto.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"body": {
"text": "example"
},
"cc": [],
"child_message_id": "example",
"completed_at": "example",
"cost": {
"amount": "example",
"currency": "example"
},
"cost_breakdown": {
"carrier_fee": {
"amount": "example",
"currency": "example"
},
"rate": {
"amount": "example",
"currency": "example"
}
},
"direction": "outbound",
"encoding": "example",
"errors": [],
"from": {
"agent_id": "example",
"agent_name": "example",
"carrier": "example",
"line_type": "Wireline",
"phone_number": "example"
},
"id": "example",
"media": [],
"messaging_profile_id": "example",
"num_chars": 1,
"organization_id": "example",
"parent_message_id": "example",
"parts": 1,
"received_at": "example",
"record_type": "message",
"sent_at": "example",
"smart_encoding_applied": false,
"subject": "example",
"tags": [],
"tcr_campaign_billable": false,
"tcr_campaign_id": "example",
"tcr_campaign_registered": "example",
"template_id": "example",
"template_name": "example",
"text": "example",
"to": [],
"type": "SMS",
"valid_until": "example",
"wait_seconds": 1.0,
"webhook_failover_url": "example",
"webhook_url": "example"
}
}
}Update messaging profile
Updates the supplied settings on the specified messaging profile. Settings omitted from the request remain unchanged.
Inputs
- Messaging profile ID
messaging_profile_idtextRequired - The id of the messaging profile to retrieve
- Name
nametext - A user friendly name for the messaging profile.
- Enabled
enabledtrue/false - Specifies whether the messaging profile is enabled or not.
- Webhook URL
webhook_urltext - The URL where webhooks related to this messaging profile will be sent.
- Webhook failover URL
webhook_failover_urltext - The failover URL where webhooks related to this messaging profile will be sent if sending to the primary URL fails.
- Webhook API version
webhook_api_versiontext - Determines which webhook format will be used, Telnyx API v1, v2, or a legacy 2010-04-01 format.One of:
1,2,2010-04-01. - Whitelisted destinations
whitelisted_destinationslist - Whitelisted destinations.
- Number pool settings
number_pool_settingsobject - Number pool settings.
- Url shortener settings
url_shortener_settingsobject - Url shortener settings.
- Mm7 metadata
mm7_metadataobject - MM7 settings for inbound messages
- Alpha sender
alpha_sendertext - The alphanumeric sender ID to use when sending to destinations that require an alphanumeric sender ID.
- Daily spend limit
daily_spend_limittext - The maximum amount of money (in USD) that can be spent by this profile before midnight UTC.
- Daily spend limit enabled
daily_spend_limit_enabledtrue/false - Whether to enforce the value configured by `daily_spend_limit`.
- Mms fall back to sms
mms_fall_back_to_smstrue/false - enables SMS fallback for MMS messages.Default:
false. - Mms transcoding
mms_transcodingtrue/false - enables automated resizing of MMS media.Default:
false. - Mobile only
mobile_onlytrue/false - Send messages only to mobile phone numbers.Default:
false. - Smart encoding
smart_encodingtrue/false - Enables automatic character encoding optimization for SMS messages. When enabled, the system automatically selects the most efficient encoding (GSM-7 or UCS-2) based on message content to maximize character limits and minimize costs.Default:
false. - Features
featuresobject - Telnyx product features the messaging customer can enable on the messaging profile. Keys map to individual feature flags; unknown keys are accepted and preserved for forward compatibility with rolling deployments.
- Ai assistant ID
ai_assistant_idtext - The ID of the AI assistant associated with this messaging profile.
- Redaction enabled
redaction_enabledtrue/false - Set to true to enable message content redaction on this profile, or false to disable it. Ignored if the organization is not on the redaction allowlist. See the [Message Redaction guide](/docs/messaging/messages/message-redaction) for what is redacted.Default:
false. - Redaction level
redaction_levelnumber - The redaction level to apply when redaction is enabled. 1: redact message records and reporting only. 2 (default): also redact inbound webhook payloads. See the [Message Redaction guide](/docs/messaging/messages/message-redaction).Default:
2.
Outputs
dataobject- The response from Telnyx.
Example output
{
"data": {
"data": {
"ai_assistant_id": "example",
"alpha_sender": "example",
"created_at": "example",
"daily_spend_limit": "example",
"daily_spend_limit_enabled": false,
"enabled": false,
"features": {
"ai_opt_out_detection_enabled": false,
"auto_chunk_long_messages": false
},
"health_webhook_url": "example",
"id": "example",
"mm7_metadata": {
"mm7_failover_webhook_url": "example",
"mm7_webhook_url": "example"
},
"mms_fall_back_to_sms": false,
"mms_transcoding": false,
"mobile_only": false,
"name": "example",
"number_pool_settings": {
"geomatch": false,
"long_code_weight": 1.0,
"skip_unhealthy": false,
"sticky_sender": false,
"toll_free_weight": 1.0
},
"organization_id": "example",
"record_type": "messaging_profile",
"redaction_enabled": false,
"redaction_level": 1,
"resource_group_id": "example",
"smart_encoding": false,
"updated_at": "example",
"url_shortener_settings": {
"domain": "example",
"prefix": "example",
"replace_blacklist_only": false,
"send_webhooks": false
},
"v1_secret": "example",
"webhook_api_version": "1",
"webhook_failover_url": "example",
"webhook_url": "example",
"whitelisted_destinations": []
}
}
}