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
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: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.