Skip to main content
Solved

Phone number is valid but is not in a supported region for this account


Forum|alt.badge.img

Hello, folks!

I have an issue while subscribing/unsubscribing from sms marketing:

[error    ] 400 https://a.klaviyo.com/api/profile-subscription-bulk-delete-jobs attempt=1 data={"errors":[{"id":"28d2750b-5eff-44f0-b09d-776922595491","status":400,"code":"invalid","title":"Invalid input.","detail":"Phone number is valid but is not in a supported region for this account. Please configure a sending number for this region.","source":{"pointer":"/data/attributes/profiles/data/0/attributes/phone_number"},"links":{},"meta":{}}]} duration=0.8783969879150391 endpoint=https://a.klaviyo.com/api/profile-subscription-bulk-delete-jobs error={"errors":[{"id":"28d2750b-5eff-44f0-b09d-776922595491","status":400,"code":"invalid","title":"Invalid input.","detail":"Phone number is valid but is not in a supported region for this account. Please configure a sending number for this region.","source":{"pointer":"/data/attributes/profiles/data/0/attributes/phone_number"},"links":{},"meta":{}}]} from_cache=False headers={'Authorization': '***REDACTED***', 'content-type': 'application/vnd.api+json', 'revision': '2025-01-15'} non_unique_url=https://a.klaviyo.com/api/profile-subscription-bulk-delete-jobs status_code=400 url_host=a.klaviyo.com
 

Here’s the code for the request:

headers = {
    'Authorization': f'Klaviyo-API-Key {api_key}',
    'content-type': 'application/vnd.api+json',
    'revision': '2025-01-15',
}

response = self.requests.post(
    'https://a.klaviyo.com/api/profile-subscription-bulk-delete-jobs',
    data=json.dumps({
    'data': {
        'type': 'profile-subscription-bulk-delete-job',
        'attributes': {
            'profiles': {
                'data': [
                    {
                        'type': 'profile',
                        'attributes': {
                            'subscriptions': {
                                'sms': {
                                    'marketing': {
                                        'consent': 'UNSUBSCRIBED'
                                    },
                                }
                            },
                            'phone_number': '+1XXXYYYZZZZ'
                        }
                    }
                ]
            }
        }
    }
}
),
    headers=headers,
)

Is there anything we can do to fix this? The phone number we use for testing is real and valid, and belongs to USA. I also tried Canadian number.

Best answer by Mich expert

Hi Maryna,

Thank you for sharing the details of your issue. The error message indicates that while the phone number is valid, your Klaviyo account isn’t configured to send SMS to the region the number belongs to. Here’s how to resolve this:

Steps to Fix the Issue

  1. Check Your SMS Region Settings

    • Log in to your Klaviyo account and navigate to Account > Settings > SMS.
    • Confirm that the Supported Regions for your SMS marketing campaigns include the United States and Canada.
    • If these regions are not enabled, you’ll need to configure a sending number for these regions.
  2. Set Up a Sending Number

    • Go to Account > Settings > SMS Settings and click on Get a Number.
    • Choose a sending number that supports the region (e.g., United States or Canada). This ensures messages can be sent or actions like subscribing/unsubscribing are processed for phone numbers in these regions.
  3. Validate the Phone Number Format

    • Ensure the phone number is in E.164 format (e.g., +1XXXYYYZZZZ for the US). It seems your request already uses this format, so this step is likely already correct.
  4. Test the API Call Again

    • After configuring the regions and assigning a sending number, re-run your API call.

Additional Notes

  • If you’ve already set up a sending number and the issue persists, it may be due to restrictions in the phone number’s carrier or other compliance issues. In such cases:

    • Contact Klaviyo Support to verify if there are any account-specific limitations affecting your SMS region settings.
    • Ensure your Klaviyo account is fully enabled for SMS in all the regions you’re targeting.
  • If testing with multiple numbers (e.g., US and Canadian), ensure each region’s sending number is properly configured in your account.

Let me know if you need help troubleshooting further or understanding the API setup!

Best regards,
Michael
Klaviyo Expert & Email Marketing Specialist

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

Mich expert
Problem Solver IV
Forum|alt.badge.img+11
  • Problem Solver IV
  • 64 replies
  • Answer
  • January 28, 2025

Hi Maryna,

Thank you for sharing the details of your issue. The error message indicates that while the phone number is valid, your Klaviyo account isn’t configured to send SMS to the region the number belongs to. Here’s how to resolve this:

Steps to Fix the Issue

  1. Check Your SMS Region Settings

    • Log in to your Klaviyo account and navigate to Account > Settings > SMS.
    • Confirm that the Supported Regions for your SMS marketing campaigns include the United States and Canada.
    • If these regions are not enabled, you’ll need to configure a sending number for these regions.
  2. Set Up a Sending Number

    • Go to Account > Settings > SMS Settings and click on Get a Number.
    • Choose a sending number that supports the region (e.g., United States or Canada). This ensures messages can be sent or actions like subscribing/unsubscribing are processed for phone numbers in these regions.
  3. Validate the Phone Number Format

    • Ensure the phone number is in E.164 format (e.g., +1XXXYYYZZZZ for the US). It seems your request already uses this format, so this step is likely already correct.
  4. Test the API Call Again

    • After configuring the regions and assigning a sending number, re-run your API call.

Additional Notes

  • If you’ve already set up a sending number and the issue persists, it may be due to restrictions in the phone number’s carrier or other compliance issues. In such cases:

    • Contact Klaviyo Support to verify if there are any account-specific limitations affecting your SMS region settings.
    • Ensure your Klaviyo account is fully enabled for SMS in all the regions you’re targeting.
  • If testing with multiple numbers (e.g., US and Canadian), ensure each region’s sending number is properly configured in your account.

Let me know if you need help troubleshooting further or understanding the API setup!

Best regards,
Michael
Klaviyo Expert & Email Marketing Specialist


emma.owens
Community Manager
Forum|alt.badge.img+9
  • Community Manager
  • 42 replies
  • January 30, 2025

Hi ​@maryna ! 

I also wanted to note that you will not be able to be able to place an SMS subscribe or unsubscribe API call if you don’t have SMS set up in your account, so that may be the reason you are receiving this error code!