Number Pool
| cURL | Python | PHP | Node | .NET | Ruby | Portal |
cURL
Number Pool distributes your outbound messaging traffic across multiple phone numbers to help you manage your messaging campaigns. The pool of numbers includes all long code and toll-free numbers assigned to your Messaging Profile. When you send a message, the “From” number is selected from the numbers in your Number Pool that aren’t currently being used to send a message.
Follow the instructions below to set up Number Pool on one of your Messaging Profiles. You will also need to associate at least one phone number with the Messaging Profile.
When sending messages, use the send endpoint for Number Pool. You will need to omit the “From” field from the request and instead specify the Messaging Profile (via the messaging_profile_id
parameter) with the number pool you'd like to utilize for sending your message.
Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.
Weights
Long Code and Toll Free weight defines the ratio at which a number type will be selected when sending a message. For example, if Long Code weight is 5, and Toll Free weight is 1, then every five messages will be sent from a Long Code number in the number pool, and the sixth message will be sent from a Toll Free number. The sum of the weights for all number types does not necessarily need to add to 100. Weight must be a non-negative number, and when equal to zero it will remove the number type from the pool.
Skip Unhealthy
If this feature is enabled, Telnyx takes into the account the health of a number when choosing a number from the pool. If a number is deemed unhealthy, it's skipped until it's deemed to be healthy again.
NoteIf no number in the pool is deemed healthy, number pool will not choose a number and will reject the message.
The code below enables and then disables Number Pool for a Messaging Profile:
curl -X PATCH \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer YOUR_API_KEY" \
--data '{"number_pool_settings":{"long_code_weight":1,"toll_free_weight":10}}' \
"https://api.telnyx.com/v2/messaging_profiles/{YOUR_MESSAGING_PROFILE_ID}"
curl -X PATCH \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer YOUR_API_KEY" \
--data '{"number_pool_settings":{}}' \
"https://api.telnyx.com/v2/messaging_profiles/{YOUR_MESSAGING_PROFILE_ID}"
NoteAfter pasting the above content, Kindly check and remove any new line added
Python
Number Pool distributes your outbound messaging traffic across multiple phone numbers to help you manage your messaging campaigns. The pool of numbers includes all long code and toll-free numbers assigned to your Messaging Profile. When you send a message, the “From” number is selected from the numbers in your Number Pool that aren’t currently being used to send a message.
Follow the instructions below to set up Number Pool on one of your Messaging Profiles. You will also need to associate at least one phone number with the Messaging Profile.
When sending messages, use the send endpoint for Number Pool. You will need to omit the “From” field from the request and instead specify the Messaging Profile (via the messaging_profile_id
parameter) with the number pool you'd like to utilize for sending your message.
Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.
Weights
Long Code and Toll Free weight defines the ratio at which a number type will be selected when sending a message. For example, if Long Code weight is 5, and Toll Free weight is 1, then every five messages will be sent from a Long Code number in the number pool, and the sixth message will be sent from a Toll Free number. The sum of the weights for all number types does not necessarily need to add to 100. Weight must be a non-negative number, and when equal to zero it will remove the number type from the pool.
Skip Unhealthy
If this feature is enabled, Telnyx takes into the account the health of a number when choosing a number from the pool. If a number is deemed unhealthy, it's skipped until it's deemed to be healthy again.
NoteIf no number in the pool is deemed healthy, number pool will not choose a number and will reject the message.
The code below enables and then disables Number Pool for a Messaging Profile:
import telnyx
telnyx.api_key = "YOUR_API_KEY"
mp = telnyx.MessagingProfile.retrieve("YOUR_MESSAGING_PROFILE_ID")
# turn on number pool
mp.number_pool_settings = {
"long_code_weight": 1,
"toll_free_weight": 10
}
mp.save()
# turn off number pool
mp.number_pool_settings = {}
mp.save()
NoteAfter pasting the above content, Kindly check and remove any new line added
PHP
Number Pool distributes your outbound messaging traffic across multiple phone numbers to help you manage your messaging campaigns. The pool of numbers includes all long code and toll-free numbers assigned to your Messaging Profile. When you send a message, the “From” number is selected from the numbers in your Number Pool that aren’t currently being used to send a message.
Follow the instructions below to set up Number Pool on one of your Messaging Profiles. You will also need to associate at least one phone number with the Messaging Profile.
When sending messages, use the send endpoint for Number Pool. You will need to omit the “From” field from the request and instead specify the Messaging Profile (via the messaging_profile_id
parameter) with the number pool you'd like to utilize for sending your message.
Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.
Weights
Long Code and Toll Free weight defines the ratio at which a number type will be selected when sending a message. For example, if Long Code weight is 5, and Toll Free weight is 1, then every five messages will be sent from a Long Code number in the number pool, and the sixth message will be sent from a Toll Free number. The sum of the weights for all number types does not necessarily need to add to 100. Weight must be a non-negative number, and when equal to zero it will remove the number type from the pool.
Skip Unhealthy
If this feature is enabled, Telnyx takes into the account the health of a number when choosing a number from the pool. If a number is deemed unhealthy, it's skipped until it's deemed to be healthy again.
NoteIf no number in the pool is deemed healthy, number pool will not choose a number and will reject the message.
The code below enables and then disables Number Pool for a Messaging Profile:
\Telnyx\Telnyx::setApiKey('YOUR_API_KEY');
//Turn on number pool
\Telnyx\MessagingProfile::Update("YOUR_MESSAGING_PROFILE_ID", ["number_pool_settings" => {
"long_code_weight": 1,
"toll_free_weight": 10
}]);
//Turn off number pool
\Telnyx\MessagingProfile::Update("YOUR_MESSAGING_PROFILE_ID", ["number_pool_settings" => {}]);
NoteAfter pasting the above content, Kindly check and remove any new line added
Node
Number Pool distributes your outbound messaging traffic across multiple phone numbers to help you manage your messaging campaigns. The pool of numbers includes all long code and toll-free numbers assigned to your Messaging Profile. When you send a message, the “From” number is selected from the numbers in your Number Pool that aren’t currently being used to send a message.
Follow the instructions below to set up Number Pool on one of your Messaging Profiles. You will also need to associate at least one phone number with the Messaging Profile.
When sending messages, use the send endpoint for Number Pool. You will need to omit the “From” field from the request and instead specify the Messaging Profile (via the messaging_profile_id
parameter) with the number pool you'd like to utilize for sending your message.
Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.
Weights
Long Code and Toll Free weight defines the ratio at which a number type will be selected when sending a message. For example, if Long Code weight is 5, and Toll Free weight is 1, then every five messages will be sent from a Long Code number in the number pool, and the sixth message will be sent from a Toll Free number. The sum of the weights for all number types does not necessarily need to add to 100. Weight must be a non-negative number, and when equal to zero it will remove the number type from the pool.
Skip Unhealthy
If this feature is enabled, Telnyx takes into the account the health of a number when choosing a number from the pool. If a number is deemed unhealthy, it's skipped until it's deemed to be healthy again.
NoteIf no number in the pool is deemed healthy, number pool will not choose a number and will reject the message.
The code below enables and then disables Number Pool for a Messaging Profile:
import Telnyx from 'telnyx';
const telnyx = new Telnyx("YOUR_API_KEY");
// Turn on number pool
const { data : messagingProfile } = await telnyx.messagingProfiles.update(
'YOUR_MESSAGING_PROFILE_ID',
{
"number_pool_settings": {
"long_code_weight": 1,
"toll_free_weight": 10
}
}
)
// Turn off number pool
const { data : messagingProfile } = await telnyx.messagingProfiles.update(
'YOUR_MESSAGING_PROFILE_ID',
{
"number_pool_settings": {}
}
)
NoteAfter pasting the above content, Kindly check and remove any new line added
.NET
Number Pool distributes your outbound messaging traffic across multiple phone numbers to help you manage your messaging campaigns. The pool of numbers includes all long code and toll-free numbers assigned to your Messaging Profile. When you send a message, the “From” number is selected from the numbers in your Number Pool that aren’t currently being used to send a message.
Follow the instructions below to set up Number Pool on one of your Messaging Profiles. You will also need to associate at least one phone number with the Messaging Profile.
When sending messages, use the send endpoint for Number Pool. You will need to omit the “From” field from the request and instead specify the Messaging Profile (via the messaging_profile_id
parameter) with the number pool you'd like to utilize for sending your message.
Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.
Weights
Long Code and Toll Free weight defines the ratio at which a number type will be selected when sending a message. For example, if Long Code weight is 5, and Toll Free weight is 1, then every five messages will be sent from a Long Code number in the number pool, and the sixth message will be sent from a Toll Free number. The sum of the weights for all number types does not necessarily need to add to 100. Weight must be a non-negative number, and when equal to zero it will remove the number type from the pool.
Skip Unhealthy
If this feature is enabled, Telnyx takes into the account the health of a number when choosing a number from the pool. If a number is deemed unhealthy, it's skipped until it's deemed to be healthy again.
NoteIf no number in the pool is deemed healthy, number pool will not choose a number and will reject the message.
The code below enables and then disables Number Pool for a Messaging Profile:
using System;
using Telnyx.net.Services.VerifyAPI;
private static string TELNYX_API_KEY ="TELNYX_API_KEY";
Telnyx.TelnyxConfiguration.SetApiKey(TELNYX_API_KEY);
VerificationService verifyService = new VerificationService();
string webhookURL = "";
var messagingProfile = new Telnyx.MessagingProfileService()
var stuff = new Telnyx.MessagingProfileUpdate
{
NumberPoolSettings = {
Geomatch = false,
LongCodeWeight = 1,
TollFreeWeight =1,
}
};
messagingProfile.Update(webhookURL, stuff);
NoteAfter pasting the above content, Kindly check and remove any new line added
Ruby
Number Pool distributes your outbound messaging traffic across multiple phone numbers to help you manage your messaging campaigns. The pool of numbers includes all long code and toll-free numbers assigned to your Messaging Profile. When you send a message, the “From” number is selected from the numbers in your Number Pool that aren’t currently being used to send a message.
Follow the instructions below to set up Number Pool on one of your Messaging Profiles. You will also need to associate at least one phone number with the Messaging Profile.
When sending messages, use the send endpoint for Number Pool. You will need to omit the “From” field from the request and instead specify the Messaging Profile (via the messaging_profile_id
parameter) with the number pool you'd like to utilize for sending your message.
Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.
Weights
Long Code and Toll Free weight defines the ratio at which a number type will be selected when sending a message. For example, if Long Code weight is 5, and Toll Free weight is 1, then every five messages will be sent from a Long Code number in the number pool, and the sixth message will be sent from a Toll Free number. The sum of the weights for all number types does not necessarily need to add to 100. Weight must be a non-negative number, and when equal to zero it will remove the number type from the pool.
Skip Unhealthy
If this feature is enabled, Telnyx takes into the account the health of a number when choosing a number from the pool. If a number is deemed unhealthy, it's skipped until it's deemed to be healthy again.
NoteIf no number in the pool is deemed healthy, number pool will not choose a number and will reject the message.
The code below enables and then disables Number Pool for a Messaging Profile:
require "telnyx"
Telnyx.api_key = "YOUR_API_KEY"
mp = Telnyx::MessagingProfile.retrieve("YOUR_MESSAGING_PROFILE_ID")
# turn on number pool
mp.number_pool_settings = {
long_code_weight: 1,
toll_free_weight: 10
}
mp.save
# turn off number pool
mp.number_pool_settings = {}
mp.save
NoteAfter pasting the above content, Kindly check and remove any new line added
Portal
Number Pool distributes your outbound messaging traffic across multiple phone numbers to help you manage your messaging campaigns. The pool of numbers includes all long code and toll-free numbers assigned to your Messaging Profile. When you send a message, the “From” number is selected from the numbers in your Number Pool that aren’t currently being used to send a message.
Follow the instructions below to set up Number Pool on one of your Messaging Profiles. You will also need to associate at least one phone number with the Messaging Profile.
When sending messages, use the send endpoint for Number Pool. You will need to omit the “From” field from the request and instead specify the Messaging Profile (via the messaging_profile_id
parameter) with the number pool you'd like to utilize for sending your message.
Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.
Weights
Long Code and Toll Free weight defines the ratio at which a number type will be selected when sending a message. For example, if Long Code weight is 5, and Toll Free weight is 1, then every five messages will be sent from a Long Code number in the number pool, and the sixth message will be sent from a Toll Free number. The sum of the weights for all number types does not necessarily need to add to 100. Weight must be a non-negative number, and when equal to zero it will remove the number type from the pool.
Skip Unhealthy
If this feature is enabled, Telnyx takes into the account the health of a number when choosing a number from the pool. If a number is deemed unhealthy, it's skipped until it's deemed to be healthy again.
NoteIf no number in the pool is deemed healthy, number pool will not choose a number and will reject the message.
To configure Number Pool in your Portal:
- Click on “Messaging” in the navigation menu on the left-hand side of the Telnyx Mission Control Portal.
- Click the edit symbol next to the Messaging Profile you want to use.
- Under Outbound, toggle on “Number Pool” to enable.
- Once enabled, you can adjust the weighting of long code and toll-free numbers. For higher delivery rates, you can also select “Skip Unhealthy Numbers” to exclude any numbers with low delivery rates.
- Click “Save”.