Skip to main content

Geomatch

| cURL | Python | PHP | Node | .NET | Ruby | Portal |


cURL

When Geomatch is enabled for your messaging profile's number pool, Telnyx will choose a number from the number pool that matches US area code of the recipient's phone number.

Note

If there is no number in the pool that matches, Telnyx will fallback to using another number from the number pool.

Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.

The code below enables and then disables Geomatch 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":{"geomatch": true}}' \
"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":{"geomatch": false}}' \
"https://api.telnyx.com/v2/messaging_profiles/{YOUR_MESSAGING_PROFILE_ID}"
Note

After pasting the above content, Kindly check and remove any new line added

Python

When Geomatch is enabled for your messaging profile's number pool, Telnyx will choose a number from the number pool that matches US area code of the recipient's phone number.

Note

If there is no number in the pool that matches, Telnyx will fallback to using another number from the number pool.

Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.

The code below enables and then disables Geomatch for a Messaging Profile:

import telnyx
telnyx.api_key = "YOUR_API_KEY"

mp = telnyx.MessagingProfile.retrieve("YOUR_MESSAGING_PROFILE_ID")

# turn on geomatch
mp.number_pool_settings = {"geomatch": True}
mp.save()

# turn off geomatch
mp.number_pool_settings = {"geomatch": False}
mp.save()
Note

After pasting the above content, Kindly check and remove any new line added

PHP

When Geomatch is enabled for your messaging profile's number pool, Telnyx will choose a number from the number pool that matches US area code of the recipient's phone number.

Note

If there is no number in the pool that matches, Telnyx will fallback to using another number from the number pool.

Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.

The code below enables and then disables Geomatch for a Messaging Profile:

\Telnyx\Telnyx::setApiKey('YOUR_API_KEY');

//Turn on geomatch
\Telnyx\MessagingProfile::Update("YOUR_MESSAGING_PROFILE_ID", ["number_pool_settings" => {"geomatch": true}]);

//Turn off geomatch
\Telnyx\MessagingProfile::Update("YOUR_MESSAGING_PROFILE_ID", ["number_pool_settings" => {"geomatch": false}]);
Note

After pasting the above content, Kindly check and remove any new line added

Node

When Geomatch is enabled for your messaging profile's number pool, Telnyx will choose a number from the number pool that matches US area code of the recipient's phone number.

Note

If there is no number in the pool that matches, Telnyx will fallback to using another number from the number pool.

Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.

The code below enables and then disables Geomatch for a Messaging Profile:

const telnyx = require("telnyx")("YOUR_API_KEY")
// Turn on geomatch
const { data : messagingProfile } = await telnyx.messagingProfiles.update(
'YOUR_MESSAGING_PROFILE_ID',
{
"number_pool_settings": {"geomatch": true}
}
)

// Turn off geomatch
const { data : messagingProfile } = await telnyx.messagingProfiles.update(
'YOUR_MESSAGING_PROFILE_ID',
{
"number_pool_settings": {"geomatch": false}
}
)
Note

After pasting the above content, Kindly check and remove any new line added

.NET

When Geomatch is enabled for your messaging profile's number pool, Telnyx will choose a number from the number pool that matches US area code of the recipient's phone number.

Note

If there is no number in the pool that matches, Telnyx will fallback to using another number from the number pool.

Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.

The code below enables and then disables Geomatch 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);
Note

After pasting the above content, Kindly check and remove any new line added

Ruby

When Geomatch is enabled for your messaging profile's number pool, Telnyx will choose a number from the number pool that matches US area code of the recipient's phone number.

Note

If there is no number in the pool that matches, Telnyx will fallback to using another number from the number pool.

Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.

The code below enables and then disables Geomatch for a Messaging Profile:

import "telnyx"
Telnyx.api_key = "YOUR_API_KEY"

mp = Telnyx::MessagingProfile.retrieve("YOUR_MESSAGING_PROFILE_ID")

# turn on geomatch
mp.number_pool_settings = {
geomatch: true
}

mp.save

# turn off geomatch
mp.number_pool_settings = {
geomatch: false
}

mp.save
Note

After pasting the above content, Kindly check and remove any new line added

Portal

When Geomatch is enabled for your messaging profile's number pool, Telnyx will choose a number from the number pool that matches US area code of the recipient's phone number. Matching the area code of your customers will help increase the trust in the message, thus boosting engagement and improving the customer experience.

Note

If there is no number in the pool that matches, Telnyx will fallback to using another number from the number pool.

Configuring Geomatch Your Messaging Profile ID can found at the top of your Messaging Profile under the "Profile Info" section.

To configure Geomatch in your Portal:

  1. Click on “Messaging” in the navigation menu on the left-hand side of the Telnyx Mission Control Portal.
  2. Click the edit symbol next to the Messaging Profile you want to use.
  3. Under Outbound, toggle on “Number Pool” to enable.
  4. Select the “Geomatch” checkbox.
  5. Click “Save”.

geomatch

That’s it! Geomatch is now enabled for when you send messages with Telnyx.