Prerequisites
- A Telnyx account with API access
- Your API key
- At least one messaging profile created
Overview
Every phone number used for messaging needs:- A messaging profile — Controls webhook URLs, inbound settings, and features like number pool or sticky sender
- Messaging enabled — The number must have messaging capabilities activated
- Regulatory compliance — Depending on the number type, you may need 10DLC registration or toll-free verification
Step 1: List messaging-capable numbers
Find numbers on your account that support messaging:Step 2: Assign a number to a messaging profile
Link a phone number to a messaging profile to configure its webhook URLs and messaging behavior.Step 3: Retrieve number configuration
Check the current messaging configuration for a specific number:Response fields
| Field | Description |
|---|---|
phone_number | The E.164 formatted phone number |
messaging_profile_id | ID of the assigned messaging profile |
type | Number type: long_code, toll_free, short_code |
country_code | Two-letter country code |
features | Enabled features (SMS, MMS, etc.) |
health | Number health indicators (message success rate, etc.) |
eligible_messaging_products | Products the number can be used for |
Step 4: Bulk assignment
Assign multiple numbers to a messaging profile at once using the messaging profile’s phone number assignment endpoint:Messaging enablement by number type
Different number types have different requirements before they can send messages:| Number Type | Messaging Ready? | Additional Steps Required |
|---|---|---|
| Long code (US) | After 10DLC registration | Register brand + campaign |
| Toll-free (US/CA) | After verification | Submit toll-free verification |
| Short code | After provisioning | Short code setup |
| Long code (non-US) | Typically immediate | Check country-specific requirements |
| Alphanumeric sender ID | After registration | Alphanumeric ID setup |
Unassign a number from a profile
Remove a number’s messaging profile assignment:Unassigning a number from a messaging profile means it will no longer receive inbound message webhooks or be available for outbound messaging through that profile.
Troubleshooting
Number not appearing in messaging_phone_numbers list
Number not appearing in messaging_phone_numbers list
Possible causes:
- The number doesn’t have messaging capabilities. Check your number order — not all numbers support SMS/MMS.
- The number hasn’t finished provisioning yet. Wait a few minutes after purchase.
- The number is on a different Telnyx account.
GET /v2/phone_numbers/{id} and check for messaging in the features.Messages failing with 'number not associated with messaging profile'
Messages failing with 'number not associated with messaging profile'
Cause: The
from number in your send request isn’t assigned to a messaging profile.Fix: Assign the number to a profile using the assignment API, or use the messaging profile’s number pool to automatically select a number.Inbound messages not triggering webhooks
Inbound messages not triggering webhooks
Number shows messaging enabled but messages are filtered
Number shows messaging enabled but messages are filtered
Cause: For US long codes, messages may be filtered by carriers if 10DLC registration isn’t complete.Fix: Complete 10DLC brand and campaign registration. For toll-free, complete verification.
Cannot assign number to a messaging profile
Cannot assign number to a messaging profile
Possible causes:
- The number is already assigned to a different product (voice connection, etc.) that conflicts
- The messaging profile ID is invalid
- The number belongs to a different organization
Next steps
Messaging Profiles
Create and configure messaging profiles with webhooks and features.
Send a Message
Send your first SMS/MMS using a configured number.
Number Pool
Use multiple numbers in a pool for automatic sender selection.
10DLC Registration
Register your brand and campaign for US long code messaging.