Prerequisites
- A Telnyx account (free to create)
1. Get two phone numbers
Purchase two Telnyx numbers so you can test messaging between them without registration requirements.1
Go to Numbers
Navigate to Numbers > Search & Buy in the portal.
2
Search for numbers
Enter your preferred area code or region, check SMS under features, and click Search.
3
Purchase two numbers
Click Add to Cart on two numbers, then Place Order.
Having two numbers lets you test on-net (Telnyx-to-Telnyx) messaging immediately, and also test receiving inbound messages.
2. Create a Messaging Profile
1
Go to Messaging
Navigate to Messaging in the portal.
2
Create a profile
Click Add new profile, give it a name (e.g., “My App”), and click Save.
3
Assign both numbers
Go to My Numbers, and for each number, click the Messaging Profile dropdown, select your profile, and save.
3. Get your API key
Go to API Keys and copy your API key (or create one if needed).4. Send a message
- SMS
- MMS
YOUR_API_KEY: Your API key from step 3from: Your first Telnyx number (the sender)to: Your second Telnyx number (the recipient)
Use E.164 format for phone numbers:
+ followed by country code and number (e.g., +15551234567).Sending to non-Telnyx numbers? Off-net messaging to external carriers typically requires sender registration (10DLC, toll-free verification, etc.). See Next steps for registration guides.
Response
A successful response looks like this:status: "queued" means your message is on its way. Save the id to track delivery status.