sms compliance

Sent logo
Sent TeamMay 3, 2025 / sms compliance / Article

Send SMS to Peru: OSIPTEL Compliance & API Guide 2025

Complete guide to sending SMS in Peru. Master OSIPTEL regulations, PDPL compliance, Peru SMS API integration (Twilio, Sinch, MessageBird, Plivo), and navigate Claro, Movistar, Entel, Bitel carrier requirements with 2025 updates.

Peru SMS Guide: Compliance, API Integration & Best Practices 2025

Sending SMS to Peru requires understanding OSIPTEL regulations, PDPL compliance requirements, and carrier-specific delivery considerations. This comprehensive guide covers Peru SMS API integration, regulatory compliance, and best practices for reaching customers on Claro, Movistar, Entel, and Bitel networks.

Peru SMS Market Overview

Locale name:Peru
ISO code:PE
RegionSouth America
Mobile country code (MCC)716
Dialing Code+51

Market Conditions: Peru operates a competitive mobile market with four major carriers: Claro (América Móvil, MNC 06/10, 37.52% share), Movistar (Telefónica, MNC 06, 24.41%), Entel (MNC 07/17, 23.44%), and Bitel (Viettel Group, MNC 15, 14.36%). SMS remains essential for business communications and authentication despite WhatsApp's popularity. Test your messages across all four carriers to ensure consistent delivery – Claro's larger market share means higher traffic but also more routing reliability.

2025 Infrastructure Updates: Increased smartphone adoption and affordable data plans have driven telecom operators to invest in 4G and 5G infrastructure. OSIPTEL's number portability requirements and competitive market dynamics have narrowed the gaps between carrier market shares, improving overall service quality.

How to Send SMS to Peru: Key Features and Capabilities

Peru supports standard SMS capabilities with concatenated messages and number portability, though two-way SMS is not available for most implementations.

Two-way SMS Support in Peru

Peru does not support two-way SMS through standard API integrations. Design your messaging strategy around one-way communications. For interactive experiences, use web links in your messages that direct recipients to mobile-friendly forms, chatbots, or customer service portals. Alternatively, include callback numbers for phone-based support.

Concatenated Messages (Long SMS)

Support: Yes, concatenation works for most sender ID types, though support varies by carrier.

Message length rules: Standard SMS messages support 160 characters (GSM-7) or 70 characters (UCS-2) before splitting occurs.

Encoding considerations: Both GSM-7 and UCS-2 encoding work, with UCS-2 required for special characters or non-Latin alphabets.

Character counting and costs:

  • Single message: 1–160 characters (GSM-7) or 1–70 characters (UCS-2)
  • Two segments: 161–306 characters (GSM-7) or 71–134 characters (UCS-2)
  • Three segments: 307–459 characters (GSM-7) or 135–201 characters (UCS-2)
  • Each segment counts as one message unit for billing

MMS Support

MMS messages automatically convert to SMS with an embedded URL link. This conversion ensures message delivery while maintaining rich media accessibility through web links. Host your media files on reliable, mobile-friendly platforms with fast loading times. Use HTTPS URLs and test links across all carriers before sending to production.

Peru Phone Number Format and Compatibility

Number Portability in Peru

Number portability has been available in Peru since 2010 (mobile) and 2014 (fixed). Users can port their numbers within 24 hours through iconectiv's centralized portability database. As of March 3, 2025, OSIPTEL implemented new portability regulations under Supreme Decree strengthening user rights and security:

  • Elimination of affidavits
  • Improved security measures
  • 30-day waiting period before number recycling
  • Enhanced problem resolution systems between operators and OSIPTEL

Number portability does not affect your message delivery or routing – the system automatically handles carrier identification, so you don't need special configuration.

Sending SMS to Landlines

You cannot send SMS to landline numbers in Peru. Attempts to message landline numbers return a 400 response error (code 21614) through the API, with no message delivery and no charges. Validate phone numbers before sending using number lookup APIs or by checking that the number follows the mobile format (+51 9XX XXX XXX).

Peru SMS Compliance: OSIPTEL and PDPL Requirements

Peru's SMS communications are governed by the Personal Data Protection Law (PDPL, Ley 29733, enacted July 2011, amended January 2017 by Legislative Decree No. 1353) and overseen by the National Authority for Data Protection (Autoridad Nacional de Protección de Datos Personales). OSIPTEL provides additional oversight for mobile communications.

2025 Regulatory Update (Effective March 30, 2025): Supreme Decree No. 016-2024-JUS (published November 30, 2024) introduced comprehensive PDPL updates:

  • Territorial scope: Foreign companies serving Peruvian customers must comply with PDPL requirements
  • Security requirements: Align data protection with ISO/IEC 27001 standards
  • Data Protection Officer (DPO) appointments (phased):
    • Large companies (>2,300 UIT or ~$3.28M annually): by November 30, 2025
    • Medium companies (1,700–2,300 UIT): by November 30, 2026
    • Small companies (150–1,700 UIT): by November 30, 2027
    • Micro companies (<150 UIT): by November 30, 2028

ISO/IEC 27001 Compliance: Implement information security management systems that address risk assessment, access controls, encryption, incident response, and regular security audits. Document your security policies and maintain evidence of compliance.

Cross-border Data Transfers: You can transfer personal data outside Peru only if the destination country provides adequate data protection or if you obtain explicit user consent. Document all cross-border transfers and maintain records of consent.

Penalties: Non-compliance can result in fines up to 100 UIT (~$142,000) depending on severity. Maintain detailed compliance documentation to avoid penalties.

Explicit Consent Requirements:

  • Obtain prior, informed, express, and unequivocal consent before sending marketing messages
  • Document consent collection method and timestamp
  • Maintain clear privacy policies that outline data usage
  • Provide transparent opt-in mechanisms during user registration

Best Practices for Consent Collection:

  • Use double opt-in verification for marketing lists
  • Keep detailed records of consent acquisition
  • Include clear terms and conditions during signup
  • Regularly update consent records

Implementation example:

typescript
interface ConsentRecord {
  userId: string;
  phoneNumber: string;
  consentGiven: boolean;
  consentMethod: 'web_form' | 'api' | 'mobile_app';
  consentTimestamp: Date;
  ipAddress: string;
  consentText: string;
}

// Example consent form text (Spanish)
const consentText = "Acepto recibir mensajes de texto (SMS) con ofertas, actualizaciones y notificaciones de [Company Name]. Puedo cancelar en cualquier momento respondiendo PARA.";

HELP/STOP and Other Commands

Support standard opt-out keywords in all SMS campaigns:

  • "STOP" or "PARA" (Spanish) – unsubscribe from all messages
  • "AYUDA" or "HELP" – receive assistance
  • Support both English and Spanish commands

Process opt-out requests within 24 hours. Send one confirmation message acknowledging the opt-out, then remove the number from all sending lists.

Automated opt-out response templates:

Spanish: "Has cancelado tu suscripción. No recibirás más mensajes de [Company Name]." English: "You have unsubscribed. You will no longer receive messages from [Company Name]."

Do Not Call / Do Not Disturb Registries

Peru does not maintain a centralized Do Not Call registry. However, you must:

  • Maintain internal suppression lists
  • Honor opt-out requests immediately
  • Document all opt-out requests
  • Regularly clean contact databases
  • Implement automated opt-out processing

Time Zone Sensitivity

Peru operates in PET (UTC-5) timezone. Send messages during these recommended hours:

Day TypeRecommended Hours (PET)
Business Days8:00 AM – 8:00 PM
Weekends9:00 AM – 6:00 PM
Emergency MessagesAny time (exempt from restrictions)

Peruvian National Holidays (avoid messaging):

  • January 1 – New Year's Day
  • Maundy Thursday & Good Friday – Easter (varies)
  • May 1 – Labor Day
  • June 29 – Saints Peter and Paul Day
  • July 28–29 – Independence Day
  • August 30 – Saint Rose of Lima Day
  • October 8 – Battle of Angamos
  • November 1 – All Saints' Day
  • December 8 – Immaculate Conception
  • December 25 – Christmas Day

Timezone-aware scheduling example:

typescript
import { DateTime } from 'luxon';

function isAllowedSendingTime(): boolean {
  const now = DateTime.now().setZone('America/Lima');
  const hour = now.hour;
  const isWeekend = now.weekday >= 6;

  if (isWeekend) {
    return hour >= 9 && hour < 18;
  }
  return hour >= 8 && hour < 20;
}

Peru SMS Sender ID Options and Number Types

Alphanumeric Sender ID in Peru

Operator network capability: Supported

Registration requirements: Pre-registration not required

Sender ID preservation: No – carriers overwrite IDs with short or long codes

Usage notes: While you can submit alphanumeric sender IDs, carriers convert them to numeric formats. Recipients typically see 5-digit short codes (e.g., "12345") or full international long codes. Claro and Movistar most consistently convert to short codes, while Entel and Bitel may use long codes.

What recipients see:

  • You send: "ACME Corp"
  • Recipient sees: "12345" (short code) or "+1234567890" (long code)

Long Codes for Peru SMS

Domestic vs. International:

  • Domestic long codes: Not supported
  • International long codes: Supported with limitations

Sender ID preservation: No – original sender IDs are not preserved

Provisioning time: Immediate to 24 hours

Use cases: Transactional messages, alerts, notifications

Limitations: International long codes may experience lower delivery rates compared to short codes and may be blocked by certain spam filters. Expect 85–95% delivery rates compared to 95–99% for short codes.

Cost comparison (approximate per-message rates):

  • International long codes: $0.04–$0.06
  • Short codes: $0.06–$0.08
  • Alphanumeric (converted): $0.05–$0.07

Short Codes for High-Volume SMS

Support: Available through local carriers

Provisioning time: 8–12 weeks

Use cases:

  • High-volume marketing campaigns (>10,000 messages/day)
  • Two-factor authentication requiring high trust
  • Customer service messaging with consistent sender ID
  • Promotional broadcasts to large audiences

Provisioning process:

  1. Contact your SMS provider or carrier directly
  2. Submit application with business documentation and use case
  3. Complete carrier review (4–6 weeks)
  4. Conduct technical integration and testing (2–4 weeks)
  5. Launch with approved short code

Costs: Application fee $500–$1,000, monthly lease $500–$1,500 depending on carrier and exclusivity (shared vs. dedicated).

Restricted SMS Content and Industries in Peru

Restricted Industries:

  • Gambling and betting services
  • Adult content or services
  • Unauthorized financial services
  • Unregistered pharmaceutical products

Regulated Industries:

  • Financial services: Include disclaimers such as "Tasas y condiciones aplican" (Rates and conditions apply) or "Mensaje de [Bank Name]. No compartir información confidencial por SMS" (Message from [Bank Name]. Do not share confidential information via SMS).
  • Healthcare messages: Comply with patient confidentiality requirements similar to HIPAA. Do not include specific diagnoses, treatment details, or personal health information in SMS.
  • Political messaging: Clearly identify the sender and political affiliation: "Mensaje político de [Candidate/Party Name]."

Content examples to avoid:

  • "¡GANA DINERO RÁPIDO!" (Win money fast!)
  • "CASINO ONLINE – REGISTRATE AHORA" (Online casino – register now)
  • Messages with excessive punctuation: "¡¡¡OFERTA!!!"
  • Messages promoting unregistered medications or supplements

SMS Content Filtering by Peru Carriers

Carrier Filtering Rules:

  • Carriers block messages containing gambling-related keywords (casino, apuestas, poker)
  • Use URLs from approved, established domains (avoid newly registered domains)
  • Excessive punctuation (more than 2 consecutive exclamation marks) triggers spam filters
  • ALL CAPS messages have higher filtering rates

Best Practices to Avoid Blocking:

  • Avoid URL shorteners (bit.ly, tinyurl) – use your branded domain
  • Limit special characters to standard punctuation
  • Use clear, professional language without excessive urgency
  • Maintain consistent sending patterns (avoid sudden volume spikes)
  • Include clear business identification in every message
  • Test messages across all carriers before bulk sending

Carrier-specific notes:

  • Claro: Most aggressive spam filtering, blocks URL shorteners consistently
  • Movistar: Moderate filtering, allows more promotional content
  • Entel: Similar to Movistar, balanced approach
  • Bitel: More lenient filtering but lower overall delivery rates

Best Practices for Sending SMS in Peru

Messaging Strategy

Keep messages concise and action-oriented:

Effective message example:

Hola María, tu pedido #12345 está en camino. Rastrea aquí: https://example.com/track/12345 – ACME Shop

Ineffective message example:

Estimada cliente, queremos informarle que su pedido ha sido procesado exitosamente y se encuentra actualmente en tránsito hacia su dirección registrada... (Too verbose, exceeds 160 characters, no clear action)

Best practices:

  • Keep messages under 160 characters when possible
  • Include clear call-to-actions ("Rastrea aquí", "Confirma ahora", "Responde SÍ")
  • Personalize messages using recipient's name
  • Maintain consistent sender identification
  • Put the most important information first

Sending Frequency and Timing

  • Limit marketing messages to 4–5 per month per recipient
  • Respect local holidays and cultural events
  • Maintain consistent sending patterns (same day/time each week)
  • Allow minimum 24-hour gaps between marketing messages
  • Transactional messages (order confirmations, shipping updates) are exempt from frequency limits

Localization

Primary language: Spanish

Regional considerations:

  • Coastal regions (Lima, Trujillo): Standard Spanish
  • Andean regions (Cusco, Arequipa): More formal tone appreciated
  • Amazon regions: Simpler language, shorter messages

Date and time formatting:

  • Date format: DD/MM/YYYY (e.g., 15/03/2025)
  • Time format: 24-hour clock (e.g., 14:30) or 12-hour with AM/PM
  • Currency: S/ or PEN (e.g., S/ 100.00)

Bilingual example (for tourist-focused businesses):

Your reservation at [Hotel] is confirmed for 15/03/2025. Check-in: 3:00 PM. Su reserva en [Hotel] está confirmada para el 15/03/2025. Check-in: 3:00 PM.

Opt-Out Management

  • Process opt-outs within 24 hours maximum
  • Maintain centralized opt-out database accessible to all sending systems
  • Send one confirmation message acknowledging the opt-out
  • Perform weekly database cleaning to remove opted-out numbers
  • Sync opt-out lists across all marketing channels (email, SMS, push notifications)

Testing and Monitoring Peru SMS Delivery

Test across all major carriers before launching campaigns:

CarrierTest NumbersExpected Delivery RateAvg. Delivery Time
Claro+51 9XX XXX XXX95–99%3–8 seconds
Movistar+51 9XX XXX XXX93–97%5–10 seconds
Entel+51 9XX XXX XXX92–96%4–9 seconds
Bitel+51 9XX XXX XXX88–94%6–12 seconds

Testing procedures:

  1. Send test messages to numbers on each carrier
  2. Verify content displays correctly (no encoding issues)
  3. Check link functionality on mobile devices
  4. Confirm sender ID displays as expected
  5. Test opt-out keyword responses

Monitoring checklist:

  • Track delivery rates by carrier (investigate if below expected range)
  • Monitor bounce rates and error codes
  • Measure engagement (link clicks, conversion rates)
  • Set up alerts for delivery rates below 90%
  • Conduct A/B testing on message content, timing, and sender IDs

Common delivery issues and solutions:

  • Low delivery rate on Claro: Check for URL shorteners or spam trigger words
  • Delayed delivery on Bitel: Reduce sending speed, implement rate limiting
  • High bounce rate: Validate phone numbers before sending, clean inactive numbers
  • Content not displaying correctly: Check character encoding (use UTF-8)

Peru SMS API Integration: Provider Comparison

Twilio SMS API for Peru

Twilio provides robust SMS API support for Peru with comprehensive delivery tracking and global infrastructure.

typescript
import * as Twilio from "twilio";

// Initialize Twilio client with credentials
const client = new Twilio(
  process.env.TWILIO_ACCOUNT_SID,
  process.env.TWILIO_AUTH_TOKEN
);

// Function to send SMS to Peru with comprehensive error handling
async function sendSMSToPeru(
  to: string,
  message: string,
  from: string
): Promise<void> {
  try {
    // Validate Peru number format: +51XXXXXXXXX
    const formattedNumber = to.startsWith("+51") ? to : `+51${to}`;
    const phoneRegex = /^\+51\d{9}$/;

    if (!phoneRegex.test(formattedNumber)) {
      throw new Error(`Invalid Peru phone number format: ${formattedNumber}`);
    }

    const response = await client.messages.create({
      body: message,
      from: from,  // Your Twilio number
      to: formattedNumber,
      // Track delivery status via webhook
      statusCallback: "https://your-webhook.com/status"
    });

    console.log(`Message sent successfully! SID: ${response.sid}`);
    console.log(`Status: ${response.status}`);
    console.log(`Estimated cost: $${response.price || 'calculating...'}`);
  } catch (error) {
    if (error.code === 21614) {
      console.error("Cannot send to landline number");
    } else if (error.code === 21211) {
      console.error("Invalid phone number format");
    } else if (error.code === 21408) {
      console.error("Rate limit exceeded - implement backoff");
    } else {
      console.error("Error sending message:", error.message);
    }
    throw error;
  }
}

// Retry logic with exponential backoff
async function sendWithRetry(
  to: string,
  message: string,
  from: string,
  maxRetries: number = 3
): Promise<void> {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    try {
      await sendSMSToPeru(to, message, from);
      return;
    } catch (error) {
      if (attempt === maxRetries - 1) throw error;
      const delay = Math.pow(2, attempt) * 1000; // 1s, 2s, 4s
      console.log(`Retry attempt ${attempt + 1} after ${delay}ms`);
      await new Promise(resolve => setTimeout(resolve, delay));
    }
  }
}

// Webhook handler for delivery status
app.post('/status', (req, res) => {
  const { MessageSid, MessageStatus, ErrorCode } = req.body;
  console.log(`Message ${MessageSid}: ${MessageStatus}`);

  if (ErrorCode) {
    console.error(`Delivery error: ${ErrorCode}`);
    // Log to monitoring system
  }

  res.sendStatus(200);
});

Sinch SMS API for Peru

Sinch offers direct carrier connections in Peru with support for high-volume messaging and detailed analytics.

typescript
import axios from "axios";

class SinchSMSClient {
  private readonly apiToken: string;
  private readonly serviceId: string;
  private readonly baseUrl: string = "https://sms.api.sinch.com/xms/v1";

  constructor(apiToken: string, serviceId: string) {
    this.apiToken = apiToken;
    this.serviceId = serviceId;
  }

  async sendSMS(to: string, message: string): Promise<void> {
    try {
      const response = await axios.post(
        `${this.baseUrl}/${this.serviceId}/batches`,
        {
          from: "YourSenderID",
          to: [to],
          body: message,
          delivery_report: "summary"
        },
        {
          headers: {
            "Authorization": `Bearer ${this.apiToken}`,
            "Content-Type": "application/json"
          }
        }
      );

      console.log("Message sent:", response.data.id);
    } catch (error) {
      console.error("Sinch API error:", error);
      throw error;
    }
  }
}

MessageBird SMS API for Peru

MessageBird provides reliable SMS delivery in Peru with advanced features for message tracking and analytics.

typescript
import messagebird from "messagebird";

class MessageBirdClient {
  private client: any;

  constructor(apiKey: string) {
    this.client = messagebird(apiKey);
  }

  sendSMS(
    to: string,
    message: string,
    originator: string
  ): Promise<any> {
    return new Promise((resolve, reject) => {
      // Validate Peru phone number format
      const phoneRegex = /^\+51\d{9}$/;
      if (!phoneRegex.test(to)) {
        reject(new Error("Invalid Peru phone number format"));
        return;
      }

      this.client.messages.create({
        originator: originator,
        recipients: [to],
        body: message,
        datacoding: "auto" // Automatic encoding detection
      }, (err: any, response: any) => {
        if (err) {
          reject(err);
        } else {
          resolve(response);
        }
      });
    });
  }
}

Plivo SMS API for Peru

Plivo offers competitive rates and reliable delivery for Peru SMS messaging with comprehensive API features.

typescript
import plivo from "plivo";

class PlivoSMSClient {
  private client: any;

  constructor(authId: string, authToken: string) {
    this.client = new plivo.Client(authId, authToken);
  }

  async sendSMS(
    src: string,
    dst: string,
    text: string
  ): Promise<void> {
    try {
      const response = await this.client.messages.create({
        src: src,  // Your Plivo number
        dst: dst,  // Destination number in Peru
        text: text,
        // Optional parameters
        url: "https://your-webhook.com/status",
        method: "POST"
      });

      console.log("Message sent:", response.messageUuid);
    } catch (error) {
      console.error("Plivo API error:", error);
      throw error;
    }
  }
}

Peru SMS Provider Comparison

FeatureTwilioSinchMessageBirdPlivo
Rate Limit250 msg/sec100 msg/sec150 msg/sec200 msg/sec
Avg Cost/Message$0.055$0.049$0.052$0.048
Delivery Rate96–98%94–97%95–97%93–96%
Provisioning TimeImmediateImmediateImmediateImmediate
Support QualityExcellentGoodVery GoodGood
Best ForEnterprise, global reachHigh-volume, carrier directOmnichannel, analyticsCost-sensitive, developers

Selection guide:

  • Choose Twilio for: Enterprise reliability, extensive documentation, global presence
  • Choose Sinch for: Direct carrier connections, high-volume campaigns, EU data residency
  • Choose MessageBird for: Multi-channel campaigns (SMS + WhatsApp + Voice), advanced analytics
  • Choose Plivo for: Budget-conscious projects, developer-friendly API, competitive pricing

API Rate Limits and Throughput Management

Rate limits per provider:

  • Twilio: 250 messages per second
  • Sinch: 100 messages per second
  • MessageBird: 150 messages per second
  • Plivo: 200 messages per second

Throughput management implementation:

typescript
import { Queue } from 'bull';

// Redis-backed queue for high-volume sending
const smsQueue = new Queue('sms-peru', {
  redis: { host: 'localhost', port: 6379 }
});

// Add messages to queue
async function queueSMS(to: string, message: string): Promise<void> {
  await smsQueue.add({
    to,
    message,
    timestamp: Date.now()
  }, {
    attempts: 3,
    backoff: {
      type: 'exponential',
      delay: 2000
    }
  });
}

// Process queue with rate limiting
smsQueue.process(async (job) => {
  const { to, message } = job.data;
  await sendSMSToPeru(to, message, process.env.TWILIO_NUMBER);
});

// Rate limiter configuration
import rateLimit from 'express-rate-limit';

const apiLimiter = rateLimit({
  windowMs: 1000, // 1 second window
  max: 200, // 200 requests per second (safely under Twilio's 250 limit)
  message: 'Rate limit exceeded, please slow down requests'
});

Exponential backoff strategy:

typescript
async function sendWithExponentialBackoff(
  sendFunction: () => Promise<void>,
  maxAttempts: number = 5
): Promise<void> {
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
    try {
      await sendFunction();
      return;
    } catch (error) {
      if (attempt === maxAttempts - 1) throw error;

      const delay = Math.min(1000 * Math.pow(2, attempt), 30000);
      console.log(`Attempt ${attempt + 1} failed, retrying in ${delay}ms`);
      await new Promise(resolve => setTimeout(resolve, delay));
    }
  }
}

Error Handling and Reporting

Common error codes:

Error CodeProviderDescriptionSolution
21614TwilioLandline numberValidate number format before sending
21211TwilioInvalid formatCheck phone number regex
21408TwilioRate limitImplement queue and backoff
21610TwilioUnsubscribedCheck opt-out list before sending
40001SinchAuth failedVerify API credentials
40301SinchInsufficient fundsAdd credits to account
9MessageBirdMissing paramsValidate request payload
21MessageBirdBad numberVerify phone format
155PlivoInvalid senderCheck sender ID configuration
171PlivoBlocked contentReview message for restricted keywords

Logging implementation:

typescript
import winston from 'winston';

const logger = winston.createLogger({
  level: 'info',
  format: winston.format.json(),
  transports: [
    new winston.transports.File({ filename: 'error.log', level: 'error' }),
    new winston.transports.File({ filename: 'sms.log' })
  ]
});

async function sendWithLogging(to: string, message: string): Promise<void> {
  logger.info('SMS send attempt', { to, messageLength: message.length });

  try {
    await sendSMSToPeru(to, message, process.env.TWILIO_NUMBER);
    logger.info('SMS sent successfully', { to });
  } catch (error) {
    logger.error('SMS send failed', {
      to,
      error: error.message,
      code: error.code
    });
    throw error;
  }
}

Alerting strategy:

typescript
import nodemailer from 'nodemailer';

interface AlertThresholds {
  deliveryRate: number;
  errorRate: number;
  avgDeliveryTime: number;
}

const thresholds: AlertThresholds = {
  deliveryRate: 90,      // Alert if below 90%
  errorRate: 5,           // Alert if above 5%
  avgDeliveryTime: 30000  // Alert if above 30 seconds
};

async function checkMetricsAndAlert(): Promise<void> {
  const metrics = await getDeliveryMetrics();

  if (metrics.deliveryRate < thresholds.deliveryRate) {
    await sendAlert(
      `Low delivery rate: ${metrics.deliveryRate}% (threshold: ${thresholds.deliveryRate}%)`
    );
  }

  if (metrics.errorRate > thresholds.errorRate) {
    await sendAlert(
      `High error rate: ${metrics.errorRate}% (threshold: ${thresholds.errorRate}%)`
    );
  }
}

// Run every 5 minutes
setInterval(checkMetricsAndAlert, 5 * 60 * 1000);

Frequently Asked Questions About Peru SMS

How do I send SMS to Peru?

Format phone numbers with the +51 country code followed by the 9-digit mobile number. Peru uses MCC 716 and supports concatenated messages through major operators (Claro, Movistar, Entel, Bitel). You can submit alphanumeric sender IDs, though carriers convert them to numeric formats. Two-way SMS is not supported – design campaigns for one-way communications with web links for interactivity.

What is Peru's SMS country code and mobile network structure?

Peru uses country code +51 with Mobile Country Code (MCC) 716. The four major operators are: Claro (MNC 06/10, 37.52% market share), Movistar (MNC 06, 24.41%), Entel (MNC 07/17, 23.44%), and Bitel (MNC 15, 14.36%). Number portability has been available since 2010 for mobile and 2014 for fixed lines, with 24-hour porting through iconectiv's centralized database.

Is PDPL compliance required for SMS in Peru?

Yes. Peru's Personal Data Protection Law (Ley 29733, enacted July 2011, amended January 2017) governs SMS communications. Critical 2025 update: Supreme Decree No. 016-2024-JUS (effective March 30, 2025) requires ISO/IEC 27001 security standards, phased Data Protection Officer appointments, and expanded territorial scope for foreign companies. Obtain explicit consent, support STOP/PARA opt-out keywords, and honor opt-outs within 24 hours. Penalties reach up to 100 UIT (~$142,000) for non-compliance.

Which SMS API providers support Peru and what are their rates?

Twilio, Sinch, MessageBird, and Plivo all support SMS delivery to Peru. Rate limits: Twilio (250 msgs/sec, $0.055/msg), Plivo (200 msgs/sec, $0.048/msg), MessageBird (150 msgs/sec, $0.052/msg), Sinch (100 msgs/sec, $0.049/msg). Choose Twilio for enterprise reliability, Sinch for carrier-direct high volume, MessageBird for omnichannel campaigns, or Plivo for cost efficiency.

What are Peru's SMS sending restrictions and compliance requirements?

Send during recommended hours: Business days 8:00 AM – 8:00 PM PET (UTC-5), weekends 9:00 AM – 6:00 PM PET. Avoid national holidays (Independence Day July 28–29, Christmas, New Year's, etc.). Limit marketing messages to 4–5 per month per recipient with 24-hour minimum gaps. You cannot send SMS to landlines (error code 21614). Restricted industries: gambling, adult content, unauthorized financial services, unregistered pharmaceuticals.

What changed in Peru's 2025 SMS regulations?

Two major updates: (1) OSIPTEL's March 3, 2025 portability regulation eliminated affidavits, improved security, mandated 30-day waiting before number recycling, and enhanced operator problem resolution. (2) PDPL updates (effective March 30, 2025) require phased DPO appointments: Large companies (>$3.28M) by Nov 30, 2025; Medium by Nov 30, 2026; Small by Nov 30, 2027; Micro by Nov 30, 2028. ISO/IEC 27001 security alignment now mandatory.

How does sender ID preservation work in Peru?

Peru does not preserve alphanumeric or international long code sender IDs – carriers overwrite them with short or long codes. While you can submit alphanumeric sender IDs (no pre-registration required), recipients see numeric formats (typically 5-digit short codes on Claro/Movistar or long codes on Entel/Bitel). Domestic long codes are not supported. Short codes are available through local carriers with 8–12 week provisioning times and $500–$1,500 monthly lease fees, ideal for high-volume campaigns (>10,000 msgs/day).

How do I troubleshoot delivery issues in Peru?

Check these common issues: (1) Low delivery on Claro – remove URL shorteners and spam trigger words. (2) Delayed delivery on Bitel – reduce sending speed and implement rate limiting. (3) High bounce rate – validate phone numbers using regex (/^+51\d{9}$/) and clean inactive numbers. (4) Encoding errors – use UTF-8 and test special characters. Monitor delivery rates by carrier and set alerts for rates below 90%. Expected rates: Claro 95–99%, Movistar 93–97%, Entel 92–96%, Bitel 88–94%.

Recap and Additional Resources

Key Takeaways

  1. Compliance Priorities

    • Obtain explicit consent before sending marketing messages and maintain detailed records
    • Implement ISO/IEC 27001 security standards by March 30, 2025
    • Appoint Data Protection Officer based on company size (phased deadlines through 2028)
    • Process opt-out requests within 24 hours and maintain centralized suppression lists
  2. Technical Best Practices

    • Format numbers as +51 followed by 9 digits – validate before sending to avoid landline errors
    • Test across all four carriers (Claro, Movistar, Entel, Bitel) before launching campaigns
    • Implement exponential backoff retry logic and queue systems for high-volume sending
    • Monitor delivery rates by carrier and investigate when rates drop below expected ranges
  3. Critical Pitfalls to Avoid

    • Do not use URL shorteners (bit.ly, tinyurl) – Claro blocks them consistently
    • Never send SMS to landlines – validate with regex /^+51\d{9}$/ first
    • Avoid excessive punctuation and ALL CAPS – both trigger spam filters
    • Do not send during national holidays (July 28–29, Christmas, etc.)
    • Never exceed 4–5 marketing messages per month per recipient

Next Steps

Follow this implementation checklist:

Week 1–2: Legal & Compliance

  • Review OSIPTEL regulations at osiptel.gob.pe
  • Consult with local legal counsel on PDPL compliance requirements
  • Document ISO/IEC 27001 security implementation plan
  • Determine DPO appointment timeline based on company size

Week 3–4: Technical Setup

  • Set up test accounts with SMS providers (Twilio, Sinch, MessageBird, or Plivo)
  • Obtain phone numbers on all four carriers for testing
  • Implement phone number validation and landline detection
  • Build consent tracking database with timestamp and method fields

Week 5–6: Implementation

  • Develop message templates in Spanish with proper localization
  • Implement automated opt-out processing for STOP/PARA keywords
  • Set up delivery monitoring and alerting systems
  • Configure timezone-aware scheduling for PET (UTC-5)

Week 7–8: Testing & Launch

  • Conduct cross-carrier testing (Claro, Movistar, Entel, Bitel)
  • Verify delivery rates meet expected thresholds (>90%)
  • Test opt-out workflows and confirmation messages
  • Launch pilot campaign with monitoring enabled

Additional Resources

  • OSIPTEL Official Website – Peru's telecommunications regulator. Access current regulations, market reports, number portability information, and carrier compliance requirements.

  • Peru Data Protection Authority – National Authority for Data Protection. Find PDPL guidance, DPO appointment requirements, compliance checklists, and penalty information.

  • Telecommunications Law No. 29904 – Full text of Peru's telecommunications law. Review legal framework, consumer protection provisions, and regulatory oversight structure.

  • Supreme Decree No. 016-2024-JUS – 2025 PDPL updates including ISO/IEC 27001 requirements, DPO timelines, and territorial scope expansions.

  • iconectiv Portability Database – Technical documentation for Peru's number portability system and carrier identification protocols.

Frequently Asked Questions

How to send SMS messages to Peru?

Use a reputable SMS API provider like Twilio, Sinch, MessageBird, or Plivo. Ensure the recipient's number is in the correct international format (+51XXXXXXXXX) and comply with all regulations regarding consent and content.

What is the SMS market like in Peru?

Peru has a robust mobile market with high SMS usage, despite the popularity of OTT apps. Key operators include Claro, Movistar, and Entel. Android dominates the device market.

Why does Peru not support two-way SMS?

Standard API integrations do not support two-way SMS in Peru. Businesses needing this functionality require alternative channels or specialized partnerships.

When should I send marketing SMS messages in Peru?

Adhere to the recommended messaging window of 8:00 AM to 8:00 PM PET on weekdays and 9:00 AM to 6:00 PM PET on weekends. Avoid national holidays and respect quiet hours.

Can I use an alphanumeric sender ID for SMS in Peru?

While you can submit alphanumeric sender IDs, they will be converted to numeric short or long codes by Peruvian carriers.

What are the rules for concatenated SMS messages in Peru?

Peru supports concatenated messages. Standard SMS length is 160 characters (GSM-7) or 70 characters (UCS-2). Both GSM-7 and UCS-2 encoding are supported.

How to comply with SMS regulations in Peru?

Obtain explicit consent before sending marketing messages, honor opt-out requests promptly, maintain accurate contact lists, and respect local regulations like the PDPL.

What is the process for getting short codes in Peru?

Short codes are available through local carriers in Peru. The provisioning process typically takes 8-12 weeks.

How do I handle SMS opt-outs in Peru?

All SMS campaigns must support "STOP", "PARA", "AYUDA", and "HELP" keywords. Respond to opt-out requests within 24 hours and maintain an updated suppression list.

What are the best practices for sending SMS in Peru?

Keep messages concise (under 160 characters), include clear calls to action, personalize when possible, use consistent sender IDs, and maintain a reasonable sending frequency (4-5 messages/month).

What content is restricted for SMS in Peru?

Gambling, adult content, unauthorized financial services, and unregistered pharmaceutical products are restricted. Financial and healthcare industries have specific regulations.

How to avoid SMS filtering in Peru?

Avoid URL shorteners, limit special characters, use professional language, maintain consistent sending patterns, and clearly identify your business.

How does number portability affect SMS in Peru?

Number portability is available and doesn't significantly impact SMS delivery; the system automatically handles carrier identification.

What are the API rate limits for sending SMS in Peru?

Rate limits vary by provider: Twilio (250/second), Sinch (100/second), MessageBird (150/second), and Plivo (200/second). Manage throughput with queues and batch APIs.

Can I send SMS messages to landlines in Peru?

No, sending SMS to landlines in Peru is not supported and will result in a 400 error response (code 21614) via the API.